iqm.pulse.gates.u.get_su2_params

Contents

iqm.pulse.gates.u.get_su2_params#

iqm.pulse.gates.u.get_su2_params(unitary, threshold=1e-13)#

Calculate parameters for an SU(2) gate given its unitary.

The parameters are calculated up to global phase, and such that 0 <= theta <= pi and -pi <= phi, lam < pi. See iqm.pulse.gates.u for the definition of the gate parameters.

Parameters:
  • unitary (ndarray) – U(2) matrix to calculate parameters for, ignoring the global phase.

  • threshold (float) – Precision threshold to decide if the unitary describes a pure Z rotation, a pi rotation, or neither.

Returns:

Parameters theta, phi, lambda for the u gate.

Return type:

tuple[float, float, float]