Quantum Systems
QuantumLattices.QuantumSystems.FockTerm
— TypeFockTerm
Type alias for Union{Onsite, Hopping, Pairing, Hubbard, InterOrbitalInterSpin, InterOrbitalIntraSpin, SpinFlip, PairHopping, Coulomb}
.
QuantumLattices.QuantumSystems.PhononTerm
— TypePhononTerm
Type alias for Union{Kinetic, Hooke, Elastic}
.
QuantumLattices.QuantumSystems.annihilation
— Constantannihilation
Indicate that the nambu index is annihilation.
QuantumLattices.QuantumSystems.block
— Constant*(f₁::Operator{<:Number, <:ID{FID{:f}}}, f₂::Operator{<:Number, <:ID{FID{:f}}}) -> Union{typeof(0), Operator}
*(f₁::Operator{<:Number, <:ID{Index{Int, <:FID{:f}}}}, f₂::Operator{<:Number, <:ID{Index{Int, <:FID{:f}}}}) -> Union{typeof(0), Operator}
*(f₁::Operator{<:Number, <:ID{AbstractCompositeIndex{<:Index{Int, <:FID{:f}}}}}, f₂::Operator{<:Number, <:ID{AbstractCompositeIndex{<:Index{Int, <:FID{:f}}}}}) -> Union{typeof(0), Operator}
Get the multiplication of two fermionic Fock operators.
QuantumLattices.QuantumSystems.creation
— Constantcreation
Indicate that the nambu index is creation.
QuantumLattices.QuantumSystems.latexofbosons
— Constantlatexofbosons
The default LaTeX format of a bosonic index.
QuantumLattices.QuantumSystems.latexoffermions
— Constantlatexoffermions
The default LaTeX format of a fermionic index.
QuantumLattices.QuantumSystems.latexofparticles
— Constantlatexofparticles
The default LaTeX format of a wildcard Fock index.
QuantumLattices.QuantumSystems.latexofphonons
— Constantlatexofphonons
The default LaTeX format of a phonon index.
QuantumLattices.QuantumSystems.latexofspins
— Constantlatexofspins
The default LaTeX format of a spin index.
QuantumLattices.DegreesOfFreedom.MatrixCoupling
— MethodMatrixCoupling(sites::Union{NTuple{2, Int}, Colon}, ::Type{PID}, matrix::AbstractMatrix; rows::Union{AbstractVector, Nothing}=nothing, cols::Union{AbstractVector, Nothing}=nothing)
Construct a set of Coupling
s corresponding to the dynamical matrix of phonons.
QuantumLattices.DegreesOfFreedom.MatrixCoupling
— MethodMatrixCoupling(sites::Union{NTuple{2, Int}, Colon}, ::Type{F}, orbital::Union{AbstractMatrix, Colon}, spin::Union{AbstractMatrix, Colon}, nambu::Union{AbstractMatrix, Colon}) where {F<:FID}
Construct a set of Coupling
s between two Index{<:Union{Int, Colon}, <:FID}
s with the coefficients specified by matrices acting on separated internal spaces.
QuantumLattices.DegreesOfFreedom.MatrixCoupling
— MethodMatrixCoupling(sites::Union{NTuple{2, Int}, Colon}, ::Type{S}, matrix::AbstractMatrix; rows::AbstractVector=SVector('x', 'y', 'z'), cols::AbstractVector=SVector('x', 'y', 'z')) where {S<:SID}
Construct a set of Coupling
s between two Index{<:Union{Int, Colon}, <:SID}
s with the coefficients specified by a matrix.
QuantumLattices.QuantumSystems.Coulomb
— TypeCoulomb(
id::Symbol, value, bondkind, coupling=Coupling(Index(:, FID(:, :, :)), Index(:, FID(:, :, :)))^2;
ishermitian::Bool=true,
amplitude::Union{Function, Nothing}=nothing,
modulate::Union{Function, Bool}=true
)
Coulomb term.
Type alias for Term{:Coulomb, id, V, B, C<:TermCoupling, A<:TermAmplitude, M<:TermModulate}
.
QuantumLattices.QuantumSystems.DM
— TypeDM(
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,
modulate::Union{Function, 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
- a
Number
specifying the azimuth angle of a bond in the 2-dimensional case, or - a
Tuple{Number, Number}
specifying the polar and azimuth angle pairs of a bond in the 3-dimensional case, or - an
AbstractVector{<:Number}
specifying the direction of a bond;
and v
can be
- 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 - 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, M<:TermModulate}
.
QuantumLattices.QuantumSystems.Elastic
— TypeElastic(id::Symbol, value, bondkind, coupling; amplitude::Union{Function, Nothing}=nothing, modulate::Union{Function, Bool}=true)
Generic elastic energy of phonons.
Type alias for Term{:Elastic, id, V, B, C<:TermCoupling, A<:TermAmplitude, M<:TermModulate}
QuantumLattices.QuantumSystems.FID
— TypeFID{T, O<:Union{Int, Symbol, Colon}, S<:Union{Rational{Int}, Symbol, Colon}, N<:Union{Int, Symbol, Colon}} <: SimpleIID
The Fock id.
QuantumLattices.QuantumSystems.Fock
— TypeFock{T} <: SimpleInternal{FID{T, Int, Rational{Int}, Int}}
The Fock internal degrees of freedom.
QuantumLattices.QuantumSystems.Heisenberg
— TypeHeisenberg(id::Symbol, value, bondkind; form::Symbol=Symbol("+-z"), amplitude::Union{Function, Nothing}=nothing, modulate::Union{Function, Bool}=true)
Heisenberg term.
Type alias for Term{:Heisenberg, id, V, B, C<:TermCoupling, A<:TermAmplitude, M<:TermModulate}
.
QuantumLattices.QuantumSystems.Hooke
— TypeHooke(id::Symbol, value, bondkind; amplitude::Union{Function, Nothing}=nothing, modulate::Union{Function, Bool}=true)
Potential energy of phonons by the Hooke's law.
Type alias for Term{:Hooke, id, V, B, C<:TermCoupling, A<:TermAmplitude, M<:TermModulate}
QuantumLattices.QuantumSystems.Hopping
— TypeHopping(id::Symbol, value, bondkind, coupling=Coupling(Index(:, FID(:, :, :)), Index(:, FID(:, :, :))); amplitude::Union{Function, Nothing}=nothing, modulate::Union{Function, Bool}=true)
Hopping term.
Type alias for Term{:Hopping, id, V, B, C<:TermCoupling, A<:TermAmplitude, M<:TermModulate}
.
QuantumLattices.QuantumSystems.Hubbard
— TypeHubbard(id::Symbol, value; amplitude::Union{Function, Nothing}=nothing, modulate::Union{Function, Bool}=true)
Hubbard term.
Type alias for Term{:Hubbard, id, V, Int, C<:TermCoupling, A<:TermAmplitude, M<:TermModulate}
.
QuantumLattices.QuantumSystems.InterOrbitalInterSpin
— TypeInterOrbitalInterSpin(id::Symbol, value; amplitude::Union{Function, Nothing}=nothing, modulate::Union{Function, Bool}=true)
Interorbital-interspin term.
Type alias for Term{:InterOrbitalInterSpin, id, V, Int, C<:TermCoupling, A<:TermAmplitude, M<:TermModulate}
.
QuantumLattices.QuantumSystems.InterOrbitalIntraSpin
— TypeInterOrbitalIntraSpin(id::Symbol, value; amplitude::Union{Function, Nothing}=nothing, modulate::Union{Function, Bool}=true)
Interorbital-intraspin term.
Type alias for Term{:InterOrbitalIntraSpin, id, V, Int, C<:TermCoupling, A<:TermAmplitude, M<:TermModulate}
.
QuantumLattices.QuantumSystems.Ising
— TypeIsing(id::Symbol, value, bondkind, direction::Char; amplitude::Union{Function, Nothing}=nothing, modulate::Union{Function, Bool}=true)
Ising term.
Type alias for Term{:Ising, id, V, B, C<:TermCoupling, A<:TermAmplitude, M<:TermModulate}
.
QuantumLattices.QuantumSystems.Kinetic
— TypeKinetic(id::Symbol, value; amplitude::Union{Function, Nothing}=nothing, modulate::Union{Function, Bool}=true)
Kinetic energy of phonons.
Type alias for Term{:Kinetic, id, V, Int, C<:TermCoupling, A<:TermAmplitude, M<:TermModulate}
.
QuantumLattices.QuantumSystems.Kitaev
— TypeKitaev(
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,
modulate::Union{Function, 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
- a
Number
specifying the azimuth angle of a bond in the 2-dimensional case, or - a
Tuple{Number, Number}
specifying the polar and azimuth angle pairs of a bond in the 3-dimensional case, or - an
AbstractVector{<:Number}
specifying the direction of a bond.
Type alias for Term{:Kitaev, id, V, B, C<:TermCoupling, A<:TermAmplitude, M<:TermModulate}
.
QuantumLattices.QuantumSystems.Onsite
— TypeOnsite(id::Symbol, value, coupling=Coupling(Index(:, FID(:, :, :)), Index(:, FID(:, :, :))); ishermitian::Bool=true, amplitude::Union{Function, Nothing}=nothing, modulate::Union{Function, Bool}=true)
Onsite term.
Type alias for Term{:Onsite, id, V, Int, C<:TermCoupling, A<:TermAmplitude, M<:TermModulate}
.
QuantumLattices.QuantumSystems.PID
— TypePID{D<:Union{Char, Symbol, Colon}} <: SimpleIID
The phonon id.
QuantumLattices.QuantumSystems.PairHopping
— TypePairHopping(id::Symbol, value; amplitude::Union{Function, Nothing}=nothing, modulate::Union{Function, Bool}=true)
Pair-hopping term.
Type alias for Term{:PairHopping, id, V, Int, C<:TermCoupling, A<:TermAmplitude, M<:TermModulate}
.
QuantumLattices.QuantumSystems.Pairing
— TypePairing(id::Symbol, value, bondkind, coupling; amplitude::Union{Function, Nothing}=nothing, modulate::Union{Function, Bool}=true)
Pairing term.
Type alias for Term{:Pairing, id, V, B, C<:TermCoupling, A<:TermAmplitude, M<:TermModulate}
.
QuantumLattices.QuantumSystems.Phonon
— TypePhonon <: SimpleInternal{PID{Char}}
The phonon internal degrees of freedom.
QuantumLattices.QuantumSystems.SID
— TypeSID{S, T<:Union{Char, Symbol, Colon}} <: SimpleIID
The spin id.
QuantumLattices.QuantumSystems.SingleIonAnisotropy
— TypeSingleIonAnisotropy(id::Symbol, value, direction::Char; amplitude::Union{Function, Nothing}=nothing, modulate::Union{Function, Bool}=true)
SingleIonAnisotropy(id::Symbol, value, matrix::AbstractMatrix{<:Number}; amplitude::Union{Function, Nothing}=nothing, modulate::Union{Function, Bool}=true)
Single ion anisotropy term.
Type alias for Term{:SingleIonAnisotropy, id, V, Int, C<:TermCoupling, A<:TermAmplitude, M<:TermModulate}
.
QuantumLattices.QuantumSystems.Spin
— TypeSpin{S} <: SimpleInternal{SID{S, Char}}
The spin internal degrees of freedom.
QuantumLattices.QuantumSystems.SpinFlip
— TypeSpinFlip(id::Symbol, value; amplitude::Union{Function, Nothing}=nothing, modulate::Union{Function, Bool}=true)
Spin-flip term.
Type alias for Term{:SpinFlip, id, V, Int, C<:TermCoupling, A<:TermAmplitude, M<:TermModulate}
.
QuantumLattices.QuantumSystems.SpinTerm
— TypeSpinTerm(id::Symbol, value, bondkind, coupling; amplitude::Union{Function, Nothing}=nothing, modulate::Union{Function, Bool}=true)
Generic spin term.
Type alias for Term{:SpinTerm, id, V, B, C<:TermCoupling, A<:TermAmplitude, M<:TermModulate}
.
QuantumLattices.QuantumSystems.Zeeman
— TypeZeeman(id::Symbol, value, direction::Char, g::Number=1; amplitude::Union{Function, Nothing}=nothing, modulate::Union{Function, 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, modulate::Union{Function, Bool}=true)
Zeeman term.
Type alias for Term{:Zeeman, id, V, Int, C<:TermCoupling, A<:TermAmplitude, M<:TermModulate}
.
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,
modulate::Union{Function, 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
- a
Number
specifying the azimuth angle of a bond in the 2-dimensional case, or - a
Tuple{Number, Number}
specifying the polar and azimuth angle pairs of a bond in the 3-dimensional case, or - an
AbstractVector{<:Number}
specifying the direction of a bond.
Type alias for Term{:Γ, id, V, B, C<:TermCoupling, A<:TermAmplitude, M<:TermModulate}
.
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,
modulate::Union{Function, 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
- a
Number
specifying the azimuth angle of a bond in the 2-dimensional case, or - a
Tuple{Number, Number}
specifying the polar and azimuth angle pairs of a bond in the 3-dimensional case, or - an
AbstractVector{<:Number}
specifying the direction of a bond.
Type alias for Term{:Γ′, id, V, B, C<:TermCoupling, A<:TermAmplitude, M<:TermModulate}
.
QuantumLattices.QuantumSystems.@DM_str
— MacroDM"x" => SparseMatrixCSC([0 0 0; 0 0 1; 0 -1 0])
DM"y" => SparseMatrixCSC([0 0 -1; 0 0 0; 1 0 0])
DM"z" => SparseMatrixCSC([0 1 0; -1 0 0; 0 0 0])
The DM coupling matrix.
QuantumLattices.QuantumSystems.@Heisenberg_str
— MacroHeisenberg"" => SparseMatrixCSC([1 0 0; 0 1 0; 0 0 1])
The Heisenberg coupling matrix.
QuantumLattices.QuantumSystems.@Ising_str
— MacroIsing"x" => SparseMatrixCSC([1 0 0; 0 0 0; 0 0 0])
Ising"y" => SparseMatrixCSC([0 0 0; 0 1 0; 0 0 0])
Ising"z" => SparseMatrixCSC([0 0 0; 0 0 0; 0 0 1])
The Ising coupling matrix.
QuantumLattices.QuantumSystems.@L_str
— MacroL"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])
The three-dimensional rotation generators.
QuantumLattices.QuantumSystems.@Γ_str
— MacroΓ"x" => SparseMatrixCSC([0 0 0; 0 0 1; 0 1 0])
Γ"y" => SparseMatrixCSC([0 0 1; 0 0 0; 1 0 0])
Γ"z" => SparseMatrixCSC([0 1 0; 1 0 0; 0 0 0])
The Γ coupling matrix.
QuantumLattices.QuantumSystems.@Γ′_str
— MacroΓ′"x" => SparseMatrixCSC([0 1 1; 1 0 0; 1 0 0])
Γ′"y" => SparseMatrixCSC([0 1 0; 1 0 1; 0 1 0])
Γ′"z" => SparseMatrixCSC([0 0 1; 0 0 1; 1 1 0])
The Γ′ coupling matrix.
QuantumLattices.QuantumSystems.@σ_str
— Macroσ"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])
The Pauli matrix σ⁰, σˣ, σʸ, σᶻ, σ⁺, σ⁻, σ¹¹, σ²².
Base.angle
— Methodangle(id::CompositeIndex{<:Index{Int, <:FID}}, vectors::AbstractVector{<:AbstractVector{<:Number}}, values::AbstractVector{<:Number}) -> Complex{<:Number}
Get the twist phase corresponding to a Fock index.
QuantumLattices.QuantumOperators.matrix
— Methodmatrix(sid::SID{S, Char}, dtype::Type{<:Number}=Complex{Float}) where S -> Matrix{dtype}
matrix(index::Index{<:Union{Int, Colon}, <:SID}, dtype::Type{<:Number}=Complex{Float}) -> Matrix{dtype}
matrix(index::AbstractCompositeIndex{<:Index{<:Union{Int, Colon}, <:SID}}, dtype::Type{<:Number}=Complex{Float}) -> Matrix{dtype}
Get the matrix representation of a sid.
QuantumLattices.QuantumOperators.script
— Methodscript(::Val{:direction}, pid::PID; kwargs...) -> String
Get the requested script of an pid.
QuantumLattices.QuantumOperators.script
— Methodscript(::Val{:orbital}, fid::FID; kwargs...) -> String
script(::Val{:spint}, fid::FID; kwargs...) -> String
script(::Val{:spinsym}, fid::FID; kwargs...) -> String
script(::Val{:nambu}, fid::FID; kwargs...) -> String
Get the requested script of an fid.
QuantumLattices.QuantumOperators.script
— Methodscript(::Val{:tag}, sid::SID; kwargs...) -> String
Get the requested script of an sid.
QuantumLattices.QuantumSystems.isannihilation
— Methodisannihilation(fid::FID) -> Bool
isannihilation(index::Index) -> Bool
isannihilation(index::AbstractCompositeIndex) -> Bool
Judge whether the nambu index is annihilation
.
QuantumLattices.QuantumSystems.iscreation
— Methodiscreation(fid::FID) -> Bool
iscreation(index::Index) -> Bool
iscreation(index::AbstractCompositeIndex) -> Bool
Judge whether the nambu index is creation
.
QuantumLattices.QuantumSystems.isnormalordered
— Methodisnormalordered(opt::Operator{<:Number, <:ID{AbstractCompositeIndex{<:Index{Int, <:FID}}}}) -> Bool
Judge whether an operator is normal ordered.
QuantumLattices.QuantumSystems.totalspin
— Methodtotalspin(::SID) -> Rational{Int}/Int/Symbol
totalspin(::Type{<:SID}) -> Rational{Int}/Int/Symbol
totalspin(::Index{<:Union{Int, Colon}, <:SID}) -> Rational{Int}/Int/Symbol
totalspin(::Type{<:Index{<:Union{Int, Colon}, <:SID}}) -> Rational{Int}/Int/Symbol
totalspin(::AbstractCompositeIndex{<:Index{<:Union{Int, Colon}, <:SID}}) -> Rational{Int}/Int/Symbol
totalspin(::Type{<:AbstractCompositeIndex{<:Index{<:Union{Int, Colon}, <:SID}}}) -> Rational{Int}/Int/Symbol
Get the total spin.
QuantumLattices.QuantumSystems.totalspin
— Methodtotalspin(::Spin) -> Rational{Int}/Int/Symbol
totalspin(::Type{<:Spin}) -> Rational{Int}/Int/Symbol
Get the total spin.
QuantumLattices.expand
— Methodexpand(::Val{:Hooke}, pnc::Coupling{<:Number, <:NTuple{2, Index{<:Union{Int, Colon}, PID{Colon}}}}, bond::Bond, hilbert::Hilbert) -> PPExpand
Expand the default phonon potential coupling on a given bond.
QuantumLattices.permute
— Methodpermute(id₁::FID, id₂::FID) -> Tuple{Vararg{Operator}}
Permute two Fock indexes and get the result.
QuantumLattices.permute
— Methodpermute(id₁::PID, id₂::PID) -> Tuple{Vararg{Operator}}
Permute two phonon indexes and get the result.
QuantumLattices.permute
— Methodpermute(id₁::SID, id₂::SID) -> Tuple{Vararg{Operator}}
Permute two spin indexes and get the result.