Noise - Quantum errors simulator

netQuil.noise.bit_flip(program, qubit, prob: float)[source]

Apply a bit flip with probability

Parameters
  • program (Program) – program to apply noise to

  • qubit (Integer) – qubit to apply noise to

  • prob (Float) – probability of apply noise

netQuil.noise.phase_flip(program, qubit, prob: float)[source]

Apply a phase flip with probability

Parameters
  • program (Program) – program to apply noise to

  • qubit (Integer) – qubit to apply noise to

  • prob (Float) – probability of apply noise

netQuil.noise.depolarizing_noise(program, qubit, prob: float)[source]

Apply depolarizing noise with probability

Parameters
  • program (Program) – program to apply noise to

  • qubit (Integer) – qubit to apply noise to

  • prob (Float) – probability of apply noise

netQuil.noise.measure(program, qubit, prob: float, name)[source]

Measure the qubit with probability

Parameters
  • program (Program) – program to apply noise to

  • qubit (Integer) – qubit to apply noise to

  • prob (Float) – probability of apply noise

  • name (String) – name of quil classical register to measure to.

Returns

None if qubit is not measured and qubit if qubit is measured

netQuil.noise.normal_unitary_rotation(program, qubit, prob: float, variance)[source]

Apply X and Z rotation with probability

Parameters
  • program (Program) – program to apply noise to

  • qubit (Integer) – qubit to apply noise to

  • prob (Float) – probability of apply noise

  • variance (Float) – variance of rotation angle