Skip to content

Commit d7a32b8

Browse files
Update src/openfermion/circuits/low_rank.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 58d0628 commit d7a32b8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/openfermion/circuits/low_rank.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def get_chemist_two_body_coefficients(two_body_coefficients, spin_basis=True):
7676
# produce an asymmetric matrix here and cannot be handled by this
7777
# spatial-orbital downfolding approach.
7878
flat = numpy.reshape(alpha_alpha_beta_beta, (n_orbitals**2, n_orbitals**2))
79-
spin_asymmetry = numpy.sum(numpy.absolute(flat - flat.T))
79+
spin_asymmetry = numpy.amax(numpy.absolute(flat - flat.T))
8080
if spin_asymmetry > EQ_TOLERANCE:
8181
raise ValueError(
8282
'The two-body tensor is not spin-symmetric. The LOW_RANK '

0 commit comments

Comments
 (0)