Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
JerryChen97 committed Feb 12, 2025
1 parent 8b81975 commit 6041f6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pennylane/ops/op_math/decompositions/single_qubit_unitary.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def _convert_to_su2(U, return_global_phase=False):
U = (
U * math.exp(-1j * phase)
if sp.sparse.issparse(U)
else math.cast_like(U, determinants) * math.exp(-1j * math.cast_like(phase, 1j))[:, None, None]
else math.cast_like(U, determinants)
* math.exp(-1j * math.cast_like(phase, 1j))[:, None, None]
)

return (U, phase) if return_global_phase else U
Expand Down

0 comments on commit 6041f6c

Please sign in to comment.