surface_sim.util.add_noise_to_circuit#
- add_noise_to_circuit(noiseless_circuit, noise_model)[source]#
Adds the given noise to a noiseless Stim circuit.
- Parameters:
- noiseless_circuit
Noiseless Stim circuit. To correctly add idling noise, the idling gates must be present in the circuit, see
add_missing_idling_to_circuit.- noise_model
Noise model instance to be used.
- Returns:
- noisy_circuit
Noisy Stim circuit with the given noise.
Notes
This function obviously does not know when a QEC round starts and when it ends, so the only noise models that can be applied are the ones that act based on the physical qubit gates that are being applied, e.g.
CircuitNoiseModelandSI1000NoiseModel.