Class EmulatorNoiseModel
Defined in File EmulatorNoiseModel.hpp
Inheritance Relationships
Base Type
public qristal::NoiseModel(Class NoiseModel)
Class Documentation
-
class EmulatorNoiseModel : public qristal::NoiseModel
QB Noise Model: Noise model of QB’s NV quantum devices.
Public Types
Public Functions
-
inline EmulatorNoiseModel(Generation gen = Generation::nm2)
Construct a new Qb Noise Model object.
- Parameters:
gen – Specifies the noise model generation
-
EmulatorNoiseModel(Generation gen, double t1_ns, double t2_ns)
Construct a new Qb Noise Model object.
- Attention
This is for testability only whereby we allow for variation to T1 and T2 value to verify the noise model.
- Parameters:
gen – Specifies the noise model generation
t1_ns – T1 value to set (in nanoseconds)
t2_ns – T2 value to set (in nanoseconds)
-
EmulatorNoiseModel(Generation gen, double t1_ns, double t2_ns, double single_qubit_gate_error, double two_qubit_gate_error)
Construct a new Qb Noise Model object IMPORTANT: This is for testability only whereby we allow for variation to T1, T2, and gate error value to verify the noise model.
- Parameters:
gen – Specifies the noise model generation
t1_ns – T1 value to set (in nanoseconds)
t2_ns – T2 value to set (in nanoseconds)
single_qubit_gate_error – single qubit gate error (prob between 0 and 1)
two_qubit_gate_error – two qubit gate error (prob between 0 and 1)
-
EmulatorNoiseModel(Generation gen, double t1_ns, double t2_ns, double single_qubit_gate_error, double two_qubit_gate_error, double p_01, double p_10)
Construct a new Qb Noise Model object IMPORTANT: This is for testability only whereby we allow for variation to T1, T2, SPAM and gate error value to verify the noise model.
- Parameters:
gen – Specifies the noise model generation
t1_ns – T1 value to set (in nanoseconds)
t2_ns – T2 value to set (in nanoseconds)
single_qubit_gate_error – single qubit gate error (prob between 0 and 1)
two_qubit_gate_error – two qubit gate error (prob between 0 and 1)
p_01 – probability of reading out the 0 state when the 1 state is prepared (prob between 0 and 1)
p_10 – probability of reading out the 1 state when the 0 state is prepared (prob between 0 and 1)
-
ReadoutError get_ro_errors(size_t qubit) const
Get the ro errors of a qubit.
- Parameters:
qubit – Qubit index
- Returns:
Readout errors
-
inline NoiseProperties &get_noise_props()
Get the noise props object.
- Returns:
NoiseProperties associated with the noise model.
Protected Attributes
-
NoiseProperties m_noise_prop
Private Functions
-
void setup_48_qubits(double t1_ns, double t2_ns, bool linear = false)
Set up noise model for 48 qubits.
- Parameters:
t1_ns – T1 value (in nanoseconds)
t2_ns – T2 value (in nanoseconds)
linear – False/Default: 4x4 grid, each NV cluster contains 3 qubits (Note: this is an obsolete noise model configuration whereby C13 spins are considered as qubits) True: Use linear connectivity model - 48 NV centers on a linear chain, where each NV contains 1 qubit.
-
void setup_64_qubits(double t1_ns, double t2_ns)
Set up an 8x8 grid of NV centres, 1 qubit per NV.
- Parameters:
t1_ns – T1 value (in nanoseconds)
t2_ns – T2 value (in nanoseconds)
-
void setup_2_qubits(double t1_ns, double t2_ns, std::optional<double> single_qubit_gate_error = std::nullopt, std::optional<double> two_qubit_gate_error = std::nullopt, std::optional<double> p_01 = std::nullopt, std::optional<double> p_10 = std::nullopt)
QDK V1 setup: two qubits q0 (NV centre), q1 (coupled C13 nucleus)
- Parameters:
t1_ns – T1 value (in nanoseconds)
t2_ns – T2 value (in nanoseconds)
single_qubit_gate_error – single qubit gate error (prob between 0 and 1)
two_qubit_gate_error – two qubit gate error (prob between 0 and 1)
p_01 – probability of reading out the 0 state when the 1 state is prepared (prob between 0 and 1)
p_10 – probability of reading out the 1 state when the 0 state is prepared (prob between 0 and 1)
-
void init_noise_props()
Initialize the noise properties.
-
void setup_gate_noise(size_t nb_qubits, double t1_ns, double t2_ns, double rx_gate_error, double ry_gate_error, double cz_gate_error, double rx_gate_duration_ns, double ry_gate_duration_ns, double cz_gate_duration_ns, std::vector<std::pair<double, double>> qb_roErrors, std::vector<std::pair<size_t, size_t>> qb_connectivity)
Set up 1- and 2-qubit gate noise, and connectivity info.
- Parameters:
nb_qubits – Number of qubits
t1_ns – T1 value (in nanoseconds)
t2_ns – T2 value (in nanoseconds)
rx_gate_error – Rx gate error
ry_gate_error – Ry gate error
cz_gate_error – Cz gate error
rx_gate_duration_ns – Rx gate duration (in nanoseconds)
ry_gate_duration_ns – Ry gate duration (in nanoseconds)
cz_gate_duration_ns – Cz gate duration (in nanoseconds)
qb_roErrors – Qubit read-out error
qb_connectivity – Qubit connectivity vector
-
void setup_NoiseModel_from_json(const std::string &file_path)
Construct NoiseModel (base class) object from a given json file.
- Parameters:
file_path – An std::string of the path to the json file.
-
inline EmulatorNoiseModel(Generation gen = Generation::nm2)