iqm.benchmarks.compressive_gst.mgst.reporting.reporting.compute_angles_axes

iqm.benchmarks.compressive_gst.mgst.reporting.reporting.compute_angles_axes#

iqm.benchmarks.compressive_gst.mgst.reporting.reporting.compute_angles_axes(U_set: ndarray, alternative_phase: bool = False) tuple[list[float], list[ndarray], ndarray]#

Takes the matrix logarithm of the given unitaries and returns the Hamiltonian parameters.

The parametrization is U = exp(-i pi H/2), i.e. H = i log(U)*2/pi

Parameters:
  • U_set (ndarray) – A list contining unitary matrices

  • alternative_phase (bool) – Whether an attempt should be made to report more intuitive rotations, for example a rotation of 3 pi/2 around the -X axis would be turned into a pi/2 rotation around the X-axis.

Returns:

The rotation angle on the Bloch sphere for all gates axes: The normalized rotation axes in the Pauli basis for all gates pauli_coeffs: The full list of Pauli basis coefficients of the Hamiltonian for all gates

Return type:

angles

Notes

sqrt(pdim) factor is due to Pauli basis normalization