Setting up a calculation

Contents

Index

Molecular parameters

Structs for organizing the coupling constants, dipole moment, and nuclear spins of the molecule.

Types

BialkaliSpectrum.NuclearParametersType
NuclearParameters

Contains the nuclear electric quadrupole moments, nuclear spin-rotation couplings, and nuclear spin-spin coupling for calculating the hyperfine Hamiltonian.

source
BialkaliSpectrum.PolarizabilityType
Polarizability

Contains the parallel and perpendicular ac polarizabilities at a particular optical wavelength λ.

So far, it is assumed that λ is far-detuned from any electronic transitions, such that the polarizability does not depend on rotational state $N$.

source

Constants

Hamiltonian

Functions for building the molecular Hamiltonian.

The HamiltonianParts struct is used as an input to several analysis methods, e.g. computing dipole matrix elements, since it holds the individual terms in the Hamiltonian separately.

Types

BialkaliSpectrum.HamiltonianPartsType
HamiltonianParts

Contains all parts of the Hamiltonian except external fields.

Zeeman, dc Stark, and ac Stark terms are stored as vectors of matrices that can be contracted with the appropriate external field tensors. This allows the full Hamiltonian to be re-constructed at various field values and orientations without recalculating all of the matrix elements.

Should be created by make_hamiltonian_parts or make_krb_hamiltonian_parts. Used as an input to get_spectrum and hamiltonian.

See also make_hamiltonian_parts, make_krb_hamiltonian_parts.

source

Methods

BialkaliSpectrum.make_hamiltonian_partsMethod
make_hamiltonian_parts(molecular_parameters, N_max)

Construct all parts of the Hamiltonian that do not depend on external fields.

The size of the basis is determined by molecular_parameters, which contains the nuclear spin quantum numbers molecular_parameters.I, and the rotational states 0:N_max to include.

See also make_krb_hamiltonian_parts.

source

Fields

Utilities for defining the external magnetic, electric, and optical fields experienced by the molecules.

The ExternalFields holds the external fields, which are each defined by a SphericalVector with a magnitude, polar angle $\theta$, and azimuthal angle $\phi$. Note that the molecular basis is defined with respect to the $z$-axis ($\theta = 0$).

A Vector{ExternalFields} is expected by get_spectra, and can be generated manually or with generate_fields_scan.

Types

BialkaliSpectrum.ExternalFieldsType
ExternalFields(B::SphericalVector, E::SphericalVector, Optical::Vector{SphericalVector})
ExternalFields(B::Float64, E::Float64)

External magnetic, electric, optical fields to use in constructing the Hamiltonian.

If B and E are provided as Float64s, then the fields are assumed to be along z. The Optical argument can also be left as an empty vector [].

See also get_spectrum, hamiltonian, SphericalVector.

TODO: add the other signatures

Examples

julia> ExternalFields(VectorZ(545.9), VectorX(1020.0), [])
ExternalFields(SphericalVector(545.9, 0.0, 0.0), SphericalVector(1020.0, 1.5707963267948966, 0.0), SphericalVector[])
julia> ExternalFields(545.9, 1020.0)
ExternalFields(SphericalVector(545.9, 0.0, 0.0), SphericalVector(1020.0, 0.0, 0.0), SphericalVector[])
source

Methods

Basis states

Utilities for working with molecular states in the uncoupled basis $|N, m_N, m_{i1}, m_{i2} \rangle$.

The basis states are indexed with the quantum numbers changing fastest on the right. For example, with $I_1 = 1/2$ and $I_2 = 1/2$, the first few states are:

  1. $|0, 0, -1/2, -1/2⟩$
  2. $|0, 0, -1/2, +1/2⟩$
  3. $|0, 0, +1/2, -1/2⟩$
  4. $|0, 0, +1/2, +1/2⟩$
  5. $|1, -1, -1/2, -1/2⟩$

etc.

The methods basis_state and basis_index are used to switch between an index and the corresponding basis State.

Types

BialkaliSpectrum.StateType
State(N, mₙ, I, mᵢ)    
State(N, mₙ, I₁, mᵢ₁, I₂, mᵢ₂)

Represents a molecular state in the uncoupled basis $|N, mₙ, I₁, mᵢ₁, I₂, mᵢ₂⟩$.

Write something more descriptive here

source

Standard library interfaces

Base.convertFunction
Base.convert(t::Type{NamedTuple}, s::State)

Returns a named tuple with fields N, m_n, I_1, m_i1, I_2, m_i2 from s.

This is a utility function to simplify outputting to a DataFrame.

source
Base.showFunction
Base.show(io::IO, s::State)

Pretty prints a State in ket notation, $|N, m_N, m_{i1}, m_{i2}⟩$.

source

Methods

BialkaliSpectrum.basis_indexMethod
basis_index(s::State)

Returns index of state s in the basis.

The uncoupled basis $|N, mₙ, I₁, mᵢ₁, I₂, mᵢ₂⟩$ is ordered with the quantum numbers on the left changing the slowest.

See also State, basis_index.

Examples

julia> import BialkaliSpectrum.K40Rb87: KRbState

julia> basis_index(KRbState(1, 1, -4, 1/2))
111
julia> basis_index(basis_state(42, 4, 3/2))
42
source
BialkaliSpectrum.basis_stateMethod
basis_state(i, I₁, I₂)

Returns the State corresponding to the ith member of the basis.

The uncoupled basis $|N, mₙ, I₁, mᵢ₁, I₂, mᵢ₂⟩$ is ordered with the quantum numbers on the left changing the slowest.

See also State, basis_index.

Examples

julia> s = basis_state(1, 4, 3/2)
BialkaliSpectrum.State basis state:
    |0, 0, -4, -3/2⟩
julia> s = basis_state(37, 4, 3/2)
BialkaliSpectrum.State basis state:
    |1, -1, -4, -3/2⟩
source

Molecule-specific definitions

Constants and method defs for working with specific molecule species.

${}^{40}\text{K}^{87}\text{Rb}$ (K40Rb87)

BialkaliSpectrum.K40Rb87.KRbStateMethod
KRbState(N, mₙ, mK, mRb)

Creates a basis state $|N, m_n, m_{\text{K}}, m_{\text{Rb}}⟩$ for ${}^{40}\text{K}^{87}\text{Rb}$.

This is a wrapper around State to avoid having to specify the nuclear spins $I_k$ each time.

See also State.

source

Toy molecule without hyperfine structure (Toy)

BialkaliSpectrum.StateMethod
State(N, mₙ)

Creates a basis state $|N, m_n⟩$ for the toy molecule.

This is a wrapper around State to avoid having to specify the nuclear spins $I_k$ each time.

See also State.

source