Operators
Operators in Schwinger.jl are represented by the abstract type SchwingerOperator, with two descendants:
EDOperator: an operator represented as a matrix for its action on a basis ofSchwingerBasisStatesMPOOperator: a matrix product operator, stored as anMPOobject usingITensorMPS.jl
We can evaluate the expectation of an operator in a state:
using Schwinger
lat = SchwingerLattice{10,1}()
gs = groundstate(EDHamiltonian(lat))
sum(electricfields(gs))/10, expectation(EDAverageElectricField(lat), gs)(-0.06311875619670844, -0.06311875619670718 + 2.1684043449710118e-19im)This can also be carried out manually by acting on the state with the operator:
using LinearAlgebra
dot(gs, EDAverageElectricField(lat) * gs)-0.0631187561967071 + 2.168404344971009e-19imSchwinger.expectation — Functionexpectation(op, state)
Return the expectation value of the operator op in state.
Arguments
op::EDOperator{N,F}`: operator.state::SchwingerEDState: state.
expectation(op, state)
Return the expectation value of the operator op in state.
Arguments
op::MPOOperator{N,F}`: operator.state::SchwingerMPS: state.
Schwinger.act — Functionact(op, state)
Apply the operator op to the state state.
Arguments
op::MPOOperator{N,F}: operator.state::SchwingerMPS{N,F}: state.
act(op, state)
Apply the operator op to the state state.
Arguments
op::EDOperator{N,F}: operator.state::SchwingerEDState{N,F}: state.
Exact diagonalization
Schwinger.EDWilsonLoop — Functionwilsonloop(hamiltonian, conjugate = false)
Returns the spatial Wilson loop operator for lattice.
Arguments
lattice::SchwingerLattice: lattice.conjugate::Bool: Conjugation of the Wilson loop.
Schwinger.EDWilsonLine — FunctionEDWilsonLine(lattice, conjugate = false, flavor = 1, start = 1, finish = N)
Returns the spatial Wilson line operator for lattice.
Arguments
lattice::SchwingerLattice: lattice.conjugate::Bool: Conjugation of the Wilson line.flavor::Int: Flavor of the Wilson line.start::Int: Starting site of the Wilson line.finish::Int: Finishing site of the Wilson line.
Schwinger.EDAverageElectricField — FunctionEDAverageElectricField(lattice; power = 1, L_max = nothing, universe = 0)
Construct an EDOperator that computes the average electric field (raised to some power).
Arguments
lattice::SchwingerLattice{N,F}: The lattice to compute the average electric field on.power::Int=1: The power to raise the electric field to.L_max::Union{Nothing,Int}=nothing: The maximum absolute value of L₀.universe::Int=0: The universe to compute the average electric field in.sitelist::Union{Nothing,Vector{Int}}=nothing: List of sites to average over.
Matrix product operators
Schwinger.MPOWilsonLoop — Functionwilsonloop(hamiltonian, conjugate = false)
Returns the spatial Wilson loop operator for lattice.
Arguments
lattice::SchwingerLattice: lattice.conjugate::Bool: Conjugation of the Wilson loop.
Schwinger.MPOWilsonLine — FunctionMPOWilsonLine(lattice, conjugate = false, flavor = 1, start = 1, finish = N)
Returns the spatial Wilson line operator for lattice.
Arguments
lattice::SchwingerLattice: lattice.conjugate::Bool: Conjugation of the Wilson line.flavor::Int: Flavor of the Wilson line.start::Int: Starting site of the Wilson line.finish::Int: Finishing site of the Wilson line.
Schwinger.MPOAverageElectricField — FunctionMPOAverageElectricField(lattice; power = 1, L_max = nothing, universe = 0)
Construct an MPOOperator that computes the average electric field (raised to some power).
Arguments
lattice::SchwingerLattice{N,F}: The lattice to compute the average electric field on.power::Int=1: The power to raise the electric field to.L_max::Union{Nothing,Int}=nothing: The maximum absolute value of L₀.universe::Int=0: The universe to compute the average electric field in.sitelist::Union{Nothing,Vector{Int}}=nothing: List of sites to average over.