Skip to content

Commit

Permalink
Remove mod_2pi python function
Browse files Browse the repository at this point in the history
  • Loading branch information
mtreinish committed Mar 8, 2023
1 parent bcf0546 commit 64a59ee
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions qiskit/quantum_info/synthesis/one_qubit_decompose.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,3 @@ def angles_and_phase(self, unitary):
_params_xzx = staticmethod(euler_one_qubit_decomposer.params_xzx)
_params_u3 = staticmethod(euler_one_qubit_decomposer.params_u3)
_params_u1x = staticmethod(euler_one_qubit_decomposer.params_u1x)


def _mod_2pi(angle: float, atol: float = 0):
"""Wrap angle into interval [-π,π). If within atol of the endpoint, clamp to -π"""
wrapped = (angle + np.pi) % (2 * np.pi) - np.pi
if abs(wrapped - np.pi) < atol:
wrapped = -np.pi
return wrapped

0 comments on commit 64a59ee

Please sign in to comment.