NoiseModel
QuICT.core.noise.NoiseModel ¶
The Noise Model, which contains the QuantumNoiseErrors and can translate circuit with the given QuantumNoiseError.
Parameters:
-
name(str, default:'Noise Model') –The name of this NoiseModel. Defaults to "Noise Model".
-
quantum_machine_info(VirtualQuantumMachine, default:None) –The information about the quantum machine, can use those info to build NoiseModel for target machine. Defaults to None.
Source code in QuICT/core/noise/noise_model.py
add ¶
Add noise which will affect target quantum gates with special qubits in the circuit.
Parameters:
-
noise(QuantumNoiseError) –The noise error.
-
gates(Union[str, List[str]]) –The affected quantum gates.
-
qubits(Union[int, List[int]], default:None) –The affected qubits, if None, same as add_noise_for_all_qubits. Defaults to None.
Source code in QuICT/core/noise/noise_model.py
add_noise_for_all_qubits ¶
Add noise which will affect all qubits in the circuit.
Parameters:
-
noise(QuantumNoiseError) –The noise error
-
gates(Union[str, List[str]]) –The affected quantum gates.
Source code in QuICT/core/noise/noise_model.py
add_readout_error ¶
Add Readout error in the noise model.
Example
- Add 1-qubit Readout Error for all target qubits. noisemodel.add_readout_error(1-qubit ReadoutError, [0, 1, 2, etc])
- Add multi-qubits Readout Error for specified qubits (the number of qubits equal to ReadoutError.qubits). noisemodel.add_readout_error(multi-qubits ReadoutError, [1, 3, etc])
Important
Supports to apply more than one Readout Error with the same target qubits, but do not support the combination of the Readout Error with the different qubits currently.
Parameters:
-
noise(ReadoutError) –The Readout Error.
-
qubits(Union[int, List[int]]) –The target qubits for the Readout error
Source code in QuICT/core/noise/noise_model.py
apply_readout_error ¶
Apply readout error to target qubits.
Parameters:
-
qubit_indexes(Union(List, int) –The indexes of all measured qubits.
-
measured(int) –the measured state of all measured qubits.
Source code in QuICT/core/noise/noise_model.py
is_ideal_model ¶
Validate it is an ideal(No noise) Quantum Machine Model or not.
transpile ¶
Apply all noise in the Noise Model to the given circuit, replaced related gate with the NoiseGate
Parameters:
-
circuit(Circuit) –The given circuit.
-
accumulated_mode(bool, default:False) –Whether using accumulated mode to generate Noise Circuit.
Returns:
-
Circuit(Circuit) –The noised circuit with.