You're reading an old version of this documentation. If you want up-to-date information, please have a look at 11.10.


class iqm.qiskit_iqm.iqm_transpilation.IQMOptimizeSingleQubitGates(*args, **kwargs)#

Bases: TransformationPass

Optimize the decomposition of single-qubit gates for the IQM gate set.

This optimisation pass expects the circuit to be correctly layouted and translated to the IQM architecture and raises an error otherwise. The optimisation logic follows the steps:

  1. Convert single-qubit gates to \(U\) gates and combine all neighbouring \(U\) gates.

  2. Convert \(U\) gates according to \(U(\theta , \phi , \lambda) ~ RZ(\phi + \lambda) R(\theta, \pi / 2 - \lambda)\).

  3. Commute RZ gates to the end of the circuit using the fact that RZ and CZ gates commute, and \(R(\theta , \phi) RZ(\lambda) = RZ(\lambda) R(\theta, \phi - \lambda)\).

  4. Drop RZ gates immediately before measurements, and otherwise replace them according to \(RZ(\lambda) = R(\pi, \lambda / 2) R(- \pi, 0)\).


drop_final_rz – Drop terminal RZ gates even if there are no measurements following them (since they do not affect the measurement results). Note that this will change the unitary propagator of the circuit.





Run a pass on the DAGCircuit.


Run a pass on the DAGCircuit. This is implemented by the pass developer.


dag (DAGCircuit) – the dag on which the pass is run.


NotImplementedError – when this is left unimplemented for a pass.

Return type: