Operators

Operators in Schwinger.jl are represented by the abstract type SchwingerOperator, with three concrete types:

  • EDOperator: an operator represented as a matrix for its action on a basis of BasisStates
  • ITensorOperator: a matrix product operator using ITensorMPS.jl
  • MPSKitOperator: a matrix product operator using MPSKit.jl

Unified API

Like the Hamiltonian, other operators can be constructed using the unified API with the backend keyword:

W = WilsonLoop(lattice; backend=:ED)
W = WilsonLoop(lattice; backend=:ITensors)
W = WilsonLoop(lattice; backend=:MPSKit)

We can evaluate the expectation of an operator in a state:

using Schwinger
lat = Lattice(10; F = 1, )
gs = groundstate(Hamiltonian(lat; backend=:ED))

sum(electricfields(gs))/10, expectation(AverageElectricField(lat; backend=:ED), gs)
(-0.06311875619670917, -0.06311875619670704 + 1.7347234759768063e-18im)

This can also be carried out manually by acting on the state with the operator:

using LinearAlgebra
dot(gs, AverageElectricField(lat; backend=:ED) * gs)
-0.06311875619670707 + 1.734723475976807e-18im
Schwinger.expectationFunction

expectation(op, state)

Return the expectation value of the operator op in state.

Arguments

  • op::EDOperator`: operator.
  • state::EDState: state.
source

expectation(op, state)

Return the expectation value of the operator op in state.

Arguments

  • op::ITensorOperator`: operator.
  • state::ITensorState: state.
source

expectation(op, state)

Return the expectation value of the operator op in state.

Arguments

  • op::MPSKitOperator`: operator.
  • state::MPSKitState: state.
source
Schwinger.actFunction

act(op, state)

Apply the operator op to the state state.

Arguments

  • op::ITensorOperator: operator.
  • state::ITensorState: state.
source

act(op, state)

Apply the operator op to the state state.

Arguments

  • op::EDOperator: operator.
  • state::EDState: state.
source

act(op, state)

Apply the operator op to the state state.

Arguments

  • op::MPSKitOperator: operator.
  • state::MPSKitState: state.
source

Exact diagonalization

Schwinger.EDWilsonLoopFunction

wilsonloop(hamiltonian, conjugate = false)

Returns the spatial Wilson loop operator for lattice.

Arguments

  • lattice::Lattice: lattice.
  • conjugate::Bool: Conjugation of the Wilson loop.
source
Schwinger.EDWilsonLineFunction

EDWilsonLine(lattice, conjugate = false, flavor = 1, start = 1, finish = N)

Returns the spatial Wilson line operator for lattice.

Arguments

  • lattice::Lattice: 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.
source
Schwinger.EDAverageElectricFieldFunction

EDAverageElectricField(lattice; power = 1, L_max = nothing, universe = 0)

Construct an EDOperator that computes the average electric field (raised to some power).

Arguments

  • lattice::Lattice: 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.
source

ITensors operators

Schwinger.ITensorWilsonLoopFunction

ITensorWilsonLoop(lattice, conjugate = false)

Returns the spatial Wilson loop operator for lattice.

Arguments

  • lattice::Lattice: lattice.
  • conjugate::Bool: Conjugation of the Wilson loop.
source
Schwinger.ITensorWilsonLineFunction

ITensorWilsonLine(lattice, conjugate = false, flavor = 1, start = 1, finish = N)

Returns the spatial Wilson line operator for lattice.

Arguments

  • lattice::Lattice: 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.
source
Schwinger.ITensorAverageElectricFieldFunction

ITensorAverageElectricField(lattice; power = 1, L_max = nothing, universe = 0)

Construct an ITensorOperator that computes the average electric field (raised to some power).

Arguments

  • lattice::Lattice: 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.
source

MPSKit operators

Schwinger.MPSKitWilsonLoopFunction

MPSKitWilsonLoop(lattice, conjugate = false)

Returns the spatial Wilson loop operator for lattice using MPSKit.

Arguments

  • lattice::Lattice: lattice.
  • conjugate::Bool: Conjugation of the Wilson loop.
source
Schwinger.MPSKitWilsonLineFunction

MPSKitWilsonLine(lattice, conjugate = false, flavor = 1, start = 1, finish = N)

Returns the spatial Wilson line operator for lattice using MPSKit.

Arguments

  • lattice::Lattice: 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.
source
Schwinger.MPSKitAverageElectricFieldFunction

MPSKitAverageElectricField(lattice; power = 1, L_max = nothing, universe = 0)

Construct an MPSKitOperator that computes the average electric field (raised to some power).

Arguments

  • lattice::Lattice: The lattice to compute the average electric field on.
  • power::Int=1: The power to raise the electric field to.
  • universe::Int=0: The universe to compute the average electric field in.
  • sitelist::Union{Nothing,Vector{Int}}=nothing: List of sites to average over.
source