Overview

The qilisdk.noise module contains classes that represent different types of noise in quantum systems. These noise models can be integrated into quantum simulations to account for real-world imperfections and decoherence effects. A NoiseModel can contain various types of noise, each of which is then applied during simulation.

Backend

Noise Models Supported

QiliSim

CudaqBackend

QutipBackend

Usage

Noise passes are added to a NoiseModel, which should then be included when creating a backend. For example, to create a simple circuit and then simulate it with a CUDA backend containing a bit-flip noise model:

from qilisdk.noise import NoiseModel, BitFlip
from qilisdk.digital import X, Circuit
from qilisdk.functionals import DigitalPropagation
from qilisdk.readout import Readout
from qilisdk.backends import CudaqBackend

# Define the random circuit and functional
c = Circuit(nqubits=2)
c.add(X(0))
c.add(X(1))
functional = DigitalPropagation(c)

# Apply bit-flip noise with 50% probability to X gates on qubit 1
nm = NoiseModel()
nm.add(BitFlip(probability=0.5), gate=X, qubits=[1])

# Execute with CUDA backend
backend_cuda = CudaqBackend(noise_model=nm)
res = backend_cuda.execute(functional, readout=Readout().with_sampling(nshots=1000))
print(res)

Summary of Noise Types

Some of the noise passes available in QiliSDK can be used for both digital circuits and analog schedules, while others are specific to one or the other:

Noise Type

Digital Propagation

Analog Evolution

KrausChannel

LindbladGenerator

PauliChannel

BitFlip

PhaseFlip

Depolarizing

AmplitudeDamping

Dephasing

GaussianPerturbation

OffsetPerturbation

ReadoutAssignment

Things to note

  • Global noise acts on all qubits for all gates, including controls.

  • Gate noise applies to all qubits that a gate acts on, so if you put noise on a CNOT, it will apply to both the controls and the targets.

  • Noise applied to a specific qubit will only ever target that qubit, even if the gate applying the noise acts on multiple qubits.