Skip to main content
Classiq-hosted simulators support user-defined noise through 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.

Noise channels

The sections below describe each building block. Every section includes a minimal code example you can copy into ClassiqSimulatorNoiseSpecification(...).

Depolarizing noise on gates

Depolarizing noise mixes the state with the maximally mixed state on the support of the gate: with probability (4n1)/4nλ(4^n-1)/4^n \cdot \lambda a uniform Pauli error is applied (excluding identity), and otherwise the channel leaves the state unchanged, where nn is the number of qubits the gate acts on and λ\lambda is the probability 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 of I, 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 constants t1 (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 1|1\rangle population. For physical consistency, require T22T1T_2 \leq 2 T_1. 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 probability p on each qubit, for both 0|0\rangle and 1|1\rangle 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 (i,j)(i,j) is the probability of recording outcome jj when the qubit was in state i|i\rangle. Each row must be non-negative and sum to 1. Set readout_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: For full field-level reference, see Simulator noise (SDK reference).