Hamiltonian

Hamiltonian types

OpenQuantumBase.DenseHamiltonianType
struct DenseHamiltonian{T<:Number, dimensionless_time} <: OpenQuantumBase.AbstractDenseHamiltonian{T<:Number}

Defines a time dependent Hamiltonian object using Julia arrays.

Fields

  • f: List of time dependent functions

  • m: List of constant matrices

  • u_cache: Internal cache

  • size: Size

OpenQuantumBase.DenseHamiltonianMethod
DenseHamiltonian(funcs, mats; unit, dimensionless_time)

Constructor of the DenseHamiltonian type. funcs and mats are lists of time-dependent functions and the corresponding matrices. The Hamiltonian can be represented as $∑ᵢfuncs[i](s)×mats[i]$.

unit specifies wether :h or is set to one when defining funcs and mats. The mats will be scaled by $2π$ if unit is :h.

dimensionless_time specifies wether the arguments of the functions are dimensionless (normalized to total evolution time).

OpenQuantumBase.SparseHamiltonianType
struct SparseHamiltonian{T<:Number, dimensionless_time} <: OpenQuantumBase.AbstractSparseHamiltonian{T<:Number}

Defines a time dependent Hamiltonian object with sparse matrices.

Fields

  • f: List of time dependent functions

  • m: List of constant matrices

  • u_cache: Internal cache

  • size: Size

OpenQuantumBase.SparseHamiltonianMethod
SparseHamiltonian(funcs, mats; unit, dimensionless_time)

Constructor of the SparseHamiltonian type. funcs and mats are lists of time-dependent functions and the corresponding matrices. The Hamiltonian can be represented as $∑ᵢfuncs[i](s)×mats[i]$. unit specifies wether :h or is set to one when defining funcs and mats. The mats will be scaled by $2π$ if unit is :h.

OpenQuantumBase.AdiabaticFrameHamiltonianType
struct AdiabaticFrameHamiltonian{T} <: OpenQuantumBase.AbstractDenseHamiltonian{T}

Defines a time dependent Hamiltonian in adiabatic frame.

Fields

  • geometric: Geometric part

  • diagonal: Adiabatic part

  • size: Size of the Hamiltonian

OpenQuantumBase.AdiabaticFrameHamiltonianMethod
function AdiabaticFrameHamiltonian(ωfuns, geofuns)

Constructor of adiabatic frame Hamiltonian. ωfuns is a 1-D array of functions which specify the eigen energies (in GHz) of the Hamiltonian. geofuns is a 1-D array of functions which specifies the geometric phases of the Hamiltonian. geofuns can be thought as a flattened lower triangular matrix (without diagonal elements) in column-major order.

OpenQuantumBase.evaluateMethod
evaluate(H, s)

Evaluate the time dependent Hamiltonian at time s with the unit of GHz.

Fallback to H.(s)/2/π for generic AbstractHamiltonian type.

OpenQuantumBase.eigen_decompMethod
eigen_decomp(H, s; lvl)

Calculate the eigen value decomposition of the Hamiltonian H at time s. Keyword argument lvl specifies the number of levels to keep in the output. w is a vector of eigenvalues and v is a matrix of the eigenvectors in the columns. (The kth eigenvector can be obtained from the slice v[:, k].) w will be in unit of GHz.

OpenQuantumBase.eigen_decompMethod
eigen_decomp(H, s; lvl)

Calculate the eigen value decomposition of the Hamiltonian H at an array of time points s. The output keeps the lowest lvl eigenstates and their corresponding eigenvalues. Output (vals, vecs) have the dimensions of (lvl, length(s)) and (size(H, 1), lvl, length(s)) respectively.