Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
dwierichs committed Nov 11, 2024
1 parent 62fc819 commit 533f0ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion demonstrations/tutorial_kak_theorem.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ def theta_Y(x):
P = qml.math.linalg.expm(qml.matrix(horizontal_x))
decomp = qml.ops.one_qubit_decomposition(P, 0, rotations="ZYZ")
print(decomp)
angle_match = np.isclose((decomp[0].data[0] + decomp[-1].data[0])%(2*np.pi), 0.)
angle_match = np.isclose((decomp[0].data[0] + decomp[-1].data[0]) % (2 * np.pi), 0.0)
print(f"First and last rotation angle match up to sign and shift by 2kπ: {angle_match}")

######################################################################
Expand Down

0 comments on commit 533f0ce

Please sign in to comment.