module MatrixProductStateTools

using SymTensors
using QuantumModels

using Random
using LinearAlgebra
using KrylovKit
using TensorOperations

#using DataStructures

import Base: convert, size
import LinearAlgebra: norm, normalize!

const Tensor{T, N} = Union{SymTensor{S, T, N}, Array{T,N}} where{S}
#const Tensor{T} = Union{SymTensor{S, T}, Array{T}} where{S}

include("mpsutils.jl")
include("symmpo.jl")
include("mpo.jl")
include("mpogen.jl")
#include("imps.jl")
include("symmps.jl")
include("mps.jl")

export MPState, U1MPS, MPS
export MPOperator, U1MPO, MPO

export bonddim
export bondspace
#export MatrixProductOperator
#export MatrixProductState
#export SymMatrixProductState
#export SymMatrixProductOperator
#export InfiniteMatrixProductState

export svdtrunc
#export randmps

export normalize!
export center, center_at!

export leftspace, rightspace
export entanglemententropy
export entanglementspectrum
export measure
#export measure_1point, measure_2point
#export measure_bond
#export half_measurement_index
#export measure_mpo
#export apply_2siteoperator!
#export apply_1siteoperator!
export apply!
export twosite_tensor
export overlap
#export display_matrices
#export mps_dims_are_consistent

export mps2ketstate

export ketstate2imps

export xxz_mpo
export xxz_u1mpo
export xxzlong_mpo
export qitf_mpo

export mpo2hamiltonian
export generatempo
export generatesymmpo
export generateinfinitempo
export reducempo!
export entropy

end
