ClassiqSimulatorNoiseSpecification.
Combine any subset of gate and readout channels; an empty specification runs an ideal
(noise-free) simulation.
Custom noise is available on Classiq Aer simulators (simulator, simulator_density_matrix,
simulator_matrix_product_state, and related backends) and on Nvidia / Braket Nvidia
simulators. See Execution on Classiq simulators for backend names.
Preset vs custom noise:
ClassiqBackendPreferences
accepts either noise_model (a named preset from CLASSIQ_NOISE_MODELS, such as
ibm_pittsburgh) or simulator_noise_spec (custom). Set at most one of them.Quick start
Attach a noise specification through backend preferences when you execute a program.- sample()
- ExecutionPreferences
Noise channels
The sections below describe each building block. Every section includes a minimal code example you can copy intoClassiqSimulatorNoiseSpecification(...).
Depolarizing noise on gates
Depolarizing noise mixes the state with the maximally mixed state on the support of the gate: with probability a uniform Pauli error is applied (excluding identity), and otherwise the channel leaves the state unchanged, where is the number of qubits the gate acts on and is theprobability parameter.
Use DepolarizingNoiseOnGate
to apply the same depolarizing channel on every occurrence of a named gate.
Local depolarizing noise on gates
LocalDepolarizingNoiseOnGate
applies depolarizing noise only when the named gate acts on a specific ordered tuple
of qubit indices. Other placements of the same gate name are unaffected.
Pauli noise on gates
Pauli noise is a probabilistic mixture: each term is a Pauli product (written as a string ofI, X, Y, Z per qubit, e.g. X on one qubit, IX or XY on two) with an
associated probability. All term probabilities must sum to 1.
Use PauliNoiseTerm and
PauliNoiseOnGate to attach
a mixed Pauli channel to every occurrence of a gate. Include an identity (I) term when
you want a fraction of executions to stay error-free.
Thermal relaxation on single-qubit gates
Thermal relaxation models energy decay and dephasing over a gate duration. Use coherent time constantst1 (amplitude damping) and t2 (dephasing) in any consistent unit, the
same unit for time as the gate duration, and optional excited_state_population for
the equilibrium population. For physical consistency, require .
ThermalRelaxationNoiseOnGate
is defined for a single computational qubit; attach it only to single-qubit gate names.
Global readout bit-flip probability
The symmetric one-parameter readout model swaps classical outcomes 0 and 1 with probabilityp on each qubit, for both and pre-measurement
states. Set readout_bit_flip_probability on
ClassiqSimulatorNoiseSpecification.
This field is mutually exclusive with readout_assignment_probabilities.
Global readout assignment matrix
Readout noise can also be specified with a 2-by-2 assignment matrix: row index is the true pre-measurement computational state (0 or 1), column index is the classical outcome (0 or 1); entry is the probability of recording outcome when the qubit was in state . Each row must be non-negative and sum to 1. Setreadout_assignment_probabilities to apply one matrix to every qubit’s measurement.
Mutually exclusive with readout_bit_flip_probability.
Local readout noise
LocalReadoutNoise assigns a
full 2-by-2 assignment matrix to a single simulator qubit index. Use
local_readout_errors when different qubits need different readout confusion.
Basis gates
basis_gates lists optional primitive gate names used when the simulator decomposes
circuits before attaching noise. If omitted, the backend uses its default primitive set
(commonly single-qubit rotations and one entangling gate type).
Combining channels
You can mix gate and readout channels in one specification. Global readout settings (readout_bit_flip_probability or readout_assignment_probabilities) cannot both be set;
per-qubit readout in local_readout_errors uses the same matrix convention.
Validation rules
The SDK validates noise specifications before execution. Common constraints:| Rule | Applies to |
|---|---|
noise_model and simulator_noise_spec are mutually exclusive | ClassiqBackendPreferences |
readout_bit_flip_probability and readout_assignment_probabilities are mutually exclusive | ClassiqSimulatorNoiseSpecification |
| Pauli term probabilities must sum to 1 | PauliNoiseOnGate |
len(qubits) must equal num_qubits | LocalDepolarizingNoiseOnGate |
ThermalRelaxationNoiseOnGate | |
| Assignment matrices must be 2-by-2, non-negative, row-stochastic | LocalReadoutNoise, global readout fields |