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) –

get_Hamiltonian()[source]
init_Hs(ann_oper)[source]
params: dict
class c3.system.chip.Coupling(name: str, desc: str = ' ', comment: str = ' ', connected: list = [], strength: numpy.float64 = 0.0, hamiltonian_func: function = 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

get_Hamiltonian()[source]
init_Hs(opers_list)[source]
params: dict
class c3.system.chip.Drive(name: str, desc: str = ' ', comment: str = ' ', connected: list = [], hamiltonian_func: function = None)[source]

Bases: c3.system.chip.LineComponent

Represents a drive line.

Parameters

connected (list) – all physical components receiving driving signals via this line

get_Hamiltonian()[source]
init_Hs(ann_opers: list)[source]
params: dict
class c3.system.chip.LineComponent(name: str, desc: str = ' ', comment: str = ' ', connected: list = [], hamiltonian_func: function = None)[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

params: dict
class c3.system.chip.PhysicalComponent(name: str, desc: str = ' ', comment: str = ' ', hilbert_dim: int = 0)[source]

Bases: c3.c3objs.C3obj

Represents the components making up a chip.

Parameters

hilbert_dim (int) – Dimension of the Hilbert space of this component

params: dict
set_subspace_index(index)[source]
class c3.system.chip.Qubit(name: str, desc: str = ' ', comment: str = ' ', hilbert_dim: int = 4, freq: numpy.float64 = 0.0, anhar: numpy.float64 = 0.0, t1: numpy.float64 = 0.0, t2star: numpy.float64 = 0.0, temp: numpy.float64 = 0.0)[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

init_Hs(ann_oper)[source]

Initialize the qubit Hamiltonians. If the dimension is higher than two, a Duffing oscillator is used.

Parameters

ann_oper (np.array) – Annihilation operator in the full Hilbert space

init_Ls(ann_oper)[source]

Initialize Lindbladian components.

Parameters

ann_oper (np.array) – Annihilation operator in the full Hilbert space

params: dict
class c3.system.chip.Resonator(name: str, desc: str = ' ', comment: str = ' ', hilbert_dim: int = 4, freq: numpy.float64 = 0.0)[source]

Bases: c3.system.chip.PhysicalComponent

Represents the element in a chip functioning as resonator.

Parameters

freq (np.float64) – frequency of the resonator

get_Hamiltonian()[source]

Compute the Hamiltonian.

get_Lindbladian(dims)[source]

NOT IMPLEMENTED

init_Hs(ann_oper)[source]

Initialize the Hamiltonian as a number operator

Parameters

ann_oper (np.array) – Annihilation operator in the full Hilbert space.

init_Ls(ann_oper)[source]

NOT IMPLEMENTED

params: dict
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) –

get_Hamiltonian()[source]
init_Hs(ann_oper)[source]
init_Ls(ann_oper)[source]
params: dict

Model module

The model class, containing information on the system and its modelling.

class c3.system.model.Model(subsystems, couplings, tasks)[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 modelling

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_Hamiltonians()[source]
get_Lindbladians()[source]
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

get_qubit_freqs()[source]
list_parameters()[source]
set_FR(use_FR)[source]

Setter for the frame rotation option for adjusting the individual rotating frames of qubits when using gate sequences

set_dephasing_strength(dephasing_strength)[source]
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_Hamiltonians()[source]

Recompute the matrix representations of the Hamiltonians.

update_Lindbladians()[source]

Return Lindbladian operators and their prefactors.

update_dressed()[source]

Compute the Hamiltonians in the dressed basis by diagonalizing the drift and applying the resulting transformation to the control Hamiltonians.

update_drift_eigen(ordered=True)[source]

Compute the eigendecomposition of the drift Hamiltonian and store both the Eigenenergies and the transformation matrix.

update_model()[source]

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.

confuse(pops)[source]

Apply the confusion (or misclassification) matrix to populations.

Parameters

pops (list) – Populations

Returns

Populations after misclassification.

Return type

list

params: dict
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

params: dict
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
  • meas_offset (Quantity) – Offset added to the measured signal.

  • meas_scale (Quantity) – Factor multiplied to the measured signal.

params: dict
rescale(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

class c3.system.tasks.Task(name: str = ' ', desc: str = ' ', comment: str = ' ')[source]

Bases: c3.c3objs.C3obj

Task that is part of the measurement setup.

params: dict

Module contents