Skip to content

Commit

Permalink
Use expand method
Browse files Browse the repository at this point in the history
  • Loading branch information
thangleiter committed Dec 17, 2024
1 parent 2803f03 commit dad8f32
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions filter_functions/superoperator.py
Original file line number Diff line number Diff line change
@@ -79,11 +79,7 @@ def liouville_representation(U: ndarray, basis: _b.Basis) -> ndarray:
U = np.asanyarray(U)
conjugated_basis = np.einsum('...ba,ibc,...cd->...iad', U.conj(), basis, U,
optimize=['einsum_path', (1, 2), (0, 1)])
if basis.btype == 'GGM' and basis.d > 12:
# Can do closed form expansion and overhead compensated
return _b.ggm_expand(conjugated_basis, hermitian=basis.isherm)
else:
return _b.expand(conjugated_basis, basis, hermitian=basis.isherm)
return basis.expand(conjugated_basis, hermitian=basis.isherm)


def liouville_to_choi(superoperator: ndarray, basis: _b.Basis) -> ndarray:

0 comments on commit dad8f32

Please sign in to comment.