paraqeet.model.transmon.Transmon#
- class paraqeet.model.transmon.Transmon(dimension, frequency, anharmonicity, drives=None, t1=None, temp=None, t2star=None)#
Bases:
DifferentiableHamiltonianHamiltonian 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)#
Methods
__init__(dimension, frequency, anharmonicity)Get the dimension of the Transmon system.
Return a list tuples of decay rates and collapse operators for each subsystem.
Return decay rate for T1, T2star and Temp respectively.
get_gradient_at_timestep(time)Get the gradient of the drive.
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
Get the optimizable parameters
Get the anharmonicity of the Transmon system.
Return the list of Drives of the system.
Get the frequency of the Transmon system.
Get the name of the parameter.
Get the optimizable parameters
Get the t1 of the resonator.
Get the t2star of the resonator.
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]
- dimension()#
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]
- get_collapseops()#
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()#
Return decay rate for T1, T2star and Temp respectively.
- Return type:
list[Array]
- get_gradient_at_timestep(time)#
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()#
Get parameters of the model.
- Returns:
Returns the list of parameters of the system.
- Return type:
List[Quantity]
- get_value(times)#
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)#
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)#
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)#
Set all optimizable parameters in the optimization.
- set_optimizable_parameters(params)#
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