ExchangeInteraction¶
- class ExchangeInteraction(subsystems, g)[source]¶
Bases:
QuantumSystemModel
An exchange interaction between two systems.
Represents the Hamiltonian \(H = g X \otimes X\), where \(g\) is the strength of the coupling, and the two \(X\) operators act on the two subsystems.
Initialize.
- Parameters:
g – The coupling strength.
Methods
- dressed_basis(ordered_subsystems=None, ordering='default')¶
Get the DressedBasis object for the system.
- Parameters:
ordered_subsystems (
Optional
[List
]) – Subsystems in the desired order.ordering (
str
) – Ordering convention for the eigenvectors.
- get_Solver(rotating_frame=None, array_library=None, vectorized=False, validate=False, ordered_subsystems=None)¶
Build concrete operators and instantiate solver.
Note that the
map_signal_dictionary()
method can be used to map signals given in a dictionary format{drive_coefficient: s}
, wheredrive_coefficient
is a string indrive_hamiltonian_coefficients + drive_dissipator_coefficients
ands
is a signal, to the required formatting of thesignals
argument inSolver.solve()
.- Parameters:
rotating_frame (
Union
[ndarray
,AbstractSubsystemOperator
,None
]) – Rotating frame to define the solver in.array_library (
Optional
[str
]) – array library to use (e.g. “numpy”, “jax”, “jax_sparse”, “scipy_sparse”)vectorized (
bool
) – If doing lindblad simulation, whether or not to vectorize.validate (
bool
) – Whether or not to validate the operators.ordered_subsystems (
Optional
[List
[Subsystem
]]) – Chosen non-standard ordering for building the solver.
- map_signal_dictionary(signals)¶
Map labelled signal dictionary to the required format for for the signals argument of a
Solver
generated from theget_Solver()
method.- Parameters:
signals (
List
[Union
[ndarray
,number
,int
,float
,complex
,Tracer
,Array
,spmatrix
,BCOO
,list
,Signal
]]) – Signals in dictionary format{label: s}
, forlabel
a string indrive_hamiltonian_coefficients + drive_dissipator_coefficients
ands
a signal.- Returns:
A container of signals formatted for the
signals
argument of theSolver
methodSolver.solve()
.
- solve(signals, t_span, y0, rotating_frame=None, array_library=None, vectorized=False, ordered_subsystems=None, **kwargs)¶
Solve the model.
This method internally constructs a
Solver
instance with fully-formed arrays according to the abstract model specified in this instance, and then solves. Note that thesignals
argument for this method expects a dictionary format mapping the coefficient labels for the drive terms specified at instantiation to the desired coefficient.- Parameters:
signals (
dict
) – Signals in dictionary format{label: s}
, wherelabel
is a string indrive_hamiltonian_coefficients + drive_dissipator_coefficients
, ands
is the corresponding singal.t_span (
Union
[ndarray
,number
,int
,float
,complex
,Tracer
,Array
,spmatrix
,BCOO
,list
]) – Time interval to integrate over.y0 (
Union
[ndarray
,number
,int
,float
,complex
,Tracer
,Array
,spmatrix
,BCOO
,list
,QuantumState
,BaseOperator
]) – Initial state.rotating_frame (
Union
[ndarray
,AbstractSubsystemOperator
,None
]) – Rotating frame to transform the model into. Rotating frames which are diagonal can be supplied as a 1d array of the diagonal elements, to explicitly indicate that they are diagonal.array_library (
Optional
[str
]) – Array library to use for storing operators of underlying model. See the model evaluation section of the Models API documentation for a more detailed description of this argument.vectorized (
Optional
[bool
]) – If including dissipator terms, whether or not to construct theLindbladModel
in vectorized form. See the model evaluation section of the Models API documentation for a more detailed description of this argument.ordered_subsystems (
Optional
[List
[Subsystem
]]) – List ofSubsystem
instances explicitly specifying the ordering of the subsystems desired when building the concrete model.kwargs – Keyword arguments to pass through to
Solver.solve
.
Attributes
- drive_dissipator_coefficients¶
The drive dissipator coefficients.
- drive_dissipators¶
The model drive dissipators.
- drive_hamiltonian_coefficients¶
The drive Hamiltonian coefficients.
- drive_hamiltonians¶
The model drive Hamiltonians.
- static_dissipators¶
The model static dissipators.
- static_hamiltonian¶
The model static Hamiltonian.
- subsystems¶
The model subsystems.