FunnyTN.TensorNetworks
CanonicalityError <: Exception
Canonicality error.
FunnyTN.TensorNetworks.MPO
— Type.MPO{T} <: TensorTrain
Matrix Product Operator.
We use the following convention to number legs: 2 | 1–A–4 | 3
FunnyTN.TensorNetworks.MPS
— Type.MPS{T, BC, TT<:MPSTensor{T}} <: TensorTrain{T, TT}
MPS{BC}(tensors::Vector{TT}, l::Int) -> MPS
matrix product state, BC is the boundary condition, l is the canonical center (0 if not needed).
FunnyTN.TensorNetworks.MPSO
— Type.Tensor Train with homogeneous tensor rank.
TensorTrain{T, TT}<:AbstractTN{T, TT}
Chained tensors.
assert_boundary_match(tensors, bc::Symbol)
FunnyTN.TensorNetworks.assert_chainable
— Method.assert_chainable(tensors)
FunnyTN.TensorNetworks.assert_valid
— Function.assert_valid(tn)
assert tensor network structure tn
is valid.
FunnyTN.TensorNetworks.canomove!
— Method.canomove!(mps::MPS, direction::Symbol; tol::Real=1e-15, D::Int=typemax(Int64), method=:SVD) -> MPS
move canonical center, direction can be :left, :right or Int (Int means moving right for n step).
FunnyTN.TensorNetworks.compress!
— Method.compress!(mps::MPS, D::Int; tol::Real=1e-15, niter::Int=3, method=:SVD) -> MPS
Compress an mps.
FunnyTN.TensorNetworks.hgetindex
— Method.hgetindex(mps::MPS, inds) -> Number
Returns the amplitude of specific configuration in hilbert space, ind can be either integer or tuple.
FunnyTN.TensorNetworks.hsize
— Method.hsize(mps::MPS, [i::Int])
size of hilbert space.
FunnyTN.TensorNetworks.naive_compress!
— Method.naive_compress!(mps::MPS, D::Int; tol::Real=1e-15, method=:SVD) -> MPS
Compress an mps in a naive way.
FunnyTN.TensorNetworks.rand_mps
— Method.rand_mps([::Type], nflavor::Int, bond_dims::Vector{Int}) -> MPS
Random matrix product state.
FunnyTN.TensorNetworks.recanonicalize!
— Method.recanonicalize(mps::MPS; move_right_first::Bool=true, tol::Real=1e-15, D::Int=1000) -> MPS
Trun this MPS into canonical form.
FunnyTN.TensorNetworks.svdtrunc
— Method.svdtrunc(state::Matrix; tol=0)
SVD decomposition and truncate.
FunnyTN.TensorNetworks.vec2mps
— Method.Parse a normal state into a Matrix produdct state.
state: The target state, 1D array. nflavor: The dimension of a single site, integer. l: The division point of left and right canonical scanning, integer between 0 and number of site. method: The method to extract orthonormal matrices. * :qr -> get A,B matrices by the method of QR decomposition, faster, rank revealing in a non-straight-forward way. * :svd -> get A,B matrices by the method of SVD decomposition, slow, rank revealing. tol: The tolerence of singular value, float.
Return an <MPS> instance.
Base.getindex
— Method.MPO Tensor
Base.sum
— Method.Summation over <MPS>es.
Args: tts (list of <MPS>): instances to be added. labels (list of str): the new labels for added state.
Returns: <MPS>, the added MPS.
FunnyTN.TensorNetworks._tt_dadd_bc
— Method.in addition of tensor trains, we need to take boundary condition into consideration.
FunnyTN.TensorNetworks.mapaxis
— Method.MPS Tensor