๐ก๏ธ Quantum Noise and Hardware Profiles
Physical quantum computers suffer from decoherence and gate errors. The QVM provides a noise simulation system in noise.py, modeling physical noise channels using Kraus operators and stochastic trajectories.
๐ Mathematical Model: Kraus Channels and Trajectories
Quantum noise is mathematically described using open quantum system dynamics. A noise channel mapping an density matrix is defined by a set of Kraus operators satisfying the completeness relation:
The Stochastic Trajectory Method (Monte Carlo)
To simulate noise efficiently on statevectors without converting to density matrices (which would scale as ), QVM uses the stochastic trajectory method:
- When a noisy gate is applied, the simulator computes the probability of each Kraus operator occurring on the current state :
- Samples a single Kraus operator based on these probabilities .
- Applies the sampled operator and re-normalizes the statevector:
This reproduces the density matrix statistics when averaged over many shots, while keeping simulation scaling at .
๐งช Supported Noise Channels
1. Depolarizing Noise
Replaces the qubit state with a maximally mixed state with probability .
- Single-Qubit Kraus Operators:
- Two-Qubit Kraus Operators: Scales the two-qubit tensor product combinations of Pauli operators:
2. Amplitude Damping (T1 Decay)
Models energy relaxation (spontaneous emission) where state decays to state with probability :
3. Phase Damping (T2 Dephasing)
Models pure dephasing (loss of phase coherence without energy loss) with probability :
4. Thermal Relaxation
Combines relaxation and dephasing over a specific gate duration .
- Decay Probabilities:
- Residual Phase Calculation: To combine these channels, the simulator computes a residual phase damping probability to account for dephasing already caused by the amplitude damping:
- Kraus Operators: Built by composing the amplitude damping and residual phase damping operators, resulting in combined Kraus operators.
๐ Readout Error Models (Confusion Matrix)
Readout error models the probability of classical measurement bits flipping. It is defined using a confusion matrix :
During measurement sampling, the simulator evaluates the true state of each qubit and stochastically flips the output bit based on the confusion matrix:
true_bit = int(bits_list[i])
# Sample from confusion matrix row
flip_prob = cm[true_bit, 1 - true_bit]
if rng.random() < flip_prob:
bits_list[i] = str(1 - true_bit)๐ฅ๏ธ Predefined Device Profiles
The DeviceBackend class loads calibration data (T1, T2, gate times, single/two-qubit gate errors, and readout errors) to generate realistic noise models:
fake_5q_device()(IBM Manila):- qubits in a linear chain: .
- , .
- Gate errors: for single-qubit gates, for CNOTs.
- Readout errors: .
fake_7q_device()(IBM Lagos):- qubits in a T-shape.
- , .
- Gate errors: for single-qubit gates, for CNOTs.
ideal(): Zero-noise baseline for testing.