NoiseModel#
- class tqec.utils.NoiseModel(idle_depolarization, additional_depolarization_waiting_for_m_or_r=0, gate_rules=None, measure_rules=None, any_clifford_1q_rule=None, any_clifford_2q_rule=None)[source]#
Bases:
object
Represent a noise model that can be applied to a
stim.Circuit
.Methods
__init__
(idle_depolarization[, ...])Represent a noise model that can be applied to a
stim.Circuit
.noisy_circuit
(circuit, *[, system_qubits, ...])Returns a noisy version of the given circuit, by applying the receiving noise model.
si1000
(p)Superconducting inspired noise.
Near-standard circuit depolarizing noise.
Detailed methods
- Parameters:
idle_depolarization (float)
additional_depolarization_waiting_for_m_or_r (float)
gate_rules (dict[str, NoiseRule] | None)
measure_rules (dict[str, NoiseRule] | None)
any_clifford_1q_rule (NoiseRule | None)
any_clifford_2q_rule (NoiseRule | None)
- __init__(idle_depolarization, additional_depolarization_waiting_for_m_or_r=0, gate_rules=None, measure_rules=None, any_clifford_1q_rule=None, any_clifford_2q_rule=None)[source]#
Represent a noise model that can be applied to a
stim.Circuit
.- Parameters:
idle_depolarization (float)
additional_depolarization_waiting_for_m_or_r (float)
gate_rules (dict[str, NoiseRule] | None)
measure_rules (dict[str, NoiseRule] | None)
any_clifford_1q_rule (NoiseRule | None)
any_clifford_2q_rule (NoiseRule | None)
- noisy_circuit(circuit, *, system_qubits=None, immune_qubits=None)[source]#
Returns a noisy version of the given circuit, by applying the receiving noise model.
- Parameters:
circuit (Circuit) – The circuit to layer noise over.
system_qubits (set[int] | None) – All qubits used by the circuit. These are the qubits eligible for idling noise.
immune_qubits (set[int] | None) – Qubits to not apply noise to, even if they are operated on.
- Returns:
The noisy version of the circuit.
- Return type:
Circuit
- static si1000(p)[source]#
Superconducting inspired noise.
As defined in “A Fault-Tolerant Honeycomb Memory”: https://arxiv.org/abs/2108.10457
Small tweak from the paper: The measurement result is probabilistically flipped instead of the input qubit.
- Parameters:
p (float)
- Return type:
- static uniform_depolarizing(p)[source]#
Near-standard circuit depolarizing noise.
Everything has the same parameter
p
. Single-qubit Clifford gates get single-qubit depolarization. Two-qubit Clifford gates get single-qubit depolarization. Dissipative gates have their result probabilistically bit-flipped (or phase-flipped if appropriate).Non-demolition measurement is treated a bit unusually in that it is the result that is flipped instead of the input qubit.
- Parameters:
p (float)
- Return type: