Hamiltonian Class

This is the main Hamiltonian class that combines everything together to make a complete Hamiltonian.

Overview

hamiltonian(*args[, mass, muB, gamma, k])

A representation of the Hamiltonian in blocks

Detailed functions

class pylcp.hamiltonian(*args, mass=1.0, muB=1, gamma=1.0, k=1)[source]

A representation of the Hamiltonian in blocks

Diagonal blocks describe the internal structure of a manifold, and off-diagonal blocks describe how those manifolds are connected via laser Beams and the associated dipole matrix elements. For most cases, the Hamiltonian is usually just a two level system. In this case, the Hamiltonian can be initiated using the optional parameters below and the two manifolds are given the labels \(g\) and \(e\). You must supply the five positional arguments below in order to initiate the Hamiltonian in this way.

For other constructions with more than two manifolds, one should construct the Hamiltonian using the pylcp.hamiltonian.add_H_0_block(), pylcp.hamiltonian.add_mu_q_block() and pylcp.hamiltonian.add_d_q_block(). Note that the order in which the diagonal blocks are added is the energy ordering of the manifolds, which is often obscured after the rotating wave approximation is taken (and implicitly assumed to be taken before construction of this Hamiltonian object).

For more information, see the accompanying paper that describes the block nature of the Hamiltonian.

Parameters
  • H0_g (array_like, shape (N, N), optional) – Ground manifold field-independent matrix

  • H0_e (array_like, shape (M, M), optional) – Excited manifold field-independent matrix

  • muq_g (array_like, shape (3, N, N), optional) – Ground manifold magnetic field-dependent component, in spherical basis.

  • muq_e (array_like, shape (3, M, M), optional) – Excited manifold magnetic field-dependent component, in spherical basis.

  • d_q (array_like, shape (3, N, M), optional) – Dipole operator that connects the ground and excited manifolds, in spherical basis.

  • mass (float) – Mass of the atom or molecule

  • muB (Bohr magneton) – Value of the Bohr magneton in the units of choice

  • gamma (float) – Value of the decay rate associated with \(d_q\)

  • k (float) – Value of the wavevector associated with \(d_q\)

ns

Total number of states in the Hamiltonian

Type

int

state_labels

Updated list of the state labels used in the Hamiltonian.

Type

list of char

laser_keys

The laser keys dictionary translates laser pumping keys like g->e into block indices for properly extracting the associated \(d_q\) matrix.

Type

dict

add_H_0_block(state_label, H_0)[source]

Adds a new H_0 block to the hamiltonian

Parameters
  • state_label (str) – Label for the manifold for which this new block applies

  • H_0 (array_like, with shape (N, N)) – Square matrix that describes the field-independent part of this manifold’s Hamiltonian. This manifold must have N states.

add_d_q_block(label1, label2, d_q, k=1, gamma=1)[source]

Adds a new \(d_q\) block to the hamiltonian to connect two manifolds together.

Parameters
  • label1 (str) – Label for the first manifold to which this block applies

  • label2 (str) – Label for the second manifold to which this block applies

  • d_q (array_like, with shape (3, N, M)) – Matrix that describes the electric field dependent part of this dipole matrix element. The first manifold must

  • k (float, optional) – The mangitude of the k-vector for this $d_q$ block. Default: 1

  • gamma (float, optional) – The mangitude of the decay rate associated with this $d_q$ block. Default: 1

add_mu_q_block(state_label, mu_q, muB=1)[source]

Adds a new $mu_q$ block to the hamiltonian

Parameters
  • state_label (str) – Label for the manifold for which this new block applies

  • mu_q (array_like, with shape (3, N, N)) – Square matrix that describes the magnetic field dependent part of this manifold’s Hamiltonian.

diag_static_field(B)[source]

Block diagonalize at a specified magnetic field

This function diagonalizes the Hamiltonian’s diagonal blocks separately based on the value of the static magnetic field \(B\), and then rotates the \(d_q\) sets the quantization axis, and they rotate the coordinate system appropriately, so we only ever need to consider the z-component of the field.

Parameters
  • B (float) – The magnetic field value at which to diagonalize. It is always assumed to be along the \(\hat{z}\) direction.

  • Returns

  • H (pylcp.hamiltonian) – A block-structured Hamiltonian with diagonal elemented diagonalized and \(d_q\) objects rotated

make_full_matrices()[source]

Returns the full matrices that define the Hamiltonian.

Assembles the full Hamiltonian matrices from the stored block representation, and returns the Hamiltonian in the appropriate parts. For this function, \(n\) is the number of states

Returns

  • H_0 (array_like, shape (n, n)) – The diagonal portion of the Hamiltonian

  • mu_q (array_like, shape (3, N, N)) – The magnetic field dependent portion, in spherical basis.

  • d_q (dictionary of array_like, shape (3, N, N)) – The electric field dependent portion, in spherical basis, arranged by keys that describe the manifolds connected by the specific \(d_q\). This usually gets paired with \(E^*\)

  • d_q_star (dictionary of array_like, shape (3, N, N)) – The electric field dependent portion, in spherical basis, arranged by keys that describe the manifolds connected by the specific \(d_q\). This usually gets paired with \(E\)

print_structure()[source]

Print structure of the Hamiltonian

return_full_H(Eq, Bq)[source]

Assemble the block diagonal Hamiltonian into a single matrix

Parameters
  • Eq (array_like or dictionary of array_like) – The electric field(s) driving transitions between manifolds, each expressed in the spherical basis. Each electric field driving a transition between manifolds needs to specified with the correct key in the dictionary. For example, for a two-manifold Hamiltonian with manifold labels g and e, the dictionary should contain a single entry with g->e. If the electric field is given as a single array_like, it is assumed to drive the g->e transition.

  • Bq (array_like, shape (3,)) – The magnetic field in spherical basis.

Returns

H – The full Hamiltonian matrix

Return type

array_like

set_mass(mass)[source]

Sets the Hamiltonian’s mass parameter

Parameters

mass (float) – The mass of the atom or molecule of the Hamiltonian