cirq.expand_matrix_in_orthogonal_basis

cirq.expand_matrix_in_orthogonal_basis(m: numpy.ndarray, basis: Dict[str, numpy.ndarray]) → cirq.value.linear_dict.LinearDict[str][source]

Computes coefficients of expansion of m in basis.

We require that basis be orthogonal w.r.t. the Hilbert-Schmidt inner
product. We do not require that basis be orthonormal. Note that Pauli
basis (I, X, Y, Z) is orthogonal, but not orthonormal.