c3.libraries.tasks
¶
Module Contents¶
- class c3.libraries.tasks.Task(name: str = ' ', desc: str = ' ', comment: str = ' ', params: dict = None)[source]¶
Bases:
c3.c3objs.C3obj
Task that is part of the measurement setup.
- __str__(self) str ¶
Return str(self).
- class c3.libraries.tasks.InitialiseGround(name: str = 'init_ground', desc: str = ' ', comment: str = ' ', init_temp: c3.c3objs.Quantity = None, params=None)[source]¶
Bases:
Task
Initialise the ground state with a given thermal distribution.
- initialise(self, drift_ham, lindbladian=False, init_temp=None)[source]¶
Prepare the initial state of the system. At the moment finite temperature requires open system dynamics.
- Parameters
drift_ham (tf.Tensor) – Drift Hamiltonian.
lindbladian (boolean) – Whether to include open system dynamics. Required for Temperature > 0.
init_temp (Quantity) – Temperature of the device.
- Returns
State or density vector
- Return type
tf.Tensor
- __str__(self) str ¶
Return str(self).
- class c3.libraries.tasks.ConfusionMatrix(name: str = 'conf_matrix', desc: str = ' ', comment: str = ' ', params=None, **confusion_rows)[source]¶
Bases:
Task
Allows for misclassificaiton of readout measurement.
- confuse(self, pops)[source]¶
Apply the confusion (or misclassification) matrix to populations.
- Parameters
pops (list) – Populations
- Returns
Populations after misclassification.
- Return type
list
- __str__(self) str ¶
Return str(self).
- class c3.libraries.tasks.MeasurementRescale(name: str = 'meas_rescale', desc: str = ' ', comment: str = ' ', meas_offset: c3.c3objs.Quantity = None, meas_scale: c3.c3objs.Quantity = None, params=None)[source]¶
Bases:
Task
Rescale the result of the measurements. This is usually done to account for preparation errors.
- Parameters
- rescale(self, pop1)[source]¶
Apply linear rescaling and offset to the readout value.
- Parameters
pop1 (tf.float64) – Population in first excited state.
- Returns
Population after rescaling.
- Return type
tf.float64
- __str__(self) str ¶
Return str(self).