c3.libraries.chip

Component class and subclasses for the components making up the quantum device.

Module Contents

c3.libraries.chip.dev_reg_deco(func)[source]

Decorator for making registry of functions

class c3.libraries.chip.PhysicalComponent(**props)[source]

Bases: c3.c3objs.C3obj

Inheritance diagram of c3.libraries.chip.PhysicalComponent

Represents the components making up a chip.

Parameters

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

get_transformed_hamiltonians(self, transform: tensorflow.Tensor = None)[source]

get transformed hamiltonians with given applied transformation. The Hamiltonians are assumed to be stored in Hs. :param transform: transform to be applied to the hamiltonians. Default: None for returning the hamiltonians without transformation applied.

abstract get_Hamiltonian(self, signal: Union[dict, bool] = None, transform: tensorflow.Tensor = None) Dict[str, tensorflow.Tensor][source]

Compute the Hamiltonian. :param signal: dictionary with signals to be used a time dependend Hamiltonian. By default “values” key will be used.

If true value control hamiltonian will be returned, used for later combination of signal and hamiltonians.

Parameters

transform – transform the hamiltonian, e.g. for expressing the hamiltonian in the expressed basis. Use this function if transform will be necessary and signal is given, in order to apply the transform only on single hamiltonians instead of all timeslices.

__str__(self) str

Return str(self).

class c3.libraries.chip.Qubit(name, hilbert_dim, desc=None, comment=None, freq: c3.c3objs.Quantity = None, anhar: c3.c3objs.Quantity = None, t1: c3.c3objs.Quantity = None, t2star: c3.c3objs.Quantity = None, temp: c3.c3objs.Quantity = None, params=None)[source]

Bases: PhysicalComponent

Inheritance diagram of c3.libraries.chip.Qubit

Represents the element in a chip functioning as qubit.

Parameters
  • freq (Quantity) – frequency of the qubit

  • anhar (Quantity) – anharmonicity of the qubit. defined as w01 - w12

  • t1 (Quantity) – t1, the time decay of the qubit due to dissipation

  • t2star (Quantity) – t2star, the time decay of the qubit due to pure dephasing

  • temp (Quantity) – temperature of the qubit, used to determine the Boltzmann distribution of energy level populations

init_Hs(self, 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

get_Hamiltonian(self, signal: Union[dict, bool] = None, transform: tensorflow.Tensor = None)[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

init_Ls(self, ann_oper)[source]

Initialize Lindbladian components.

Parameters

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

get_Lindbladian(self, dims)[source]

Compute the Lindbladian, based on relaxation, dephasing constants and finite temperature.

Returns

Hamiltonian

Return type

tf.Tensor

get_transformed_hamiltonians(self, transform: tensorflow.Tensor = None)

get transformed hamiltonians with given applied transformation. The Hamiltonians are assumed to be stored in Hs. :param transform: transform to be applied to the hamiltonians. Default: None for returning the hamiltonians without transformation applied.

__str__(self) str

Return str(self).

class c3.libraries.chip.Resonator(**props)[source]

Bases: PhysicalComponent

Inheritance diagram of c3.libraries.chip.Resonator

Represents the element in a chip functioning as resonator.

Parameters

freq (Quantity) – frequency of the resonator

init_Hs(self, ann_oper)[source]

Initialize the Hamiltonian as a number operator

Parameters

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

init_Ls(self, ann_oper)[source]

NOT IMPLEMENTED

get_Hamiltonian(self, signal: Union[dict, bool] = None, transform: tensorflow.Tensor = None)[source]

Compute the Hamiltonian.

get_Lindbladian(self, dims)[source]

NOT IMPLEMENTED

get_transformed_hamiltonians(self, transform: tensorflow.Tensor = None)

get transformed hamiltonians with given applied transformation. The Hamiltonians are assumed to be stored in Hs. :param transform: transform to be applied to the hamiltonians. Default: None for returning the hamiltonians without transformation applied.

__str__(self) str

Return str(self).

class c3.libraries.chip.Transmon(name: str, desc: str = None, comment: str = None, hilbert_dim: int = None, freq: c3.c3objs.Quantity = None, anhar: c3.c3objs.Quantity = None, phi: c3.c3objs.Quantity = None, phi_0: c3.c3objs.Quantity = None, gamma: c3.c3objs.Quantity = None, d: c3.c3objs.Quantity = None, t1: c3.c3objs.Quantity = None, t2star: c3.c3objs.Quantity = None, temp: c3.c3objs.Quantity = None, params=None)[source]

Bases: PhysicalComponent

Inheritance diagram of c3.libraries.chip.Transmon

Represents the element in a chip functioning as tunanble transmon qubit.

Parameters
  • freq (Quantity) – base frequency of the Transmon

  • phi_0 (Quantity) – half period of the phase dependant function

  • phi (Quantity) – flux position

init_Ls(self, ann_oper)[source]

Initialize Lindbladian components.

Parameters

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

get_Hamiltonian(self, signal: Union[dict, bool] = None, transform: tensorflow.Tensor = None)[source]

Compute the Hamiltonian. :param signal: dictionary with signals to be used a time dependend Hamiltonian. By default “values” key will be used.

If true value control hamiltonian will be returned, used for later combination of signal and hamiltonians.

Parameters

transform – transform the hamiltonian, e.g. for expressing the hamiltonian in the expressed basis. Use this function if transform will be necessary and signal is given, in order to apply the transform only on single hamiltonians instead of all timeslices.

get_Lindbladian(self, dims)[source]

Compute the Lindbladian, based on relaxation, dephasing constants and finite temperature.

Returns

Hamiltonian

Return type

tf.Tensor

get_transformed_hamiltonians(self, transform: tensorflow.Tensor = None)

get transformed hamiltonians with given applied transformation. The Hamiltonians are assumed to be stored in Hs. :param transform: transform to be applied to the hamiltonians. Default: None for returning the hamiltonians without transformation applied.

__str__(self) str

Return str(self).

class c3.libraries.chip.TransmonExpanded(name: str, desc: str = None, comment: str = None, hilbert_dim: int = None, freq: c3.c3objs.Quantity = None, anhar: c3.c3objs.Quantity = None, phi: c3.c3objs.Quantity = None, phi_0: c3.c3objs.Quantity = None, gamma: c3.c3objs.Quantity = None, d: c3.c3objs.Quantity = None, t1: c3.c3objs.Quantity = None, t2star: c3.c3objs.Quantity = None, temp: c3.c3objs.Quantity = None, params=None)[source]

Bases: Transmon

Inheritance diagram of c3.libraries.chip.TransmonExpanded

Represents the element in a chip functioning as tunanble transmon qubit.

Parameters
  • freq (Quantity) – base frequency of the Transmon

  • phi_0 (Quantity) – half period of the phase dependant function

  • phi (Quantity) – flux position

get_Hamiltonian(self, signal: Union[dict, bool] = None, transform: tensorflow.Tensor = None)[source]

Compute the Hamiltonian. :param signal: dictionary with signals to be used a time dependend Hamiltonian. By default “values” key will be used.

If true value control hamiltonian will be returned, used for later combination of signal and hamiltonians.

Parameters

transform – transform the hamiltonian, e.g. for expressing the hamiltonian in the expressed basis. Use this function if transform will be necessary and signal is given, in order to apply the transform only on single hamiltonians instead of all timeslices.

init_Ls(self, ann_oper)

Initialize Lindbladian components.

Parameters

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

get_Lindbladian(self, dims)

Compute the Lindbladian, based on relaxation, dephasing constants and finite temperature.

Returns

Hamiltonian

Return type

tf.Tensor

get_transformed_hamiltonians(self, transform: tensorflow.Tensor = None)

get transformed hamiltonians with given applied transformation. The Hamiltonians are assumed to be stored in Hs. :param transform: transform to be applied to the hamiltonians. Default: None for returning the hamiltonians without transformation applied.

__str__(self) str

Return str(self).

class c3.libraries.chip.CShuntFluxQubitCos(name: str, desc: str = None, comment: str = None, hilbert_dim: int = None, calc_dim: int = None, EC: c3.c3objs.Quantity = None, EJ: c3.c3objs.Quantity = None, EL: c3.c3objs.Quantity = None, phi: c3.c3objs.Quantity = None, phi_0: c3.c3objs.Quantity = None, gamma: c3.c3objs.Quantity = None, d: c3.c3objs.Quantity = None, t1: c3.c3objs.Quantity = None, t2star: c3.c3objs.Quantity = None, temp: c3.c3objs.Quantity = None, anhar: c3.c3objs.Quantity = None, params=None)[source]

Bases: Qubit

Inheritance diagram of c3.libraries.chip.CShuntFluxQubitCos

Represents the element in a chip functioning as qubit.

Parameters
  • freq (Quantity) – frequency of the qubit

  • anhar (Quantity) – anharmonicity of the qubit. defined as w01 - w12

  • t1 (Quantity) – t1, the time decay of the qubit due to dissipation

  • t2star (Quantity) – t2star, the time decay of the qubit due to pure dephasing

  • temp (Quantity) – temperature of the qubit, used to determine the Boltzmann distribution of energy level populations

init_Hs(self, 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

get_Hamiltonian(self, signal: Union[dict, bool] = None, transform: tensorflow.Tensor = None)[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

init_Ls(self, ann_oper)

Initialize Lindbladian components.

Parameters

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

get_Lindbladian(self, dims)

Compute the Lindbladian, based on relaxation, dephasing constants and finite temperature.

Returns

Hamiltonian

Return type

tf.Tensor

get_transformed_hamiltonians(self, transform: tensorflow.Tensor = None)

get transformed hamiltonians with given applied transformation. The Hamiltonians are assumed to be stored in Hs. :param transform: transform to be applied to the hamiltonians. Default: None for returning the hamiltonians without transformation applied.

__str__(self) str

Return str(self).

class c3.libraries.chip.CShuntFluxQubit(name: str, desc: str = None, comment: str = None, hilbert_dim: int = None, calc_dim: int = None, EC: c3.c3objs.Quantity = None, EJ: c3.c3objs.Quantity = None, EL: c3.c3objs.Quantity = None, phi: c3.c3objs.Quantity = None, phi_0: c3.c3objs.Quantity = None, gamma: c3.c3objs.Quantity = None, d: c3.c3objs.Quantity = None, t1: c3.c3objs.Quantity = None, t2star: c3.c3objs.Quantity = None, temp: c3.c3objs.Quantity = None, anhar: c3.c3objs.Quantity = None, params=dict(), resolution=None)[source]

Bases: Qubit

Inheritance diagram of c3.libraries.chip.CShuntFluxQubit

Represents the element in a chip functioning as qubit.

Parameters
  • freq (Quantity) – frequency of the qubit

  • anhar (Quantity) – anharmonicity of the qubit. defined as w01 - w12

  • t1 (Quantity) – t1, the time decay of the qubit due to dissipation

  • t2star (Quantity) – t2star, the time decay of the qubit due to pure dephasing

  • temp (Quantity) – temperature of the qubit, used to determine the Boltzmann distribution of energy level populations

init_Hs(self, ann_oper)[source]

initialize Hamiltonians for cubic hamiltinian :param ann_oper: Annihilation operator in the full Hilbert space :type ann_oper: np.array

get_Hamiltonian(self, signal: Union[dict, bool] = None, transform: tensorflow.Tensor = None) tensorflow.Tensor[source]

Calculate the hamiltonian :returns: Hamiltonian :rtype: tf.Tensor

init_Ls(self, ann_oper)

Initialize Lindbladian components.

Parameters

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

get_Lindbladian(self, dims)

Compute the Lindbladian, based on relaxation, dephasing constants and finite temperature.

Returns

Hamiltonian

Return type

tf.Tensor

get_transformed_hamiltonians(self, transform: tensorflow.Tensor = None)

get transformed hamiltonians with given applied transformation. The Hamiltonians are assumed to be stored in Hs. :param transform: transform to be applied to the hamiltonians. Default: None for returning the hamiltonians without transformation applied.

__str__(self) str

Return str(self).

class c3.libraries.chip.Fluxonium(name: str, desc: str = None, comment: str = None, hilbert_dim: int = None, calc_dim: int = None, EC: c3.c3objs.Quantity = None, EJ: c3.c3objs.Quantity = None, EL: c3.c3objs.Quantity = None, phi: c3.c3objs.Quantity = None, phi_0: c3.c3objs.Quantity = None, gamma: c3.c3objs.Quantity = None, t1: c3.c3objs.Quantity = None, t2star: c3.c3objs.Quantity = None, temp: c3.c3objs.Quantity = None, params=None)[source]

Bases: CShuntFluxQubit

Inheritance diagram of c3.libraries.chip.Fluxonium

Represents the element in a chip functioning as qubit.

Parameters
  • freq (Quantity) – frequency of the qubit

  • anhar (Quantity) – anharmonicity of the qubit. defined as w01 - w12

  • t1 (Quantity) – t1, the time decay of the qubit due to dissipation

  • t2star (Quantity) – t2star, the time decay of the qubit due to pure dephasing

  • temp (Quantity) – temperature of the qubit, used to determine the Boltzmann distribution of energy level populations

init_Hs(self, ann_oper)

initialize Hamiltonians for cubic hamiltinian :param ann_oper: Annihilation operator in the full Hilbert space :type ann_oper: np.array

get_Hamiltonian(self, signal: Union[dict, bool] = None, transform: tensorflow.Tensor = None) tensorflow.Tensor

Calculate the hamiltonian :returns: Hamiltonian :rtype: tf.Tensor

init_Ls(self, ann_oper)

Initialize Lindbladian components.

Parameters

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

get_Lindbladian(self, dims)

Compute the Lindbladian, based on relaxation, dephasing constants and finite temperature.

Returns

Hamiltonian

Return type

tf.Tensor

get_transformed_hamiltonians(self, transform: tensorflow.Tensor = None)

get transformed hamiltonians with given applied transformation. The Hamiltonians are assumed to be stored in Hs. :param transform: transform to be applied to the hamiltonians. Default: None for returning the hamiltonians without transformation applied.

__str__(self) str

Return str(self).

class c3.libraries.chip.SNAIL(name: str, desc: str = ' ', comment: str = ' ', hilbert_dim: int = 4, freq: c3.c3objs.Quantity = None, anhar: c3.c3objs.Quantity = None, beta: c3.c3objs.Quantity = None, t1: c3.c3objs.Quantity = None, t2star: c3.c3objs.Quantity = None, temp: c3.c3objs.Quantity = None, params: dict = None)[source]

Bases: Qubit

Inheritance diagram of c3.libraries.chip.SNAIL

Represents the element in a chip functioning as a three wave mixing element also knwon as a SNAIL. Reference: https://arxiv.org/pdf/1702.00869.pdf :param freq: frequency of the qubit :type freq: Quantity :param anhar: anharmonicity of the qubit. defined as w01 - w12 :type anhar: Quantity :param beta: third order non_linearity of the qubit. :type beta: Quantity :param t1: t1, the time decay of the qubit due to dissipation :type t1: Quantity :param t2star: t2star, the time decay of the qubit due to pure dephasing :type t2star: Quantity :param temp: temperature of the qubit, used to determine the Boltzmann distribution

of energy level populations

Parameters
  • beta. (Class is mostly an exact copy of the Qubit class. The only difference is the added third order non linearity with a prefactor) –

  • linearity (The only modification is the get hamiltonian and init hamiltonian definition. Also imported the necessary third order non) –

  • library. (from the hamiltonian) –

init_Hs(self, ann_oper)[source]

Initialize the SNAIL Hamiltonians. :param ann_oper: Annihilation operator in the full Hilbert space :type ann_oper: np.array

get_Hamiltonian(self, signal: Union[dict, bool] = None, transform: tensorflow.Tensor = None)[source]

Compute the Hamiltonian. Multiplies the number operator with the frequency and anharmonicity with the Duffing part and returns their sum. :returns: Hamiltonian :rtype: tf.Tensor

init_Ls(self, ann_oper)

Initialize Lindbladian components.

Parameters

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

get_Lindbladian(self, dims)

Compute the Lindbladian, based on relaxation, dephasing constants and finite temperature.

Returns

Hamiltonian

Return type

tf.Tensor

get_transformed_hamiltonians(self, transform: tensorflow.Tensor = None)

get transformed hamiltonians with given applied transformation. The Hamiltonians are assumed to be stored in Hs. :param transform: transform to be applied to the hamiltonians. Default: None for returning the hamiltonians without transformation applied.

__str__(self) str

Return str(self).

class c3.libraries.chip.LineComponent(**props)[source]

Bases: c3.c3objs.C3obj

Inheritance diagram of c3.libraries.chip.LineComponent

Represents the components connecting chip elements and drives.

Parameters

connected (list) – specifies the component that are connected with this line

__str__(self) str

Return str(self).

class c3.libraries.chip.Coupling(name, desc=None, comment=None, strength: c3.c3objs.Quantity = None, connected: List[str] = None, params=None, hamiltonian_func=None)[source]

Bases: LineComponent

Inheritance diagram of c3.libraries.chip.Coupling

Represents a coupling behaviour between elements.

Parameters
  • strength (Quantity) – coupling strength

  • connected (list) – all physical components coupled via this specific coupling

__str__(self) str

Return str(self).

class c3.libraries.chip.Drive(**props)[source]

Bases: LineComponent

Inheritance diagram of c3.libraries.chip.Drive

Represents a drive line.

Parameters

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

__str__(self) str

Return str(self).