U3Gate.calc_params
- U3Gate.calc_params(utry)[source]
Calculate the three parameters to a U3Gate from a given unitary.
- Parameters:
utry (
UnitaryMatrix
) – The single-qubit unitary matrix to calculate a U3Gate’s parameters for.- Returns:
- The three parameters to a U3Gate,
such that, U3Gate().get_unitary will return utry.
- Return type:
list[float]
- Raises:
ValueError – If utry is not a single-qubit unitary.