Class QbNoiseModel

Inheritance Relationships

Base Type

Class Documentation

class QbNoiseModel : public qb::NoiseModel

QB Noise Model: Noise model of QB’s NV quantum devices.

Public Types

enum class Generation

Enum to denote noise model generation.

Values:

enumerator nm1
enumerator nm2
enumerator nm3
enumerator qdk1
enumerator dqc2

Public Functions

inline QbNoiseModel(Generation gen = Generation::nm2)

Construct a new Qb Noise Model object.

Parameters:

gen – Specifies the noise model generation

QbNoiseModel(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)

QbNoiseModel(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)

QbNoiseModel(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)

Set up noise model for 48 qubits: 4x4 grid, each NV cluster contains 3 qubits Note: this is an obsolete noise model configuration whereby C13 spins are considered as qubits.

Parameters:
  • t1_ns – T1 value (in nanoseconds)

  • t2_ns – T2 value (in nanoseconds)

void setup_48_qubits_linear(double t1_ns, double t2_ns)

Set up noise model for 48 qubits with linearly increasing qubit index: 48 NV centres in a 1-dimensional grid, each NV centre contains 1 qubit. Note: this is an obsolete noise model configuration whereby C13 spins are considered as qubits.

Parameters:
  • t1_ns – T1 value (in nanoseconds)

  • t2_ns – T2 value (in nanoseconds)

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)

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)

void setup_2_qubits(double t1_ns, double t2_ns, double single_qubit_gate_error, double two_qubit_gate_error)

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)

void setup_2_qubits(double t1_ns, double t2_ns, double single_qubit_gate_error, double two_qubit_gate_error, double p_01, double p_10)

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, std::vector<std::pair<size_t, size_t>> qb_connectivity)

Set up 1-qubit gate noise and 2-qubit gate noise.

Parameters:
  • nb_qubits – Number of qubits

  • t1_ns – T1 value (in nanoseconds)

  • t2_ns – T2 valus (in nanoseconds)

  • qb_connectivity – Qubit connectivity vector