API

QuantumHamiltonianParticle.ParticleStateMethod
ParticleState(::Type{PS}, name, occvec, ::Type{BR}=UInt)

Create a particle state with no quantum number.

Arguments

  • PS: particle sector
  • name: name of the state
  • occvec::AbstractVector{<:Integer}: occupation Vector
  • BR: binary type
source
QuantumHamiltonianParticle.ParticleStateMethod
ParticleState(::Type{PS}, name, occvec, quantum_number, ::Type{BR}=UInt)

Create a particle state

Arguments

  • PS: particle sector
  • name: name of the state
  • occvec::AbstractVector{<:Integer}: occupation Vector
  • quantum_number: quantum number (tuple or integer)
  • BR: binary type
source
QuantumHamiltonian.compressMethod
compress(hs, indexarray, [type])

Return the binary representation of the basis state represented by indexarray, optionally in type type.

Arguments

  • hs::ParticleHilbertSpace{PS, BR, QN}
  • indexarray::CartesianIndex
  • type::Type{BR2}=BR
source
QuantumHamiltonian.extractMethod
extract(hs, occbin)

Return the CartesianIndex representation of the basis state represented by occbin.

Arguments

  • hs::ParticleHilbertSpace
  • occbin::Unsigned
source
QuantumHamiltonian.get_bitmaskMethod
get_bitmask(phs, [iptl, isite])

Get the bit mask for the particles iptl at sites isite. iptl or isite can either be integer, a vector of integers, or colon :. Bitwise or is taken over list of iptl.

source
QuantumHamiltonian.get_bitmaskMethod
get_bitmask(phs, iptl, isite)

Get the bit mask for the particles iptl at sites isite. iptl or isite can either be integer, a vector of integers, or colon (:). Bitwise or is taken over list of iptl.

source
QuantumHamiltonian.uncompressMethod
uncompress(hs, occbin)

Return the CartesianIndex representation of the basis state represented by occbin.

Arguments

  • hs::ParticleHilbertSpace
  • occbin::Unsigned
source
QuantumHamiltonianParticle.electron_systemMethod
electron_system()

Create an electron particle sector and creation/annihilation operators. Returns (particle_sector, c, cdag).candcdagare functions that take site index and spin, e.g.c(3, :up),cdag(4, :↓)`

source
QuantumHamiltonianParticle.locvec2statevecMethod
locvec2statevec

particles : Vector of (Vector of particle location)

Example

  P S 1 2 3 4 5 = |0, e↓, e↑, m, m⟩
  e↑  0 0 1 0 0
  e↓  0 1 0 0 0 = c†(m,4) c†(m,5) c†(e↑,3) c†(e↓,2) |Ω⟩
  m   0 0 0 1 1
source