surface_sim.util#

Functions

merge_circuits(*circuits)

Returns a circuit in which the given circuits have been merged following the TICK blocks.

merge_logical_operations(op_iterators, ...)

Returns a circuit in which the given logical operation iterators have been merged and idle noise have been added if the iterators have different lenght.

merge_ticks(blocks)

Merges stim circuit containing TICK instructions and noise channels so that only one TICK instruction is present while keeping if the noise channels happened before of after the TICK.

merge_operation_layers(*operation_layers)

Merges operation layers acting on different qubits to simplify the final circuit.

add_noise_to_circuit(noiseless_circuit, ...)

Adds the given noise to a noiseless Stim circuit.

add_missing_idling_to_circuit(circuit)

Adds missing idling channels to the circuit to ensure that all qubits are performing a gate or idling between ``TICK``s.

add_ticks_to_circuit(circuit)

Adds (missing) ``TICK``s to circuit so that each qubit only performs a single operation between ``TICK``s.

remove_idling_from_circuit(circuit)

Removes idling operations from the given circuit.