householder_product#
- class brainunit.lax.householder_product(a, taus)#
Product of elementary Householder reflectors.
Reconstruct the orthogonal (unitary) matrix \(Q\) from a set of elementary Householder reflectors and their scalar factors.
- Parameters:
a (saiunit.Quantity |
Array|ndarray|bool|number|bool|int|float|complex) – A matrix with shape[..., m, n]whose lower triangle contains the elementary Householder reflectors. Units, if present, are stripped before computation.taus (saiunit.Quantity |
Array|ndarray|bool|number|bool|int|float|complex) – A vector with shape[..., k](k < min(m, n)) containing the scalar factors. Units, if present, are stripped.
- Returns:
Q – The orthogonal (unitary) matrix with the same shape as
a(always unitless).- Return type:
Array
See also
saiunit.lax.hessenbergProduces reflectors consumed by this function.
Examples
>>> import jax.numpy as jnp >>> import saiunit as u >>> import saiunit.lax as sulax >>> a = jnp.array([[1.0, 2.0], [3.0, 4.0]]) >>> taus = jnp.array([1.0]) >>> Q = sulax.householder_product(a, taus) >>> Q.shape (2, 2)