InteractionTerm#
- class scqubits.core.hilbert_space.InteractionTerm(g_strength, operator_list, add_hc=False)[source]#
Class for specifying a term in the interaction Hamiltonian of a composite Hilbert space, and constructing the Hamiltonian in qutip.Qobj format. The expected form of the interaction term is of two possible types: 1. V = g A B C …, where A, B, C… are Hermitian operators in subsystems in subsystem_list, 2. V = g A B C… + h.c., where A, B, C… may be non-Hermitian
- Parameters:
g_strength (
Union
[float
,complex
]) – coefficient parametrizing the interaction strength.operator_list (
List
[Tuple
[int
,Union
[ndarray
,csc_matrix
,Callable
]]]) – list of tuples (subsys_index, operator)add_hc (
bool
) – If set to True, the interaction Hamiltonian is of type 2, and the Hermitian conjugate is added.
- Return type:
SerializableType
Methods
InteractionTerm.__init__
(g_strength, ...[, ...])InteractionTerm.broadcast
(event, **kwargs)Request a broadcast from CENTRAL_DISPATCH reporting event.
InteractionTerm.create_from_file
(filename)Read initdata and spectral data from file, and use those to create a new SpectrumData object.
InteractionTerm.deserialize
(io_data)Take the given IOData and return an instance of the described class, initialized with the data stored in io_data.
InteractionTerm.filewrite
(filename)Convenience method bound to the class.
InteractionTerm.hamiltonian
(subsystem_list)Returns the full Hamiltonian of the interacting quantum system described by the HilbertSpace object
InteractionTerm.id_wrap_all_ops
(...[, bare_esys])Returns a list of identity-wrapped operators, one for each operator in operator_list.
InteractionTerm.receive
(event, sender, **kwargs)Receive a message from CENTRAL_DISPATCH and initiate action on it.
Convert the content of the current class instance into IOData format.
Attributes
add_hc
Descriptor class for properties that are to be monitored for changes.
g_strength
Descriptor class for properties that are to be monitored for changes.
operator_list
Descriptor class for properties that are to be monitored for changes.
- broadcast(event, **kwargs)#
Request a broadcast from CENTRAL_DISPATCH reporting event.
- Parameters:
event (
str
) – event name from EVENTS**kwargs –
- Return type:
None
- classmethod create_from_file(filename)#
Read initdata and spectral data from file, and use those to create a new SpectrumData object.
- Returns:
new SpectrumData object, initialized with data read from file
- Return type:
- Parameters:
filename (str) –
- classmethod deserialize(io_data)#
Take the given IOData and return an instance of the described class, initialized with the data stored in io_data.
- Return type:
TypeVar
(SerializableType
, bound= Serializable)- Parameters:
io_data (IOData) –
- filewrite(filename)#
Convenience method bound to the class. Simply accesses the write function.
- Return type:
None
- Parameters:
filename (str) –
- hamiltonian(subsystem_list, bare_esys=None)[source]#
Returns the full Hamiltonian of the interacting quantum system described by the HilbertSpace object
- Parameters:
subsystem_list (
List
[Union
[QubitBaseClass, Oscillator, KerrOscillator, GenericQubit]]) – list of all quantum systems in HilbertSpace callinghamiltonian
, needed for identity wrappingbare_esys (
Optional
[Dict
[int
,ndarray
]]) – optionally, the bare eigensystems for each subsystem can be provided to speed up computation; these are provided in dict form via <subsys>: esys)
- Return type:
Qobj
- Returns:
Hamiltonian in qutip.Qobj format
- static id_wrap_all_ops(operator_list, subsystem_list, bare_esys=None)[source]#
Returns a list of identity-wrapped operators, one for each operator in operator_list. Note: at this point, any callable operator is actually evaluated.
- Parameters:
operator_list (
List
[Tuple
[int
,Union
[ndarray
,csc_matrix
,Callable
]]]) – list of tuples (subsys_index, operator)subsystem_list (
List
[Union
[QubitBaseClass, Oscillator, KerrOscillator, GenericQubit]]) – list of all quantum systems in HilbertSpace callinghamiltonian
, needed for identity wrappingbare_esys (
Optional
[Dict
[int
,ndarray
]]) – optionally, the bare eigensystems for each subsystem can be provided to speed up computation; these are provided in dict form via <subsys>: esys)
- Return type:
List
[Qobj
]- Returns:
list of identity-wrapped operators
- receive(event, sender, **kwargs)#
Receive a message from CENTRAL_DISPATCH and initiate action on it.
- Parameters:
event (
str
) – event name from EVENTSsender (
DispatchClient
) – original sender reporting the event**kwargs –
- Return type:
None