orthogonal_columns
full name: tenpy.linalg.np_conserved.orthogonal_columns
parent module:
tenpy.linalg.np_conserved
type: function
- tenpy.linalg.np_conserved.orthogonal_columns(a, new_label=None)[source]
Find orthogonal columns for a given matrix.
Given a of shape (M,N) with M >= N and assuming full rank N of a, this function considers the columns of a as basis vectors and finds orthogonal columns completing it. The resulting ortho will be a (M, (M-N)) matrix. A simple (and more expensive) implementation based on
qr()
would look like this:- def orthogonal_columns(a, new_label):
q, r = ncp.qr(a, mode=’complete’, inner_labels=[new_label, None]) r_dense = r.to_ndarray() zero_r_rows = (np.linalg.norm(r_dense, axis=1) == 0) ortho = q.iproject(zero_r_rows, axis=1) ortho.iset_leg_labels([a.get_leg_labels()[0], new_label]) return ortho
- Parameters:
- Returns:
ortho – Isometry in the sense
ortho^dagger @ orhto == eye
, i.e. has orthonormal columns. Further, all columns are orthonormal to the columns of a.- Return type: