Noise Models¶
quanta.simulator.noise ¶
quanta.simulator.noise — Quantum noise models.
Example
from quanta.simulator.noise import NoiseModel, Depolarizing noise = NoiseModel() result = run(bell, noise=noise)
AmplitudeDamping
dataclass
¶
Bases: NoiseChannel
Amplitude damping: energy loss (T1 decay).
Attributes:
Source code in quanta/simulator/noise.py
apply ¶
Applies amplitude damping using Kraus operators.
K0 = [[1, 0], [0, √(1-γ)]] (no-decay branch) K1 = [[0, √γ], [0, 0]] (decay branch)
Statevector application: randomly apply K0 or K1 based on the probability of decay, then renormalize.
Source code in quanta/simulator/noise.py
BitFlip
dataclass
¶
Bases: NoiseChannel
Bit-flip channel: random |0⟩↔|1⟩ flip (X error).
Attributes:
Source code in quanta/simulator/noise.py
Crosstalk
dataclass
¶
Bases: NoiseChannel
Crosstalk noise: correlated errors between neighboring qubits.
When a gate operates on a qubit, crosstalk causes unintended rotations on physically adjacent qubits. This is a major error source in superconducting processors.
In real hardware
- ZZ crosstalk: ~0.1-1% per gate
- Frequency collision: ~0.01-0.1%
Attributes:
| Name | Type | Description |
|---|---|---|
probability |
float
|
Probability of crosstalk per gate. |
neighbor_offset |
int
|
Which neighbor is affected (+1 = next qubit). |
Source code in quanta/simulator/noise.py
Depolarizing
dataclass
¶
Bases: NoiseChannel
Depolarizing channel: random Pauli (X, Y, Z) error.
Attributes:
Source code in quanta/simulator/noise.py
NoiseChannel ¶
Bases: ABC
Abstract interface for a single noise channel.
Source code in quanta/simulator/noise.py
apply
abstractmethod
¶
Applies noise to the statevector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubit
|
int
|
Target qubit index. |
required |
num_qubits
|
int
|
Total qubit count. |
required |
Returns:
Source code in quanta/simulator/noise.py
NoiseModel ¶
Noise model: manages multiple channels.
Supports builder pattern and preset profiles:
# Builder pattern
>>> model = (NoiseModel.builder()
... .depolarizing(0.01)
... .with_readout(0.01, 0.02)
... .build())
# Preset profiles
>>> ibm = NoiseModel.ibm_heron()
>>> ionq = NoiseModel.ionq_aria()
Example
model = NoiseModel() model.add(Depolarizing(0.01)) model.add(AmplitudeDamping(0.005))
Source code in quanta/simulator/noise.py
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | |
add ¶
apply_noise ¶
apply_noise(
state: ndarray,
qubits: tuple[int, ...],
num_qubits: int,
rng: Generator,
) -> np.ndarray
Applies all channels to the specified qubits.
Source code in quanta/simulator/noise.py
builder
classmethod
¶
Start building a noise model with fluent API.
Example
model = (NoiseModel.builder() ... .depolarizing(0.01) ... .with_amplitude_damping(0.005) ... .with_readout(0.01, 0.02) ... .build())
Source code in quanta/simulator/noise.py
describe ¶
Returns a formatted table of noise channels.
Example
NoiseModel.ibm_heron().describe() '=== Noise Model (3 channels) ===\n...'
Source code in quanta/simulator/noise.py
google_willow
classmethod
¶
Google Willow noise profile.
Based on Google Willow specs (2026): - 1Q gate error: ~0.03% - 2Q gate error: ~0.3% - T1: ~70 μs - Below-threshold QEC demonstrated
Source code in quanta/simulator/noise.py
ibm_heron
classmethod
¶
IBM Heron r3 noise profile.
Based on ibm_fez calibration data (2026): - 1Q gate error: ~0.02% - 2Q gate error: ~0.5% - T1: ~300 μs, T2: ~200 μs - Readout error: ~0.8%
Source code in quanta/simulator/noise.py
ionq_aria
classmethod
¶
IonQ Aria noise profile.
Based on IonQ Aria-1 specs (2026): - 1Q gate fidelity: 99.97% - 2Q gate fidelity: 99.4% - All-to-all connectivity (no SWAP overhead)
Source code in quanta/simulator/noise.py
PhaseFlip
dataclass
¶
Bases: NoiseChannel
Phase-flip channel: random phase error (Z error).
Attributes:
Source code in quanta/simulator/noise.py
ReadoutError
dataclass
¶
Bases: NoiseChannel
Readout error: measurement bit-flip during readout.
Models the classical error that occurs when reading out a qubit. The qubit state is correct, but the measurement result may flip.
In real hardware
- IBM Eagle: ~0.5-2% readout error
- Google Sycamore: ~0.5-1%
Attributes:
| Name | Type | Description |
|---|---|---|
p0_to_1 |
float
|
Probability of reading |0⟩ as |1⟩. |
p1_to_0 |
float
|
Probability of reading |1⟩ as |0⟩. |
Source code in quanta/simulator/noise.py
apply_to_counts ¶
Applies readout error to measurement counts.
Flips individual bits in measurement results based on per-bit error probabilities.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
counts
|
dict[str, int]
|
Measurement result counts. |
required |
rng
|
Generator
|
Random number generator. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, int]
|
Modified counts with readout errors applied. |
Source code in quanta/simulator/noise.py
T2Relaxation
dataclass
¶
Bases: NoiseChannel
T2 relaxation (pure dephasing) channel.
Models decoherence where the qubit loses phase information without energy loss. T2 is always <= 2*T1.
In real hardware
- IBM Eagle: T2 ~ 100-200 μs
- Google Sycamore: T2 ~ 10-20 μs
Attributes:
| Name | Type | Description |
|---|---|---|
gamma |
float
|
Dephasing rate (probability of phase randomization). |