paraqeet.model.transmon.Transmon#

class paraqeet.model.transmon.Transmon(dimension, frequency, anharmonicity, drives=None, t1=None, temp=None, t2star=None)[source]#

Bases: DifferentiableHamiltonian

Hamiltonian of an anharmonic oscillator.

Optimizable parameters are the ground frequency and the anharmonicity.

Parameters:
  • dimension (int) – Dimension of the anharmonic oscillator.

  • frequency (Quantity) – Frequency of the anharmonic oscillator.

  • anharmonicity (Quantity) – Anharmonicity of the oscillator.

  • drives (list[Drive]) – List of time-dependent drives of the subsystem.

  • t1 (Quantity | None)

  • temp (Quantity | None)

  • t2star (Quantity | None)

__init__(dimension, frequency, anharmonicity, drives=None, t1=None, temp=None, t2star=None)[source]#
Parameters:

Methods

__init__(dimension, frequency, anharmonicity)

dimension()

Get the dimension of the Transmon system.

get_collapseops()

Return a list tuples of decay rates and collapse operators for each subsystem.

get_decay_rates()

Return decay rate for T1, T2star and Temp respectively.

get_gradient_at_timestep(time)

Get the gradient of the drive.

get_parameters()

Get parameters of the model.

get_value(times)

Return the matrix representation of the Hamiltonian.

get_value_and_gradient(times)

Compute value and gradient for given timesteps.

get_value_at_timestep(timestep)

Get the drive matrix.

set_all_optimizable_parameters(all_params)

Set all optimizable parameters in the optimization.

set_optimizable_parameters(params)

Set which parameters associated with the object shall be considered during optimization.

Attributes

all_optimizable_parameters

Get the optimizable parameters

anharmonicity

Get the anharmonicity of the Transmon system.

drives

Return the list of Drives of the system.

frequency

Get the frequency of the Transmon system.

name

Get the name of the parameter.

optimizable_parameters

Get the optimizable parameters

t1

Get the t1 of the resonator.

t2star

Get the t2star of the resonator.

temp

Get the temp of the resonator.

property all_optimizable_parameters: list[Quantity]#

Get the optimizable parameters

Returns:

The list of all the optimizable parameters considered in the optimization

Return type:

list[Quantity]

property anharmonicity: Quantity#

Get the anharmonicity of the Transmon system.

dimension()[source]#

Get the dimension of the Transmon system.

Return type:

int

property drives: list[Drive]#

Return the list of Drives of the system.

Returns:

Returns a list of time-dependent drives of the system.

Return type:

list[Drive]

property frequency: Quantity#

Get the frequency of the Transmon system.

get_collapseops()[source]#

Return a list tuples of decay rates and collapse operators for each subsystem.

Returns:

List of collapse operators

Return type:

list[tuple[Array, Array]]

get_decay_rates()[source]#

Return decay rate for T1, T2star and Temp respectively.

Return type:

list[Array]

get_gradient_at_timestep(time)[source]#

Get the gradient of the drive.

Parameters:
  • t (Array) – Single time stamp.

  • time (float)

Returns:

Returns the gradients of the drive.

Return type:

Array

get_parameters()[source]#

Get parameters of the model.

Returns:

Returns the list of parameters of the system.

Return type:

List[Quantity]

get_value(times)[source]#

Return the matrix representation of the Hamiltonian.

The default implementation calls get_value_at_timestep for each time step. Subclasses can override this function for a more efficient implementation.

Parameters:

times (Array) – Vector of time samples.

Returns:

Hamiltonian of shape [t, n, n] with ‘t’ as time and ‘n’ as the Hilbert space dimension.

Return type:

Array

get_value_and_gradient(times)[source]#

Compute value and gradient for given timesteps. The gradient call uses vmap over at_timestep methods.

Parameters:

times (Array)

Return type:

tuple[Array, Array]

get_value_at_timestep(timestep)[source]#

Get the drive matrix.

Parameters:

timestep (Array) – Vector of time samples.

Returns:

The repeated drive matrix.

Return type:

Array

property name: str | None#

Get the name of the parameter.

Returns:

Name of the parameter.

Return type:

str | None

property optimizable_parameters: list[Quantity]#

Get the optimizable parameters

Returns:

The list of optimizable parameters associated with the object.

Return type:

list[Quantity]

set_all_optimizable_parameters(all_params)[source]#

Set all optimizable parameters in the optimization.

Parameters:
  • params (List[Quantity]) – List of optimizable parameters to be set.

  • all_params (list[Quantity])

Return type:

None

set_optimizable_parameters(params)[source]#

Set which parameters associated with the object shall be considered during optimization.

All quantities that are not in the response of get_parameters will be filtered out. This function is called by the optimizer before gradient based optimization to tell the layers which gradients to compute.

Parameters:

params (list[Quantity]) – List of optimizable parameters to be set.

Return type:

None

property t1: Quantity | None#

Get the t1 of the resonator.

property t2star: Quantity | None#

Get the t2star of the resonator.

property temp: Quantity | None#

Get the temp of the resonator.