Hamiltonian
Hamiltonian types
OpenQuantumBase.DenseHamiltonian — Typestruct DenseHamiltonian{T<:Number, dimensionless_time} <: OpenQuantumBase.AbstractDenseHamiltonian{T<:Number}Defines a time dependent Hamiltonian object using Julia arrays.
Fields
f: List of time dependent functionsm: List of constant matricesu_cache: Internal cachesize: Size
OpenQuantumBase.DenseHamiltonian — MethodDenseHamiltonian(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.SparseHamiltonian — Typestruct SparseHamiltonian{T<:Number, dimensionless_time} <: OpenQuantumBase.AbstractSparseHamiltonian{T<:Number}Defines a time dependent Hamiltonian object with sparse matrices.
Fields
f: List of time dependent functionsm: List of constant matricesu_cache: Internal cachesize: Size
OpenQuantumBase.SparseHamiltonian — MethodSparseHamiltonian(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.AdiabaticFrameHamiltonian — Typestruct AdiabaticFrameHamiltonian{T} <: OpenQuantumBase.AbstractDenseHamiltonian{T}Defines a time dependent Hamiltonian in adiabatic frame.
Fields
geometric: Geometric partdiagonal: Adiabatic partsize: Size of the Hamiltonian
OpenQuantumBase.AdiabaticFrameHamiltonian — Methodfunction 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.evaluate — Methodevaluate(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_decomp — Methodeigen_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_decomp — Methodeigen_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.