iqm.benchmarks.compressive_gst.mgst.qiskit_interface.remove_idle_wires

iqm.benchmarks.compressive_gst.mgst.qiskit_interface.remove_idle_wires#

iqm.benchmarks.compressive_gst.mgst.qiskit_interface.remove_idle_wires(qc: IQMCircuit) IQMCircuit#

Removes all wires on which no gate acts.

Credit to: https://quantumcomputing.stackexchange.com/a/37192 This shrinks the circuit for the conversion to quantum channels.

Parameters:

qc (IQMCircuit) – Input circuit from which idle wires are removed.

Returns:

The circuit with idle wires removed.

Return type:

IQMCircuit