From ed7a7bd14d01f438c42bc1600d912860ba2b00e6 Mon Sep 17 00:00:00 2001 From: Arsalan Motamedi Date: Thu, 7 Nov 2024 11:19:21 -0500 Subject: [PATCH] bugfix in CZ test --- tests/test_lab_dev/test_transformations/test_czgate.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_lab_dev/test_transformations/test_czgate.py b/tests/test_lab_dev/test_transformations/test_czgate.py index 9dc73f297..3ff14c129 100644 --- a/tests/test_lab_dev/test_transformations/test_czgate.py +++ b/tests/test_lab_dev/test_transformations/test_czgate.py @@ -48,8 +48,7 @@ def test_init(self): @pytest.mark.parametrize("s", [0.1, 0.2, 1.5]) def test_application(self, s): "Tests the application of CZgate" - psi = Coherent([0], 0, 1) >> Coherent([1], 1, 0) >> CZgate([0, 1], 1) + psi = Coherent([0], 0, 1) >> Coherent([1], 1, 0) >> CZgate([0, 1], s) _, d, _ = psi.phase_space(s=0) - psi = Coherent([0], 0, 1) >> Coherent([1], 1, 0) >> CZgate([0, 1], 1) d_by_hand = math.astensor([0, math.sqrt(complex(2)), (1 + s) * math.sqrt(complex(2)), 0]) assert math.allclose(d[0], d_by_hand)