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 9b07e9d commit 8e90a9d
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,8 +46,10 @@ 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/settings.HBAR), vec * np.sqrt(2/settings.HBAR)) # scaling to take care of HBAR
X, Y = np.meshgrid(
vec * np.sqrt(2 / settings.HBAR), vec * np.sqrt(2 / settings.HBAR)
) # scaling to take care of HBAR
Z = np.array([X - 1j * Y, X + 1j * Y]).transpose((1, 2, 0))
assert math.allclose(
2/settings.HBAR * (np.real(Wigner(Z))), (np.real(wigner)), atol=1e-8
2 / settings.HBAR * (np.real(Wigner(Z))), (np.real(wigner)), atol=1e-8
) # scaling to take care of HBAR

0 comments on commit 8e90a9d

Please sign in to comment.