qiskit_qec.utils.noisify_circuit

noisify_circuit(circuits, noise_model)[source]

Inserts error operations into a circuit according to a pauli noise model. Handles idling errors in the form of custom gates “idle_#” which are assumed to encode the identity gate only. qc = QuantumCircuit(1, name=’idle_1’) qc.i(0) idle_1 = qc.to_instruction()

Parameters:
  • circuits (Union[List, QuantumCircuit]) – Circuit or list thereof to which noise is added.

  • noise_model (PauliNoiseModel) – Pauli noise model used to define types of errors to add to circuit.

Returns:

Corresponding circuit or list thereof.

Return type:

noisy_circuits