iqm.qiskit_iqm.iqm_transpilation.optimize_single_qubit_gates

iqm.qiskit_iqm.iqm_transpilation.optimize_single_qubit_gates#

iqm.qiskit_iqm.iqm_transpilation.optimize_single_qubit_gates(circuit: QuantumCircuit, drop_final_rz: bool = True, ignore_barriers: bool = False) QuantumCircuit#

Optimize number of single-qubit gates in a transpiled circuit exploiting the IQM specific gate set.

Parameters:
  • circuit (QuantumCircuit) – quantum circuit to optimize

  • drop_final_rz (bool) – 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. It is recommended always to set this to true as the final RZ gates do no change the measurement outcomes of the circuit.

  • ignore_barriers (bool) – Removes barriers from the circuit if they exist (default = False) before optimization.

Returns:

optimized circuit

Return type:

QuantumCircuit