Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
arsalan-motamedi committed Sep 5, 2024
1 parent fe693f3 commit 6be3a82
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_lab_dev/test_transformations/test_cft.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def test_wigner_function(self):
wigner, _, _ = wigner_discretized(dm, vec, vec)

Wigner = (state >> CFT([0]) >> BtoPS([0], s=0)).representation.ansatz
X, Y = np.meshgrid(vec*np.sqrt(2), vec*np.sqrt(2)) #scaling to take care of HBAR
X, Y = np.meshgrid(vec * np.sqrt(2), vec * np.sqrt(2)) # scaling to take care of HBAR
Z = np.array([X - 1j * Y, X + 1j * Y]).transpose((1, 2, 0))
assert math.allclose(2*(np.real(Wigner(Z))), (np.real(wigner)), atol=1e-8) #scaling to take care of HBAR
assert math.allclose(
2 * (np.real(Wigner(Z))), (np.real(wigner)), atol=1e-8
) # scaling to take care of HBAR

0 comments on commit 6be3a82

Please sign in to comment.