bsc-quantic / Tenet.jl

Composable Tensor Network library in Julia
https://bsc-quantic.github.io/Tenet.jl/
Apache License 2.0
18 stars 1 forks source link

Implement Matrix Product Operator (MPO) #9

Closed mofeing closed 1 year ago

mofeing commented 1 year ago

It needs to implement the following ansatz,

abstract type MatrixProductOperator{B<:Bounds} <: Operator{B} end

Define the MPOSampler (check MPSSampler as an example) and implement the methods:

MatrixProductOperator{Open}(arrays; ...)
MatrixProductOperator{Closed}(arrays; ...)

Base.eltype(::MPOSampler{B}) where {B<:Bounds}
Base.rand(::Type{MatrixProductOperator{B}}, ...)

function Base.rand(rng::Random.AbstractRNG, sampler::MPOSampler{Open,T}) where {T}
function Base.rand(rng::Random.AbstractRNG, sampler::MPSSampler{Closed,T}) where {T}

We will also need to implement the contractpath methods between MatrixProductOperators and a MatrixProductState and a MatrixProductOperator, but I'm still figuring it out with just MatrixProductStates.