fastdla.orthogonalize

fastdla.orthogonalize(op, basis)

Subtract the subspace projection of an algebra element from itself.

Let the orthonormal basis be \(V = \{g_j\}_{j=0}^{n-1}\). The orthogonal component of \(h\) with respect to \(V\) is given by

\[\begin{split}h_{\perp} & = h - \mathrm{proj}_V h \\ & = h - \sum_{j=0}^{n-1} \langle g_j, h \rangle g_j.\end{split}\]

The inputs to this function can be given in the matrix or SparsePauliSum representations.

Parameters:
  • op (Any) – Operator \(h\) to be orthogonalized from \(V\).

  • basis (Sequence[Any]) – Basis \(V\).

Return type:

Any

Returns:

Orthogonal component \(h_{\perp}\).