@@ -43,18 +43,18 @@ function algorithm_check(tns::Union{AbstractBeliefPropagationCache, TensorNetwor
4343 return error (" Expected BeliefPropagationCache or TensorNetworkState for 'loop correctiom' algorithm, got $(typeof (tns)) " )
4444 end
4545
46- if f ∈ [" normalize" , " expect" , " entanglement" , " sample" ]
46+ if f ∈ [" normalize" , " expect" , " entanglement" , " sample" , " truncate " ]
4747 return error (" Loop correction-based contraction not supported for this functionality yet" )
4848 end
4949 elseif alg == " boundarymps"
5050 if ! ((tns isa BoundaryMPSCache) || (tns isa TensorNetworkState))
5151 return error (" Expected BoundaryMPSCache or TensorNetworkState for 'boundarymps' algorithm, got $(typeof (tns)) " )
5252 end
53- if f ∈ [" normalize" , " entanglement" ]
53+ if f ∈ [" normalize" , " entanglement" , " truncate " ]
5454 return error (" boundarymps contraction not supported for this functionality yet" )
5555 end
5656 elseif alg == " exact"
57- if f ∈ [" normalize" , " entanglement" , " sample" ]
57+ if f ∈ [" normalize" , " entanglement" , " sample" , " truncate " ]
5858 return error (" exact contraction not supported for this functionality yet" )
5959 end
6060 elseif alg ∉ [" exact" , " bp" , " loopcorrections" , " boundarymps" ]
6666
6767default_alg (bp_cache:: BeliefPropagationCache ) = " bp"
6868default_alg (bmps_cache:: BoundaryMPSCache ) = " boundarymps"
69- default_alg (any) = error (" You must specify a contraction algorithm. Currently supported: exact, bp and boundarymps." )
69+ default_alg (any) = error (" You must specify a contraction algorithm. Currently supported: exact, bp and boundarymps." )
0 commit comments