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, drop_final_rz=True, ignore_barriers=False)#

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

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

  • 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.

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

Returns:

optimised circuit

Return type:

QuantumCircuit