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

Conserved currents

The conserved lattice vector (charge) current $j^1$ (ChargeCurrent) and energy current $T^{01} = \mathcal{J}$ (EnergyCurrent), built from each backend's own hopping/mass operators and exactly conserved on the lattice.

Schwinger.ChargeCurrentFunction
ChargeCurrent(lattice, bond; backend=nothing, ...)

Construct the conserved vector current j¹ through bond (bond, bond+1), j¹_n = -i[H, Q_{≤n}], satisfying the lattice continuity equation ∂_t ρ_n = -(j¹_n - j¹_{n-1}). Requires mprime = 0.

source
Schwinger.EnergyCurrentFunction
EnergyCurrent(lattice, site; backend=nothing, ...)

Construct the conserved energy current T⁰¹ at site, 𝒥_n = i[b_{n-1}, b_n], satisfying the exact lattice continuity ∂_t h_n = 𝒥_n - 𝒥_{n+1}. Requires mprime = 0. Valid for interior sites 2 ≤ site ≤ N-1.

source

Exact diagonalization

Schwinger.EDWilsonLoopFunction

EDWilsonLoop(lattice, 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
Schwinger.EDChargeCurrentFunction

EDChargeCurrent(lattice, bond)

Charge (vector) current through bond (n,n+1): the rightward charge flux j¹_n = -i[H, Q_{≤n}] = -i q [Hop(n), N_n]. Requires mprime = 0.

source
Schwinger.EDEnergyCurrentFunction

EDEnergyCurrent(lattice, site)

Energy current 𝒥 = T⁰¹ through site n: the rightward energy flux 𝒥_n = -i[H, E_{<n}] = -i [b_n, b_{n-1}], b_m = Hop(m) + ½[Mass(m)+Mass(m+1)]. Requires mprime = 0.

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
Schwinger.ITensorChargeCurrentFunction

ITensorChargeCurrent(lattice, bond)

Charge (vector) current through bond (n,n+1): the rightward charge flux j¹_n = -i[H, Q_{≤n}] = -i q [Hop(n), N_n]. Requires mprime = 0.

source
Schwinger.ITensorEnergyCurrentFunction

ITensorEnergyCurrent(lattice, site)

Energy current 𝒥 = T⁰¹ through site n: the rightward energy flux 𝒥_n = -i[H, E_{<n}] = -i [b_n, b_{n-1}], b_m = Hop(m) + ½[Mass(m)+Mass(m+1)]. Requires mprime = 0.

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.

On an infinite lattice this returns an InfiniteMPOHamiltonian whose expectation value is the two-site-translation-averaged Wilson line — the length-ℓ = finish - start fermion bilinear χ†χ (with its Jordan–Wigner string) averaged over the two sublattice start sites of the unit cell, (⟨W_{0,ℓ}⟩ + ⟨W_{1,ℓ}⟩)/2. Only ℓ = finish - start matters (absolute positions are meaningless under translation invariance), and finish must be passed explicitly with finish > start.

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
Schwinger.MPSKitChargeCurrentFunction

MPSKitChargeCurrent(lattice, bond)

Charge (vector) current through bond (n,n+1): the rightward charge flux j¹_n = -i[H, Q_{≤n}] = -i q [Hop(n), N_n]. Requires mprime = 0. (See chargecurrents for a memory-light profile that also works on a wavepacket window.)

source
Schwinger.MPSKitEnergyCurrentFunction

MPSKitEnergyCurrent(lattice, site)

Energy current 𝒥 = T⁰¹ through site n: the rightward energy flux 𝒥_n = -i[H, E_{<n}] = -i [b_n, b_{n-1}], b_m = Hop(m) + ½[Mass(m)+Mass(m+1)]. Requires mprime = 0.

source