Skip to content

Commit eda2846

Browse files
committed
format gate test
1 parent 8910cae commit eda2846

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_gates.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ def test_U_parameterized_gate():
8282
assert Umat.shape == (2, 2), "Parameterized U gate should be 2x2."
8383

8484
# 2) Produce X up to global phase with U(π, -π/2, π/2)
85-
U_x = Gates.U(theta=math.pi, phi=-math.pi/2, lam=math.pi/2)
85+
U_x = Gates.U(theta=math.pi, phi=-math.pi / 2, lam=math.pi / 2)
8686
X = Gates.X
8787

8888
# Compare up to a global phase
8989
# We'll pick a nonzero element to find the ratio
9090
ratio = U_x[0, 1] / X[0, 1] # e.g., compare top-right
9191
adjusted = U_x * np.conjugate(ratio)
92-
assert np.allclose(adjusted, X, atol=1e-8), (
93-
"U(π, -π/2, π/2) not matching X up to a global phase."
94-
)
92+
assert np.allclose(
93+
adjusted, X, atol=1e-8
94+
), "U(π, -π/2, π/2) not matching X up to a global phase."

0 commit comments

Comments
 (0)