Quantum Systems

QuantumLattices.QuantumSystems.blockConstant
*(f₁::Operator{<:Number, <:ID{FockIndex{:f}}}, f₂::Operator{<:Number, <:ID{FockIndex{:f}}}) -> Operator
*(f₁::Operator{<:Number, <:ID{Index{<:FockIndex{:f}, Int}}}, f₂::Operator{<:Number, <:ID{Index{<:FockIndex{:f}, Int}}}) -> Operator
*(f₁::Operator{<:Number, <:ID{CompositeIndex{<:Index{<:FockIndex{:f}, Int}}}}, f₂::Operator{<:Number, <:ID{CompositeIndex{<:Index{<:FockIndex{:f}, Int}}}}) -> Operator

Get the multiplication of two fermionic Fock operators.

source
QuantumLattices.DegreesOfFreedom.MatrixCouplingMethod
MatrixCoupling(F::Union{typeof(𝕗), typeof(𝕓), typeof(𝕕)}, sites::Union{NTuple{2, Ordinal}, Colon}, orbital::Union{AbstractMatrix, Colon}, spin::Union{AbstractMatrix, Colon}, nambu::Union{AbstractMatrix, Colon})
MatrixCoupling(sites::Union{NTuple{2, Ordinal}, Colon}, ::Type{F}, orbital::Union{AbstractMatrix, Colon}, spin::Union{AbstractMatrix, Colon}, nambu::Union{AbstractMatrix, Colon}) where {F<:FockIndex}

Construct a matrix coupling for Fock systems.

source
QuantumLattices.DegreesOfFreedom.MatrixCouplingMethod
MatrixCoupling(::typeof(𝕦), sites::Union{NTuple{2, Ordinal}, Colon}, matrix::AbstractMatrix; rows::Union{AbstractVector, Nothing}=nothing, cols::Union{AbstractVector, Nothing}=nothing)
MatrixCoupling(sites::Union{NTuple{2, Ordinal}, Colon}, ::Type{PhononIndex{:u}}, matrix::AbstractMatrix; rows::Union{AbstractVector, Nothing}=nothing, cols::Union{AbstractVector, Nothing}=nothing)

Construct a set of Couplings corresponding to the dynamical matrix of phonons.

source
QuantumLattices.DegreesOfFreedom.MatrixCouplingMethod
MatrixCoupling(::Type{<:𝕊}, sites::Union{NTuple{2, Ordinal}, Colon}, matrix::AbstractMatrix; rows::AbstractVector=SVector('x', 'y', 'z'), cols::AbstractVector=SVector('x', 'y', 'z'))
MatrixCoupling(sites::Union{NTuple{2, Ordinal}, Colon}, ::Type{<:SpinIndex}, matrix::AbstractMatrix; rows::AbstractVector=SVector('x', 'y', 'z'), cols::AbstractVector=SVector('x', 'y', 'z'))

Construct a matrix coupling for spin systems.

source
QuantumLattices.QuantumSystems.CoulombType
Coulomb(id::Symbol, value, bondkind, coupling=Coupling(𝕕(:, :, :, :), 𝕕(:, :, :, :))^2; ishermitian::Bool=true, amplitude::Union{Function, Nothing}=nothing, ismodulatable::Bool=true)

Coulomb term.

Type alias for Term{:Coulomb, id, V, B, C<:TermCoupling, A<:TermAmplitude}.

source
QuantumLattices.QuantumSystems.DMType
DM(
    id::Symbol,
    value,
    bondkind,
    vectors::Pair{<:AbstractVector{<:Union{Number, Tuple{Number, Number}, AbstractVector{<:Number}}}, <:Union{Char, AbstractVector{<:Number}}}...;
    unit::Symbol=:degree,
    amplitude::Union{Function, Nothing}=nothing,
    ismodulatable::Bool=true
)

DM term. Since DM term is antisymmetric on every bond, only the positive direction of a bond is needed. The negative direction of a bond can be handled automatically by this function.

Here, vectors specify the unit DM vector on every bond in the form [bond₁, bond₂, ...]=>v, where bondᵢ can be

  1. a Number specifying the azimuth angle of a bond in the 2-dimensional case, or
  2. a Tuple{Number, Number} specifying the polar and azimuth angle pairs of a bond in the 3-dimensional case, or
  3. an AbstractVector{<:Number} specifying the direction of a bond;

and v can be

  1. a Char of 'x', 'y' or 'z', indicating the unit DM vector on the set of bonds is along the x, y or z direction, or
  2. an AbstractVector{<:Number}, specifying the direction of the DM vector on the set of bonds.

Type alias for Term{:DM, id, V, B, C<:TermCoupling, A<:TermAmplitude}.

source
QuantumLattices.QuantumSystems.ElasticType
Elastic(id::Symbol, value, bondkind, coupling; amplitude::Union{Function, Nothing}=nothing, ismodulatable::Bool=true)

Generic elastic energy of phonons.

Type alias for Term{:Elastic, id, V, B, C<:TermCoupling, A<:TermAmplitude}

source
QuantumLattices.QuantumSystems.FockIndexType
FockIndex{T, O<:Union{Int, Symbol, Colon}, S<:Union{Rational{Int}, Symbol, Colon}, N<:Union{Int, Symbol, Colon}} <: SimpleInternalIndex

Fock index, i.e., the internal index to specify the generators of a Fock space.

source
QuantumLattices.QuantumSystems.FockIndexMethod
FockIndex(orbital::Union{Int, Symbol, Colon}, spin::Union{Rational{Int}, Int, Symbol, Colon}, nambu::Union{Int, Symbol, Colon})
FockIndex{T}(orbital::Union{Int, Symbol, Colon}, spin::Union{Rational{Int}, Int, Symbol, Colon}, nambu::Union{Int, Symbol, Colon}) where T
FockIndex{T, O, S, N}(orbital::Union{Int, Symbol, Colon}, spin::Union{Rational{Int}, Symbol, Colon}, nambu::Union{Int, Symbol, Colon}) where {T, O, S, N}

Construct a Fock index.

source
QuantumLattices.QuantumSystems.HeisenbergType
Heisenberg(id::Symbol, value, bondkind; form::Symbol=Symbol("+-z"), amplitude::Union{Function, Nothing}=nothing, ismodulatable::Bool=true)

Heisenberg term.

Type alias for Term{:Heisenberg, id, V, B, C<:TermCoupling, A<:TermAmplitude}.

source
QuantumLattices.QuantumSystems.HookeType
Hooke(id::Symbol, value, bondkind; amplitude::Union{Function, Nothing}=nothing, ismodulatable::Bool=true)

Potential energy of phonons by the Hooke's law.

Type alias for Term{:Hooke, id, V, B, C<:TermCoupling, A<:TermAmplitude}

source
QuantumLattices.QuantumSystems.HoppingType
Hopping(id::Symbol, value, bondkind, coupling=Coupling(𝕕(:, :, :, :), 𝕕(:, :, :, :)); amplitude::Union{Function, Nothing}=nothing, ismodulatable::Bool=true)

Hopping term.

Type alias for Term{:Hopping, id, V, B, C<:TermCoupling, A<:TermAmplitude}.

source
QuantumLattices.QuantumSystems.HubbardType
Hubbard(id::Symbol, value; amplitude::Union{Function, Nothing}=nothing, ismodulatable::Bool=true)

Hubbard term.

Type alias for Term{:Hubbard, id, V, Int, C<:TermCoupling, A<:TermAmplitude}.

source
QuantumLattices.QuantumSystems.InterOrbitalInterSpinType
InterOrbitalInterSpin(id::Symbol, value; amplitude::Union{Function, Nothing}=nothing, ismodulatable::Bool=true)

Interorbital-interspin term.

Type alias for Term{:InterOrbitalInterSpin, id, V, Int, C<:TermCoupling, A<:TermAmplitude}.

source
QuantumLattices.QuantumSystems.InterOrbitalIntraSpinType
InterOrbitalIntraSpin(id::Symbol, value; amplitude::Union{Function, Nothing}=nothing, ismodulatable::Bool=true)

Interorbital-intraspin term.

Type alias for Term{:InterOrbitalIntraSpin, id, V, Int, C<:TermCoupling, A<:TermAmplitude}.

source
QuantumLattices.QuantumSystems.IsingType
Ising(id::Symbol, value, bondkind, direction::Char; amplitude::Union{Function, Nothing}=nothing, ismodulatable::Bool=true)

Ising term.

Type alias for Term{:Ising, id, V, B, C<:TermCoupling, A<:TermAmplitude}.

source
QuantumLattices.QuantumSystems.KineticType
Kinetic(id::Symbol, value; amplitude::Union{Function, Nothing}=nothing, ismodulatable::Bool=true)

Kinetic energy of phonons.

Type alias for Term{:Kinetic, id, V, Int, C<:TermCoupling, A<:TermAmplitude}.

source
QuantumLattices.QuantumSystems.KitaevType
Kitaev(
    id::Symbol, value, bondkind;
    x::AbstractVector{<:Union{Number, Tuple{Number, Number}, AbstractVector{<:Number}}},
    y::AbstractVector{<:Union{Number, Tuple{Number, Number}, AbstractVector{<:Number}}},
    z::AbstractVector{<:Union{Number, Tuple{Number, Number}, AbstractVector{<:Number}}},
    unit::Symbol=:degree,
    amplitude::Union{Function, Nothing}=nothing,
    ismodulatable::Bool=true
)

Kitaev term. Since Kitaev term is symmetric on every bond, only one direction of a bond is needed. The inverse direction of a bond can be handled automatically by this function.

Here, x, y and z assign the x-bonds, y-bonds, and z-bonds, respectively, with each kind of bond can be

  1. a Number specifying the azimuth angle of a bond in the 2-dimensional case, or
  2. a Tuple{Number, Number} specifying the polar and azimuth angle pairs of a bond in the 3-dimensional case, or
  3. an AbstractVector{<:Number} specifying the direction of a bond.

Type alias for Term{:Kitaev, id, V, B, C<:TermCoupling, A<:TermAmplitude}.

source
QuantumLattices.QuantumSystems.OnsiteType
Onsite(id::Symbol, value, coupling=Coupling(𝕕(:, :, :, :), 𝕕(:, :, :, :)); ishermitian::Bool=true, amplitude::Union{Function, Nothing}=nothing, ismodulatable::Bool=true)

Onsite term.

Type alias for Term{:Onsite, id, V, Int, C<:TermCoupling, A<:TermAmplitude}.

source
QuantumLattices.QuantumSystems.PairHoppingType
PairHopping(id::Symbol, value; amplitude::Union{Function, Nothing}=nothing, ismodulatable::Bool=true)

Pair-hopping term.

Type alias for Term{:PairHopping, id, V, Int, C<:TermCoupling, A<:TermAmplitude}.

source
QuantumLattices.QuantumSystems.PairingType
Pairing(id::Symbol, value, bondkind, coupling; amplitude::Union{Function, Nothing}=nothing, ismodulatable::Bool=true)

Pairing term.

Type alias for Term{:Pairing, id, V, B, C<:TermCoupling, A<:TermAmplitude}.

source
QuantumLattices.QuantumSystems.SingleIonAnisotropyType
SingleIonAnisotropy(id::Symbol, value, direction::Char; amplitude::Union{Function, Nothing}=nothing, ismodulatable::Bool=true)
SingleIonAnisotropy(id::Symbol, value, matrix::AbstractMatrix{<:Number}; amplitude::Union{Function, Nothing}=nothing, ismodulatable::Bool=true)

Single ion anisotropy term.

Type alias for Term{:SingleIonAnisotropy, id, V, Int, C<:TermCoupling, A<:TermAmplitude}.

source
QuantumLattices.QuantumSystems.SpinFlipType
SpinFlip(id::Symbol, value; amplitude::Union{Function, Nothing}=nothing, ismodulatable::Bool=true)

Spin-flip term.

Type alias for Term{:SpinFlip, id, V, Int, C<:TermCoupling, A<:TermAmplitude}.

source
QuantumLattices.QuantumSystems.SpinIndexMethod
SpinIndex(tag::Union{Char, Symbol, Colon})
SpinIndex{S}(tag::Union{Char, Symbol, Colon}) where S
SpinIndex{S, T}(tag::Union{Char, Symbol, Colon}) where {S, T}

Construct a spin index.

source
QuantumLattices.QuantumSystems.SpinTermType
SpinTerm(id::Symbol, value, bondkind, coupling; amplitude::Union{Function, Nothing}=nothing, ismodulatable::Bool=true)

Generic spin term.

Type alias for Term{:SpinTerm, id, V, B, C<:TermCoupling, A<:TermAmplitude}.

source
QuantumLattices.QuantumSystems.ZeemanType
Zeeman(
    id::Symbol, value, direction::Char, g::Number=1;
    amplitude::Union{Function, Nothing}=nothing, ismodulatable::Bool=true
)
Zeeman(
    id::Symbol, value, direction::Union{AbstractVector{<:Number}, Tuple{Number, Number}}, g::Union{Number, AbstractMatrix{<:Number}}=1;
    unit::Symbol=:degree, amplitude::Union{Function, Nothing}=nothing, ismodulatable::Bool=true
)

Zeeman term.

Type alias for Term{:Zeeman, id, V, Int, C<:TermCoupling, A<:TermAmplitude}.

source
QuantumLattices.QuantumSystems.ΓType
Γ(
    id::Symbol, value, bondkind;
    x::AbstractVector{<:Union{Number, Tuple{Number, Number}, AbstractVector{<:Number}}},
    y::AbstractVector{<:Union{Number, Tuple{Number, Number}, AbstractVector{<:Number}}},
    z::AbstractVector{<:Union{Number, Tuple{Number, Number}, AbstractVector{<:Number}}},
    unit::Symbol=:degree,
    amplitude::Union{Function, Nothing}=nothing,
    ismodulatable::Bool=true
)

Γ Term. Since Γ term is symmetric on every bond, only one direction of a bond is needed. The inverse direction of a bond can be handled automatically by this function.

Here, x, y and z assign the x-bonds, y-bonds, and z-bonds, respectively, with each kind of bond can be

  1. a Number specifying the azimuth angle of a bond in the 2-dimensional case, or
  2. a Tuple{Number, Number} specifying the polar and azimuth angle pairs of a bond in the 3-dimensional case, or
  3. an AbstractVector{<:Number} specifying the direction of a bond.

Type alias for Term{:Γ, id, V, B, C<:TermCoupling, A<:TermAmplitude}.

source
QuantumLattices.QuantumSystems.Γ′Type
Γ′(
    id::Symbol, value, bondkind;
    x::AbstractVector{<:Union{Number, Tuple{Number, Number}, AbstractVector{<:Number}}},
    y::AbstractVector{<:Union{Number, Tuple{Number, Number}, AbstractVector{<:Number}}},
    z::AbstractVector{<:Union{Number, Tuple{Number, Number}, AbstractVector{<:Number}}},
    unit::Symbol=:degree,
    amplitude::Union{Function, Nothing}=nothing,
    ismodulatable::Bool=true
)

Γ′ Term. Since Γ′ term is symmetric on every bond, only one direction of a bond is needed. The inverse direction of a bond can be handled automatically by this function.

Here, x, y and z assign the x-bonds, y-bonds, and z-bonds, respectively, with each bond can be

  1. a Number specifying the azimuth angle of a bond in the 2-dimensional case, or
  2. a Tuple{Number, Number} specifying the polar and azimuth angle pairs of a bond in the 3-dimensional case, or
  3. an AbstractVector{<:Number} specifying the direction of a bond.

Type alias for Term{:Γ′, id, V, B, C<:TermCoupling, A<:TermAmplitude}.

source
QuantumLattices.QuantumSystems.𝕊Type
𝕊(tag) -> SpinIndex
𝕊(site, tag) -> Index{<:SpinIndex}
𝕊(site, tag, rcoordinate, icoordinate) -> CoordinatedIndex{<:Index{<:SpinIndex}}

𝕊{S}(tag) where S -> SpinIndex{S}
𝕊{S}(site, tag) where S -> Index{<:SpinIndex{S}}
𝕊{S}(site, tag, rcoordinate, icoordinate) where S -> CoordinatedIndex{<:Index{<:SpinIndex{S}}}

Convenient construction of SpinIndex, Index{<:SpinIndex}, CoordinatedIndex{<:Index{<:SpinIndex}}.

source
QuantumLattices.QuantumSystems.@L_strMacro
L"x" => SparseMatrixCSC([0 0 0; 0 0 1im; 0 -1im 0])
L"y" => SparseMatrixCSC([0 0 -1im; 0 0 0; 1im 0 0])
L"z" => SparseMatrixCSC([0 1im 0; -1im 0 0; 0 0 0])

Three-dimensional rotation generators.

source
QuantumLattices.QuantumSystems.@σ_strMacro
σ"0" => SparseMatrixCSC([1 0; 0 1])
σ"x" => SparseMatrixCSC([0 1; 1 0])
σ"y" => SparseMatrixCSC([0 -1im; 1im 0])
σ"z" => SparseMatrixCSC([1 0; 0 -1])
σ"+" => SparseMatrixCSC([0 1; 0 0])
σ"-" => SparseMatrixCSC([0 0; 1 0])
σ"11" => SparseMatrixCSC([1 0; 0 0])
σ"22" => SparseMatrixCSC([0 0; 0 1])

Pauli matrix σ⁰, σˣ, σʸ, σᶻ, σ⁺, σ⁻, σ¹¹, σ²².

source
Base.angleMethod
angle(id::CoordinatedIndex{<:Index{<:FockIndex}}, vectors::AbstractVector{<:AbstractVector{<:Number}}, values::AbstractVector{<:Number}) -> Complex{<:Number}

Get the twist phase.

source
QuantumLattices.QuantumOperators.matrixMethod
matrix(index::SpinIndex{S, Char}, dtype::Type{<:Number}=Complex{Float}) where S -> Matrix{dtype}
matrix(index::Index{<:SpinIndex}, dtype::Type{<:Number}=Complex{Float}) -> Matrix{dtype}
matrix(index::CompositeIndex{<:Index{<:SpinIndex}}, dtype::Type{<:Number}=Complex{Float}) -> Matrix{dtype}

Get the matrix representation of an index acting on the local 𝕊ᶻ space.

source
QuantumLattices.QuantumOperators.scriptMethod
script(index::FockIndex, ::Val{:orbital}; kwargs...) -> String
script(index::FockIndex, ::Val{:spin}; kwargs...) -> String
script(index::FockIndex, ::Val{:spinsym}; kwargs...) -> String
script(index::FockIndex, ::Val{:nambu}; kwargs...) -> String

Get the requested script of a Fock index.

source
QuantumLattices.QuantumSystems.totalspinMethod
totalspin(::SpinIndex) -> Rational{Int}/Int/Colon
totalspin(::Type{<:SpinIndex}) -> Rational{Int}/Int/Colon/Float64

totalspin(::Index{<:SpinIndex}) -> Rational{Int}/Int/Colon
totalspin(::Type{<:Index{<:SpinIndex}}) -> Rational{Int}/Int/Colon/Float64

totalspin(::CompositeIndex{<:Index{<:SpinIndex}}) -> Rational{Int}/Int/Colon
totalspin(::Type{<:CompositeIndex{<:Index{<:SpinIndex}}}) -> Rational{Int}/Int/Colon/Float64

Get the total spin.

source
QuantumLattices.QuantumSystems.𝕊ᵀ𝕊Method
𝕊ᵀ𝕊(sites::Union{NTuple{2, Ordinal}, Colon}, matrix::AbstractMatrix; rows::AbstractVector=SVector('x', 'y', 'z'), cols::AbstractVector=SVector('x', 'y', 'z')) -> MatrixCoupling

Construct a matrix coupling for spin system.

source
QuantumLattices.QuantumSystems.𝕓Function
𝕓(orbital, spin, nambu) -> FockIndex{:b}
𝕓(site, orbital, spin, nambu) -> Index{<:FockIndex{:b}}
𝕓(site, orbital, spin, nambu, rcoordinate, icoordinate) -> CoordinatedIndex{<:Index{<:FockIndex{:b}}}

Convenient construction of FockIndex{:b}, Index{<:FockIndex{:b}}, CoordinatedIndex{<:Index{<:FockIndex{:b}}}.

source
QuantumLattices.QuantumSystems.𝕕Function
𝕕(orbital, spin, nambu) -> FockIndex{:}
𝕕(site, orbital, spin, nambu) -> Index{<:FockIndex{:}}
𝕕(site, orbital, spin, nambu, rcoordinate, icoordinate) -> CoordinatedIndex{<:Index{<:FockIndex{:}}}

Convenient construction of FockIndex{:}, Index{<:FockIndex{:}}, CoordinatedIndex{<:Index{<:FockIndex{:}}}.

source
QuantumLattices.QuantumSystems.𝕗Function
𝕗(orbital, spin, nambu) -> FockIndex{:f}
𝕗(site, orbital, spin, nambu) -> Index{<:FockIndex{:f}}
𝕗(site, orbital, spin, nambu, rcoordinate, icoordinate) -> CoordinatedIndex{<:Index{<:FockIndex{:f}}}

Convenient construction of FockIndex{:f}, Index{<:FockIndex{:f}}, CoordinatedIndex{<:Index{<:FockIndex{f}}}.

source
QuantumLattices.QuantumSystems.𝕗⁺𝕗Method
𝕗⁺𝕗(sites::Union{NTuple{2, Ordinal}, Colon}, orbital::Union{AbstractMatrix, Colon}, spin::Union{AbstractMatrix, Colon}, nambu::Union{AbstractMatrix, Colon}) -> MatrixCoupling
𝕓⁺𝕓(sites::Union{NTuple{2, Ordinal}, Colon}, orbital::Union{AbstractMatrix, Colon}, spin::Union{AbstractMatrix, Colon}, nambu::Union{AbstractMatrix, Colon}) -> MatrixCoupling
𝕕⁺𝕕(sites::Union{NTuple{2, Ordinal}, Colon}, orbital::Union{AbstractMatrix, Colon}, spin::Union{AbstractMatrix, Colon}, nambu::Union{AbstractMatrix, Colon}) -> MatrixCoupling

Construct a matrix coupling for Fock systems.

source
QuantumLattices.QuantumSystems.𝕡Method
𝕡(direction) -> PhononIndex{:p}
𝕡(site, direction) -> Index{<:PhononIndex{:p}}
𝕡(site, direction, rcoordinate, icoordinate) -> CoordinatedIndex{<:Index{<:PhononIndex{:p}}}

Convenient construction of SpinIndex{:p}, Index{<:SpinIndex{:p}}, CoordinatedIndex{<:Index{<:SpinIndex{:p}}}.

source
QuantumLattices.QuantumSystems.𝕦Method
𝕦(direction) -> PhononIndex{:u}
𝕦(site, direction) -> Index{<:PhononIndex{:u}}
𝕦(site, direction, rcoordinate, icoordinate) -> CoordinatedIndex{<:Index{<:PhononIndex{:u}}}

Convenient construction of SpinIndex{:u}, Index{<:SpinIndex{:u}}, CoordinatedIndex{<:Index{<:SpinIndex{:u}}}.

source
QuantumLattices.QuantumSystems.𝕦ᵀ𝕦Method
𝕦ᵀ𝕦(sites::Union{NTuple{2, Ordinal}, Colon}, matrix::AbstractMatrix; rows::Union{AbstractVector, Nothing}=nothing, cols::Union{AbstractVector, Nothing}=nothing) -> MatrixCoupling

Construct a set of Couplings corresponding to the dynamical matrix of phonons.

source
QuantumLattices.expandMethod
expand(pnc::Coupling{<:Number, <:Pattern{<:InternalPattern{<:NTuple{2, PhononIndex{:u}}}}}, ::Val{:Hooke}, bond::Bond, hilbert::Hilbert) -> VectorSpace

Expand the default phonon potential coupling on a given bond.

source
QuantumLattices.kindMethod
kind(index::PhononIndex) -> Symbol
kind(::Type{<:PhononIndex{K}}) where K -> Symbol

kind(index::Index{<:PhononIndex}) -> Symbol
kind(::Type{<:Index{<:PhononIndex{K}}}) where K -> Symbol

kind(index::CoordinatedIndex{<:Index{<:PhononIndex}}) -> Symbol
kind(::Type{<:CoordinatedIndex{<:Index{<:PhononIndex{K}}}}) where K -> Symbol

Get the kind of a phonon index.

source
QuantumLattices.permuteMethod
permute(id₁::FockIndex, id₂::FockIndex) -> Tuple{Vararg{Operator}}

Permute two Fock indexes and get the result.

source
QuantumLattices.permuteMethod
permute(id₁::PhononIndex, id₂::PhononIndex) -> Tuple{Vararg{Operator}}

Permute two phonon indexes and get the result.

source
QuantumLattices.permuteMethod
permute(id₁::SpinIndex, id₂::SpinIndex) -> Tuple{Vararg{Operator}}

Permute two spin indexes and get the result.

source