System package¶
Submodules¶
Chip module¶
Component class and subclasses for the components making up the quantum device.
-
class
c3.system.chip.
AsymmetricTransmon
(name: str, desc: str = ' ', comment: str = ' ', hilbert_dim: int = 2, freq: numpy.float64 = 0.0, phi: numpy.float64 = 0.0, phi_0: numpy.float64 = 0.0, gamma: numpy.float64 = 0.0)[source]¶ Bases:
c3.system.chip.PhysicalComponent
Represents the element in a chip functioning as tunanble coupler.
- Parameters
freq (np.float64) – base frequency of the TC
phi_0 (np.float64) – half period of the phase dependant function
phi (np.fl) –
-
class
c3.system.chip.
Coupling
(name, desc=None, comment=None, strength=None, connected=None, params=None, hamiltonian_func=None)[source]¶ Bases:
c3.system.chip.LineComponent
Represents a coupling behaviour between elements.
- Parameters
strength (np.float64) – coupling strength
connected (list) – all physical components coupled via this specific coupling
-
class
c3.system.chip.
Drive
(**props)[source]¶ Bases:
c3.system.chip.LineComponent
Represents a drive line.
- Parameters
connected (list) – all physical components receiving driving signals via this line
-
class
c3.system.chip.
LineComponent
(**props)[source]¶ Bases:
c3.c3objs.C3obj
Represents the components connecting chip elements and drives.
- Parameters
connected (list) – specifies the component that are connected with this line
-
class
c3.system.chip.
PhysicalComponent
(**props)[source]¶ Bases:
c3.c3objs.C3obj
Represents the components making up a chip.
- Parameters
hilbert_dim (int) – Dimension of the Hilbert space of this component
-
class
c3.system.chip.
Qubit
(name, hilbert_dim, desc=None, comment=None, freq=None, anhar=None, t1=None, t2star=None, temp=None, params=None)[source]¶ Bases:
c3.system.chip.PhysicalComponent
Represents the element in a chip functioning as qubit.
- Parameters
freq (np.float64) – frequency of the qubit
anhar (np.float64) – anharmonicity of the qubit. defined as w01 - w12
t1 (np.float64) – t1, the time decay of the qubit due to dissipation
t2star (np.float64) – t2star, the time decay of the qubit due to pure dephasing
temp (np.float64) – temperature of the qubit, used to determine the Boltzmann distribution of energy level populations
-
get_Hamiltonian
()[source]¶ Compute the Hamiltonian. Multiplies the number operator with the frequency and anharmonicity with the Duffing part and returns their sum.
- Returns
Hamiltonian
- Return type
tf.Tensor
-
get_Lindbladian
(dims)[source]¶ Compute the Lindbladian, based on relaxation, dephasing constants and finite temperature.
- Returns
Hamiltonian
- Return type
tf.Tensor
-
class
c3.system.chip.
Resonator
(**props)[source]¶ Bases:
c3.system.chip.PhysicalComponent
Represents the element in a chip functioning as resonator.
- Parameters
freq (np.float64) – frequency of the resonator
-
class
c3.system.chip.
SymmetricTransmon
(name: str, desc: str = ' ', comment: str = ' ', hilbert_dim: int = 2, freq: numpy.float64 = 0.0, phi: numpy.float64 = 0.0, phi_0: numpy.float64 = 0.0)[source]¶ Bases:
c3.system.chip.PhysicalComponent
Represents the element in a chip functioning as tunanble coupler.
- Parameters
freq (np.float64) – base frequency of the TC
phi_0 (np.float64) – half period of the phase dependant function
phi (np.fl) –
Model module¶
The model class, containing information on the system and its modelling.
-
class
c3.system.model.
Model
(subsystems=None, couplings=None, tasks=None)[source]¶ Bases:
object
What the theorist thinks about from the system.
Class to store information about our system/problem/device. Different models can represent the same system.
- Parameters
subsystems (list) – List of individual, non-interacting physical components like qubits or resonators
couplings (list) – List of interaction operators between subsystems, like couplings or drives.
tasks (list) – Badly named list of processing steps like line distortions and read out modeling
-
H0
¶ - Type
- class
Drift Hamiltonian
-
get_Frame_Rotation
(t_final: numpy.float64, freqs: dict, framechanges: dict)[source]¶ Compute the frame rotation needed to align Lab frame and rotating Eigenframes of the qubits.
- Parameters
t_final (tf.float64) – Gate length
freqs (list) – Frequencies of the local oscillators.
framechanges (list) – List of framechanges. A phase shift applied to the control signal to compensate relative phases of drive oscillator and qubit.
- Returns
A (diagonal) propagator that adjust phases
- Return type
tf.Tensor
-
get_dephasing_channel
(t_final, amps)[source]¶ Compute the matrix of the dephasing channel to be applied on the operation.
- Parameters
t_final (tf.float64) – Duration of the operation.
amps (dict of tf.float64) – Dictionary of average amplitude on each drive line.
- Returns
Matrix representation of the dephasing channel.
- Return type
tf.tensor
-
read_config
(filepath: str) → None[source]¶ Load a file and parse it to create a Model object.
- Parameters
filepath (str) – Location of the configuration file
-
set_FR
(use_FR)[source]¶ Setter for the frame rotation option for adjusting the individual rotating frames of qubits when using gate sequences
-
set_dressed
(dressed)[source]¶ Go to a dressed frame where static couplings have been eliminated.
- Parameters
dressed (boolean) –
-
set_lindbladian
(lindbladian)[source]¶ Set whether to include open system dynamics.
- Parameters
lindbladian (boolean) –
-
update_dressed
()[source]¶ Compute the Hamiltonians in the dressed basis by diagonalizing the drift and applying the resulting transformation to the control Hamiltonians.
Tasks module¶
-
class
c3.system.tasks.
ConfusionMatrix
(name: str = 'conf_matrix', desc: str = ' ', comment: str = ' ', **confusion_rows)[source]¶ Bases:
c3.system.tasks.Task
Allows for misclassificaiton of readout measurement.
-
class
c3.system.tasks.
InitialiseGround
(name: str = 'init_ground', desc: str = ' ', comment: str = ' ', init_temp: c3.c3objs.Quantity = None)[source]¶ Bases:
c3.system.tasks.Task
Initialise the ground state with a given thermal distribution.
-
initialise
(drift_H, lindbladian=False, init_temp=None)[source]¶ Prepare the initial state of the system. At the moment finite temperature requires open system dynamics.
- Parameters
drift_H (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
-
-
class
c3.system.tasks.
MeasurementRescale
(name: str = 'meas_rescale', desc: str = ' ', comment: str = ' ', meas_offset: c3.c3objs.Quantity = None, meas_scale: c3.c3objs.Quantity = None)[source]¶ Bases:
c3.system.tasks.Task
Rescale the result of the measurements. This is usually done to account for preparation errors.
- Parameters
-
class
c3.system.tasks.
Task
(name: str = ' ', desc: str = ' ', comment: str = ' ')[source]¶ Bases:
c3.c3objs.C3obj
Task that is part of the measurement setup.