Skip to content
fn

householder_product_op

→TensorImplPtr
int householder_product_op(const int & H, const int & tau)

Python wrappers

Public Python APIs implemented by this engine symbol.

Materialise the orthogonal QQ from packed Householder reflectors.

Math

Q=H1H2⋯Hk,k=min⁡(m,n) Q = H_1 H_2 \cdots H_k, \qquad k = \min(m, n)

Shape

  • Input H : (m, n)
  • Input tau : (k,) with k=min⁡(m,n)k = \min(m, n)
  • Output Q : (m, k)

References

LAPACK *orgqr; Golub & Van Loan §5.1.2.

See Also

[[eig_op]] : Produces packed reflectors for general eigenvector reconstruction. [[eigh_op]] : Symmetric eigendecomp; reflectors come from a tridiagonal reduction step.

Parameters

Hconst TensorImplPtr&
Packed reflector matrix of shape (m, n) produced by a QR-type factorisation. Column ii stores reflector viv_i in the strict lower triangle below the diagonal (the diagonal entry of viv_i is implicitly 11 and the slot is reused for RR). Must be float-typed and non-null.
tauconst TensorImplPtr&
1-D scaling factors of length k=min⁡(m,n)k = \min(m, n). tau[i] is the τi\tau_i scalar of the ii-th reflector Hi=I−τivivi⊤H_i = I - \tau_i v_i v_i^\top. Must be float-typed and non-null.

Returns

TensorImplPtr

Explicit orthogonal matrix QQ of shape (m, k) with the same dtype as H. Columns are orthonormal (Q⊤Q=IkQ^\top Q = I_k).

Raises

LinAlgError
When H or tau is null / not float-typed.

Notes

Output is a leaf node — autograd is not wired. Gradients flow through the calling QR / eig op rather than through this unpack step.