TangentMps.jl
TangentMps.al_from_ac_and_c
TangentMps.ar_from_ac_and_c
TangentMps.ibcleft
TangentMps.ibcright
TangentMps.mixedcanonical
TangentMps.mul_matrix_from_left
TangentMps.mul_matrix_from_right
TangentMps.mul_operator_onsite
TangentMps.mul_operator_with_left
TangentMps.mul_operator_with_right
TangentMps.tdvpstep
TangentMps.transfer_from_left
TangentMps.transfer_from_left
TangentMps.transfer_from_right
TangentMps.transfer_from_right
TangentMps.twosite_variance
TangentMps.vumpsstep
TangentMps.al_from_ac_and_c
— Methodal_from_ac_and_c(AC, C)
Compute AL which satisfies mul_matrix_from_right(AL, C) ≈ AC
Return values:
AL, ϵL = al_from_ac_and_c(AC, C)
where ϵL = norm(mul_matrix_from_right(AL, C) - AC)
TangentMps.ar_from_ac_and_c
— Methodar_from_ac_and_c(AC, C)
Compute AR which satisfies mul_matrix_from_left(AR, C) ≈ AC
Return values:
AR, ϵR = ar_from_ac_and_c(AC, C)
where ϵR = norm(mul_matrix_from_left(AR, C) - AC)
TangentMps.ibcleft
— Methodibcleft(O, AL, C; kwargs...)
Compute left infinite boundary condition, defined by
┌────────┐ ┌────────┐ ┌─ ┌────────┐ ─┐ P
┌──1 AL 2───1 AL 2─── ┌┘ ───1 AL 2─── └┐ ───(2)
│ └────3───┘ └────3───┘ │ ┌┐ └────3───┘ │
│ 3────────────4 │ ─┘│ │ │
│ ( O ) │ │ ─── │ │
│ 1────────────2 │ │ │ │
│ ┌────3───┐ ┌────3───┐ │ ──┴── ┌────3───┐ │
└──1conj(AL)2───1conj(AL)2─── └┐ ───1conj(AL)2─── ┌┘ ───(1)
└────────┘ └────────┘ └─ └────────┘ ─┘
Return values:
ibc, info = ibcleft(O, AL, C)
Arguments:
O
: Hamiltonian (only two-site operator is supported)AL
: left-canonical tensor of mixed-canonical uniform MPS representationC
: center matrix of mixed-canonical uniform MPS representation
If O
, AL
and C
is AbstractArray
oblect, nothing have to be done. The following methods should be defined:
TangentMps.transfer_from_left(X, O, AL)
TangentMps.transfer_from_left(X, O, (AL, AL))
TangentMps.similar_normalized_eye(X)
Base.*(X, Y)
Base.*(x::Number, X)
Base.+(X, Y)
Base.adjoint(X)
Base.eltype(X)
Base.similar(X, [T::Type<:Number])
Base.fill!(X, α::Number)
Base.copyto!(X, Y)
LinearAlgebra.mul!(X, Y, α::Number)
LinearAlgebra.rmul!(X, α::Number)
LinearAlgebra.axpy!(α::Number, X, Y)
LinearAlgebra.axpby!(α::Number, X, β::Number, Y)
LinearAlgebra.tr(X)
LinearAlgebra.dot(X,Y)
LinearAlgebra.norm(X)
where typeof(X) == typeof(Y) == typeof(C)
is satisfied.
Keyword arguments:
Keyword arguments are passed to KrylovKit.linsolve
used in ibc_left
.
atol::Real
: the requested accuracy, i.e. absolute tolerance, on the norm of the residual.rtol::Real
: the requested accuracy on the norm of the residual, relative to the norm of the right hand sideb
.tol::Real
: the requested accuracy on the norm of the residual which is actually used, but which defaults tomax(atol, rtol*norm(b))
. So eitheratol
andrtol
or directly usetol
(in which case the value ofatol
andrtol
will be ignored).krylovdim::Integer
: the maximum dimension of the Krylov subspace that will be constructed.maxiter::Integer
: the number of times the Krylov subspace can be rebuilt; see below for further details on the algorithms.
TangentMps.ibcright
— Methodibcright(O, AR, C; kwargs...)
Compute left infinite boundary condition, defined by
┌─ ┌────────┐ ─┐ P ┌────────┐ ┌────────┐
(1)─── ┌┘ ───1 AR 2─── └┐ ───1 AR 2───1 AR 2──┐
│ ┌┐ └────3───┘ │ └────3───┘ └────3───┘ │
│ ─┘│ │ │ 3────────────4 │
│ │ ─── │ │ ( O ) │
│ │ │ │ 1────────────2 │
│ ──┴── ┌────3───┐ │ ┌────3───┐ ┌────3───┐ │
(2)─── └┐ ───1conj(AR)2─── ┌┘ ───1conj(AR)2───1conj(AR)2──┘
└─ └────────┘ ─┘ └────────┘ └────────┘
Return values:
ibc, info = ibcright(O, AR, C)
Arguments:
O
: Hamiltonian (only two-site operator is supported)AR
: right-canonical tensor of mixed-canonical uniform MPS representationC
: center matrix of mixed-canonical uniform MPS representation
If O
, AR
and C
is AbstractArray
oblect, nothing have to be done. The following methods should be defined:
TangentMps.transfer_from_right(X, O, AR)
TangentMps.transfer_from_right(X, O, (AR, AR))
TangentMps.similar_normalized_eye(X)
Base.*(X, Y)
Base.*(x::Number, X)
Base.+(X, Y)
Base.adjoint(X)
Base.eltype(X)
Base.similar(X, [T::Type<:Number])
Base.fill!(X, α::Number)
Base.copyto!(X, Y)
LinearAlgebra.mul!(X, Y, α::Number)
LinearAlgebra.rmul!(X, α::Number)
LinearAlgebra.axpy!(α::Number, X, Y)
LinearAlgebra.axpby!(α::Number, X, β::Number, Y)
LinearAlgebra.tr(X)
LinearAlgebra.dot(X,Y)
LinearAlgebra.norm(X)
where typeof(X) == typeof(Y) == typeof(C)
is satisfied.
Keyword arguments:
Keyword arguments are passed to KrylovKit.linsolve
used in ibc_left
.
atol::Real
: the requested accuracy, i.e. absolute tolerance, on the norm of the residual.rtol::Real
: the requested accuracy on the norm of the residual, relative to the norm of the right hand sideb
.tol::Real
: the requested accuracy on the norm of the residual which is actually used, but which defaults tomax(atol, rtol*norm(b))
. So eitheratol
andrtol
or directly usetol
(in which case the value ofatol
andrtol
will be ignored).krylovdim::Integer
: the maximum dimension of the Krylov subspace that will be constructed.maxiter::Integer
: the number of times the Krylov subspace can be rebuilt; see below for further details on the algorithms.
TangentMps.mixedcanonical
— Methodmixedcanonical(A)
convert non-canonical uniform MPS |Ψ(A)⟩ = ∑ vₗ^† (∏ᵢ A^{sᵢ}) vᵣ |{s}⟩
to mixed-canonical uniform MPS |Ψ(AL, AR, AC, C)⟩ = ∑ vₗ^† (∏ᵢ AL^{sᵢ}) AC^{sⱼ} (∏ᵢ AR^{sᵢ}) vᵣ |{s}⟩ = ∑ vₗ^† (∏ᵢ AL^{sᵢ}) C (∏ᵢ AR^{sᵢ}) vᵣ |{s}⟩
Return values:
AL, AR, AC, C = mixedcanonical(A)
TangentMps.mul_matrix_from_left
— Methodmul_matrix_from_left(A, X)
Λ ┌───┐
(1)─1X2─1 A 2─(2)
V └─3─┘
│
(3)
TangentMps.mul_matrix_from_right
— Methodmul_matrix_from_right(A, X)
┌───┐ Λ
(1)─1 A 2─1X2─(2)
└─3─┘ V
│
(3)
TangentMps.mul_operator_onsite
— Methodmul_operator_onsite(A, O)
┌───┐
(1)─1 A 2─(2)
└─3─┘
│
.2.
( O )
`1'
│
(3)
TangentMps.mul_operator_with_left
— Methodmul_operator_with_left(A, O, AL)
┌────────┐ ┌───┐
┌1 AL 2──1 A 2─┐
│└────3───┘ └─3─┘ │
│ │ │ │
│ .3────────4. │
│ ( O ) │
│ `1────────2' │
│ │ │ │
│┌────3───┐ │ │
└1conj(AL)2─┐ │ ┌┘
└────────┘ │ │ │
(1)─────────┘ (3) └(2)
TangentMps.mul_operator_with_right
— Methodmul_operator_with_right(A, O, AR)
┌───┐ ┌────────┐
┌─1 A 2──1 AR 2┐
│ └─3─┘ └───3────┘│
│ │ │ │
│ .3────────4. │
│ ( O ) │
│ `1────────2' │
│ │ │ │
│ │ ┌───3────┐│
└┐ │ ┌─1conj(AR)2┘
│ │ │ └────────┘
(1)┘ (3) └───────────(2)
TangentMps.tdvpstep
— Methodtdvpstep(O, dt, AL, AR, AC, C; kwargs...)
tdvpstep(O, dt, AL, AC, C; kwargs...) # with inversion symmetry
Return values:
`(AL, AR, AC, C), norm, (ϵL, ϵR), info = tdvpstep(O, AL, AR, AC, C; kwargs...)`
`(AL, AC, C), norm, (ϵL,), info = tdvpstep(O, AL, AC, C; kwargs...)`
where norm
denotes || exp(dt*O)|Ψ(AL, AR, AC, C)⟩ || / || |Ψ(AL, AR, AC, C)⟩ ||
TangentMps.transfer_from_left
— Functiontransfer_from_left(X, [O,] (AL, AR), [(BL, BR)=(AL, AR)])
Λ
╱ ╲ ┌────────┐ ┌────────┐
┌1 X 2─1 AL 2──1 AR 2─(2)
│ ╲ ╱ └────3───┘ └────3───┘
│ V │ │
│ .3───────────4.
│ ( O )
│ `1───────────2'
│ │ │
│ ┌────3───┐ ┌────3───┐
└──────1conj(BL)2──1conj(BR)2─┐
└────────┘ └────────┘ │
(1)───────────────────────────┘
TangentMps.transfer_from_left
— Functiontransfer_from_left(X, [O,] A, [B=A])
Λ
╱ ╲ ┌───────┐
┌1 X 2─1 A 2─(2)
│ ╲ ╱ └───3───┘
│ V │
│ .2.
│ ( O )
│ `1'
│ │
│ ┌───3───┐
└──────1conj(B)2─┐
└───────┘ │
(1)──────────────┘
TangentMps.transfer_from_right
— Functiontransfer_from_right(X, [O,] (AL, AR), [(BL, BR)=(AL, AR)])
Λ
┌────────┐ ┌────────┐ ╱ ╲
(1)─1 AL 2──1 AR 2─1 X 2┐
└────3───┘ └────3───┘ ╲ ╱ │
│ │ V │
.3───────────4. │
( O ) │
`1───────────2' │
│ │ │
┌────3───┐ ┌────3───┐ │
┌───1conj(BL)2──1conj(BR)2──────┘
│ └────────┘ └────────┘
└───────────────────────────────(2)
TangentMps.transfer_from_right
— Functiontransfer_from_right(X, [O,] A, [B=A])
Λ
┌───────┐ ╱ ╲
(1)─1 A 2─1 X 2─┐
└───3───┘ ╲ ╱ │
│ V │
.2. │
( O ) │
`1' │
│ │
┌───3───┐ │
┌───1conj(B)2───────┘
│ └───────┘
└───────────────────(2)
TangentMps.twosite_variance
— Methodtwosite_variance(AL, AC, VL, VR, O)
┌────────┐ ┌────────┐
┌─1 AL 2────1 AC 2─┐
│ └────3───┘ └───3────┘ │
│ │ │ │
│ .─3────────────4──. │
│ ( O ) │
│ `─1────────────2──' │
│ │ │ │
│ ┌────3───┐ ┌───3────┐ │
└─1conj(VL)2┐ ┌1conj(VR)2─┘
└────────┘│ │└────────┘
(1)─────────┘ └─────────(2)
TangentMps.vumpsstep
— Methodvumpsstep(O, AL, AR, AC, C; kwargs...)
vumpsstep(O, AL, AC, C; kwargs...) # with inversion symmetry
Return values:
`(AL, AR, AC, C), (ϵL, ϵR), info = vumpsstep(O, AL, AR, AC, C; kwargs...)`
`(AL, AC, C), (ϵL,), info = vumpsstep(O, AL, AC, C; kwargs...)`