Skip to content

Commit

Permalink
Update tests/test_pauli_string.py
Browse files Browse the repository at this point in the history
Co-authored-by: James E T Smith <[email protected]>
  • Loading branch information
stand-by and jamesETsmith authored Aug 7, 2024
1 parent bbfbd4c commit 8064110
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/test_pauli_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,7 @@ def test_expected_value(

coeff = generate_random_complex(1)[0]
psis = generate_random_complex(n_dim, n_states)
expected = [
coeff * naive_pauli_converter(s).dot(psi).dot(psi.conj()) for psi in psis.T
]
expected = np.einsum("ti,ij,tj->t", psi.conj(), naive_pauil_converter(s), psi)
np.testing.assert_allclose(
PauliString(s).expected_value(psis, coeff),
expected,
Expand Down

0 comments on commit 8064110

Please sign in to comment.