Class NoiseModel
Defined in File noise_model.hpp
Inheritance Relationships
Derived Type
public qb::QbNoiseModel(Class QbNoiseModel)
Class Documentation
-
class NoiseModel
Noise Model class This allows specification noise parameters for each quantum gate.
Subclassed by qb::QbNoiseModel
Public Types
Public Functions
-
NoiseModel() = default
-
NoiseModel(const nlohmann::json &js)
Construct a new Noise Model object from JSON.
- Parameters
js – JSON object contains noise model parameters
-
NoiseModel(const NoiseProperties &noise_props)
Construct a new Noise Model object from noise properties.
- Parameters
noise_props – Device noise properties
-
std::string to_json() const
Convert noise model to json string.
- Returns
JSON string
-
std::vector<std::pair<int, int>> get_connectivity() const
Get the connectivity (pairs of connected qubits)
- Returns
Connectivity as list of qubit index pairs
-
void add_gate_error(const NoiseChannel &noise_channel, const std::string &gate_name, const std::vector<size_t> &qubits)
Add a gate error channel for a gate operation.
- Parameters
noise_channel – Noise channel to be associated with the gate
gate_name – Name of the gates
qubits – Qubit operands of the gate.
-
void add_qubit_connectivity(int q1, int q2)
Added connected qubit pair to the topology model.
- Parameters
q1 – First qubit index
q2 – Second qubit index
-
void set_qubit_readout_error(size_t qubitIdx, const NoiseProperties::ReadoutError &ro_error)
Set the qubit readout error.
- Parameters
qubitIdx – Qubit to set
ro_error – Readout error
Protected Functions
-
double decoherence_pauli_error(double t1, double tphi, double gate_time)
Calculate component of Pauli error caused by decoherence on a single qubit.
- Parameters
t1 – T1 time
tphi – Tphi time
gate_time – Duration of the gate affected by this error.
- Returns
Calculated Pauli error resulting from decoherence.
Protected Attributes
-
std::unordered_map<std::string, std::map<std::vector<size_t>, std::vector<NoiseChannel>>> m_noise_channels
Gate noise channel registry Map from gate name -> a map of qubit operands -> noise channel If the noise is uniform (qubit independent), use empty vector for qubit operands.
-
std::unordered_map<size_t, NoiseProperties::ReadoutError> m_readout_errors
Readout errors.
-
std::vector<std::pair<int, int>> m_qubit_topology
Qubit connectivity.
-
nlohmann::json m_qobj_noise_model
Noise model Json conforming to IBM Qiskit QObj schema if provided.
-
NoiseModel() = default