paraqeet.model.open_system.OpenSystem#

class paraqeet.model.open_system.OpenSystem(hamiltonian, sparse_superop=False, ode_propagation=False)[source]#

Bases: EquationOfMotion

Model of an open quantum system, defined by the Hamiltonian and collapse operators. Its dynamics given by the Lindblad master equation.

Currently the gradients for ODE propagation methods is not supported.

Parameters:
  • hamiltonian (Hamiltonian) – Matrix representation of a Hamiltonian.

  • sparse_superop (bool) – Flag to save superoperator as sparse matrices.

  • ode_propagation (bool) – Flag to use ODE methods for propagation. If true then get_value method returns list of Hamiltonian (with time) and collapse operator. Else returns Lindblad superoperator.

__init__(hamiltonian, sparse_superop=False, ode_propagation=False)[source]#
Parameters:

Methods

__init__(hamiltonian[, sparse_superop, ...])

get_collapseops()

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

get_parameters()

Get a list of optimizable parameters.

get_right_hand_side(time, state)

Return the right-hand side of the equations of motion.

get_value(times)

Computes the right hand side of the Schrödinger equation without multiplying the state.

get_value_and_gradient(times)

Compute the gradient of get_value.

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

name

Get the name of the parameter.

ode_propagation

Flag to set method of propagation to ODE.

optimizable_parameters

Get the optimizable parameters

sparse_superop

Flag to store superoperators as sparse matrices.

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]

get_collapseops()[source]#

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

Returns:

list of collapse operators

Return type:

list[tuple[float, Array]]

get_parameters()[source]#

Get a list of optimizable parameters.

Returns:

list of optimizable parameters of the system.

Return type:

list[Quantity]

get_right_hand_side(time, state)[source]#

Return the right-hand side of the equations of motion.

The format depends on the implementation and could for example be a state vector or a matrix. Default implementation assumes a homogeneous ODE with matrix operator given by self.getMatrix().

Parameters:
  • time (Array) – Any one-dimensional vector of timestamps.

  • state (Array)

Returns:

The right-hand side of the equation of motion at each time stamp.

Return type:

Array

get_value(times)[source]#

Computes the right hand side of the Schrödinger equation without multiplying the state. Used for unitary solvers.

Parameters:

times (Array) – Vector of time samples

Returns:

RHS with dimension [t, n, n] with t: time, n: hilbert space

Return type:

Array

get_value_and_gradient(times)[source]#

Compute the gradient of get_value.

Parameters:

times (Array)

Return type:

tuple[Array, Array]

property name: str | None#

Get the name of the parameter.

Returns:

Name of the parameter.

Return type:

str | None

property ode_propagation: bool#

Flag to set method of propagation to ODE.

Returns:

Flag to use ODE propagation.

Return type:

bool

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 sparse_superop: bool#

Flag to store superoperators as sparse matrices.

Returns:

Flag to store sparse matrices.

Return type:

bool