Quantum Systems

QuantumLattices.QuantumSystems.blockConstant
*(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.

source
QuantumLattices.DegreesOfFreedom.MatrixCouplingMethod
MatrixCoupling(sites::Union{NTuple{2, Int}, Colon}, ::Type{PID}, 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(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 Couplings between two Index{<:Union{Int, Colon}, <:FID}s with the coefficients specified by matrices acting on separated internal spaces.

source
QuantumLattices.DegreesOfFreedom.MatrixCouplingMethod
MatrixCoupling(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 Couplings between two Index{<:Union{Int, Colon}, <:SID}s with the coefficients specified by a matrix.

source
QuantumLattices.QuantumSystems.CoulombType
Coulomb(
    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}.

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,
    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

  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, M<:TermModulate}.

source
QuantumLattices.QuantumSystems.ElasticType
Elastic(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}

source
QuantumLattices.QuantumSystems.HeisenbergType
Heisenberg(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}.

source
QuantumLattices.QuantumSystems.HookeType
Hooke(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}

source
QuantumLattices.QuantumSystems.HoppingType
Hopping(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}.

source
QuantumLattices.QuantumSystems.HubbardType
Hubbard(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}.

source
QuantumLattices.QuantumSystems.InterOrbitalInterSpinType
InterOrbitalInterSpin(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}.

source
QuantumLattices.QuantumSystems.InterOrbitalIntraSpinType
InterOrbitalIntraSpin(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}.

source
QuantumLattices.QuantumSystems.IsingType
Ising(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}.

source
QuantumLattices.QuantumSystems.KineticType
Kinetic(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}.

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,
    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

  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, M<:TermModulate}.

source
QuantumLattices.QuantumSystems.OnsiteType
Onsite(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}.

source
QuantumLattices.QuantumSystems.PairHoppingType
PairHopping(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}.

source
QuantumLattices.QuantumSystems.PairingType
Pairing(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}.

source
QuantumLattices.QuantumSystems.SingleIonAnisotropyType
SingleIonAnisotropy(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}.

source
QuantumLattices.QuantumSystems.SpinFlipType
SpinFlip(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}.

source
QuantumLattices.QuantumSystems.SpinTermType
SpinTerm(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}.

source
QuantumLattices.QuantumSystems.ZeemanType
Zeeman(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}.

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,
    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

  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, M<:TermModulate}.

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,
    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

  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, M<:TermModulate}.

source
QuantumLattices.QuantumSystems.@DM_strMacro
DM"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.

source
QuantumLattices.QuantumSystems.@Ising_strMacro
Ising"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.

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])

The three-dimensional rotation generators.

source
QuantumLattices.QuantumSystems.@Γ_strMacro
Γ"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.

source
QuantumLattices.QuantumSystems.@Γ′_strMacro
Γ′"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.

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])

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

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

Get the twist phase corresponding to a Fock index.

source
QuantumLattices.QuantumOperators.matrixMethod
matrix(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.

source
QuantumLattices.QuantumOperators.scriptMethod
script(::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.

source
QuantumLattices.QuantumSystems.totalspinMethod
totalspin(::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.

source
QuantumLattices.expandMethod
expand(::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.

source