Skip to content

Commit

Permalink
clearer name
Browse files Browse the repository at this point in the history
  • Loading branch information
elib20 committed Aug 29, 2024
1 parent 236b9e4 commit ce8217b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_lab_dev/test_states/test_states_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,11 @@ def test_quadrature_single_mode_ket(self, phi):
state = Coherent(modes=[0], x=x, y=y)
q = np.linspace(-10, 10, 100)
quad = math.transpose(math.astensor([q]))
psi_p = coherent_state_quad(q, x, y, phi)
assert math.allclose(state.quadrature(quad, phi=phi), psi_p)
assert math.allclose(state.quadrature_distribution(q, phi=phi), abs(psi_p) ** 2)
assert math.allclose(state.to_fock(40).quadrature(quad, phi=phi), psi_p)
assert math.allclose(state.to_fock(40).quadrature_distribution(q, phi=phi), abs(psi_p) ** 2)
psi_phi = coherent_state_quad(q, x, y, phi)
assert math.allclose(state.quadrature(quad, phi=phi), psi_phi)
assert math.allclose(state.quadrature_distribution(q, phi=phi), abs(psi_phi) ** 2)
assert math.allclose(state.to_fock(40).quadrature(quad, phi=phi), psi_phi)
assert math.allclose(state.to_fock(40).quadrature_distribution(q, phi=phi), abs(psi_phi) ** 2)

def test_quadrature_multimode_ket(self):
x, y = 1, 2
Expand Down

0 comments on commit ce8217b

Please sign in to comment.