supergrad.quantum_system.InteractionTerm

supergrad.quantum_system.InteractionTerm#

class supergrad.quantum_system.InteractionTerm(operator_list: List[Callable], strength: float = None, add_hc: bool = False, constant: bool = False, name: str = 'interaction_term')[source]#

Class for specifying a term in the interaction Hamiltonian of a composite Hilbert space.

Parameters:
  • operator_list – list of operator

  • strength – coefficient for the interaction strength, set None if you want to pass parameters by dm-haiku.

  • add_hc – If set to True, the Hermitian conjugate is added.

  • constant (bool) – True for manually setting parameters, False for using haiku’s parameters management.

  • name – module name

__init__(operator_list: List[Callable], strength: float | None = None, add_hc: bool = False, constant: bool = False, name: str = 'interaction_term') None[source]#

Initializes the current module with the given name.

Subclasses should call this constructor before creating other modules or variables such that those modules are named correctly.

Parameters:

name – An optional string name for the class. Must be a valid Python identifier. If name is not provided then the class name for the current instance is converted to lower_snake_case and used instead.

Methods

__init__(operator_list[, strength, add_hc, ...])

Initializes the current module with the given name.

hamiltonian(subsystem_list)

Returns the full Hamiltonian of the interacting quantum system described by the InteractingSystem object

id_wrap_all_ops(operator_list, subsystem_list)

Construct a KronObj which represents the interaction operator on the Hilbert space.

params_dict()

Returns parameters keyed by name for this module and submodules.

state_dict()

Returns state keyed by name for this module and submodules.