In PEPSKit, when a trunc::SiteDependentTruncation is passed to the time evolution algorithm of a bipartite state, we need to check if trunc matches the bipartite structure by something like:
function _is_bipartite(trunc::SiteDependentTruncation)
(size(trunc, 2) == size(trunc, 3) == 2) || (return false)
# d = 1, 2 for x, y bond truncations
for (d, c) in Iterators.product(1:2, 1:2)
(trunc[d, 1, c] == trunc[d, 2, _next(c, 2)]) || (return false)
end
return true
end
This requires the equality of TruncationStrategys to be well-defined. Currently TruncationSpace (only exists in TensorKit) doesn't work for all sectors:
using TensorKit
t1 = truncspace(ℂ^3)
t2 = truncspace(ℂ^3)
@show t1 == t2 # true
t1 = truncspace(Z3Space(0 => 2, 2 => 1))
t2 = truncspace(Z3Space(0 => 2, 2 => 1))
@show t1 == t2 # true
t1 = truncspace(U1Space(0 => 1, 1 => 2))
t2 = truncspace(U1Space(0 => 1, 1 => 2))
@show t1 == t2 # false
t1 = truncspace(SU2Space(0 => 1, 1 => 2))
t2 = truncspace(SU2Space(0 => 1, 1 => 2))
@show t1 == t2 # false
I haven't tested the ones introduced by MatrixAlgebraKit.
In PEPSKit, when a
trunc::SiteDependentTruncationis passed to the time evolution algorithm of a bipartite state, we need to check iftruncmatches the bipartite structure by something like:This requires the equality of
TruncationStrategys to be well-defined. CurrentlyTruncationSpace(only exists in TensorKit) doesn't work for all sectors:I haven't tested the ones introduced by MatrixAlgebraKit.