insert_noise#

insert_noise(circuits, noise_model, transpile=False)[source]#

Return a noisy version of a QuantumCircuit.

Parameters:
  • circuits (QuantumCircuit or list[QuantumCircuit]) – Input noise-free circuits.

  • noise_model (NoiseModel) – The noise model containing the errors to add

  • transpile (Boolean) – Should the circuit be transpiled into the noise model basis gates

Returns:

The new circuit with the Kraus noise instructions inserted.

Return type:

QuantumCircuit

Additional Information:

The noisy circuit return by this function will consist of the original circuit with Kraus instructions inserted after all instructions referenced in the noise_model. The resulting circuit cannot be ran on a quantum computer but can be executed on the QasmSimulator.