mindquantum.algorithm.compiler.euler_decompose

View Source On Gitee
mindquantum.algorithm.compiler.euler_decompose(gate: QuantumGate, basis: str = 'zyz', with_phase: bool = True)[source]

One-qubit Euler decomposition.

Currently only support ‘zyz’ and ‘u3’ decomposition.

Parameters
  • gate (QuantumGate) – single-qubit quantum gate.

  • basis (str) – decomposition basis, can be one of 'zyz' or 'u3'. Default: 'zyz'.

  • with_phase (bool) – whether return global phase in form of a GlobalPhase gate.

Returns

Circuit, quantum circuit after Euler decomposition.