Schmidt

Exact dense Schmidt-spectrum helpers used by entanglement entropy routines.

Helpers for exact Schmidt spectra and entanglement calculations.

edlgt.entanglement.schmidt.schmidt_probabilities(psi_matrix)[source]

Return the exact Schmidt probabilities of a bipartition matrix.

Parameters:

psi_matrix (numpy.ndarray or scipy.sparse.spmatrix) – Subsystem/environment bipartition matrix of the state.

Returns:

Non-negative Schmidt probabilities (squared singular values), i.e. the eigenvalues of the reduced density matrix.

Return type:

numpy.ndarray

Notes

The probabilities are the eigenvalues of the smaller of the two Gram matrices A A^H / A^H A, computed exactly with a Hermitian eigensolver. The smaller side is chosen so the dense Gram has side min(subsys_dim, env_dim). For sparse A the Gram is accumulated in blocks (see _gram_from_sparse_blocked()). The eigendecomposition runs in place (overwrite_a=True) to avoid an extra working copy.

edlgt.entanglement.schmidt.dense_schmidt_probabilities(psi_matrix)

Return the exact Schmidt probabilities of a bipartition matrix.

Parameters:

psi_matrix (numpy.ndarray or scipy.sparse.spmatrix) – Subsystem/environment bipartition matrix of the state.

Returns:

Non-negative Schmidt probabilities (squared singular values), i.e. the eigenvalues of the reduced density matrix.

Return type:

numpy.ndarray

Notes

The probabilities are the eigenvalues of the smaller of the two Gram matrices A A^H / A^H A, computed exactly with a Hermitian eigensolver. The smaller side is chosen so the dense Gram has side min(subsys_dim, env_dim). For sparse A the Gram is accumulated in blocks (see _gram_from_sparse_blocked()). The eigendecomposition runs in place (overwrite_a=True) to avoid an extra working copy.