qrmfold.depth_reducer module¶
- qrmfold.depth_reducer.reduce_circuit_depth(circuit: Circuit)[source]¶
Apply basic circuit depth reduction by accumulating commuting gates.
Currently supports I, S, Z, S_DAG, CZ, H, CX, TICK, and repeat blocks. Accumulates the S, Z, S_DAG, and CZ gates and removes the I gates.
- Parameters:
circuit – Input circuit as a
stim.Circuit.- Returns reduced_circuit:
An equivalent circuit of reduced depth as a
stim.Circuit.- Raises:
ValueError – If an unsupported instruction is encountered.