1
- function contract_mpo_mpo (M1:: MPO , M2:: MPO ; alg:: String = " densitymatrix" , kwargs... ):: MPO
1
+ function contract_mpo_mpo (M1:: MPO , M2:: MPO ; alg:: String = " densitymatrix" , cutoff :: Real = 1e-30 , kwargs... ):: MPO
2
2
if alg == " densitymatrix"
3
- return contract_densitymatrix (M1, M2; kwargs... )
3
+ return contract_densitymatrix (M1, M2; cutoff, kwargs... )
4
4
elseif alg == " fit"
5
- return contract_fit (M1, M2; kwargs... )
5
+ return contract_fit (M1, M2; cutoff, kwargs... )
6
6
elseif alg == " zipup"
7
- return ITensors. contract (M1, M2; alg= " zipup" , kwargs... )
7
+ return ITensors. contract (M1, M2; alg= " zipup" , cutoff, kwargs... )
8
8
elseif alg == " naive"
9
- return ITensors. contract (M1, M2; alg= " naive" , kwargs... )
9
+ return ITensors. contract (M1, M2; alg= " naive" , cutoff, kwargs... )
10
10
else
11
11
error (" Unknown algorithm: $alg " )
12
12
end
13
13
14
14
end
15
15
16
- function apply (A:: MPO , Ψ:: MPO ; alg:: String = " fit" , cutoff:: Real = 1e-25 , kwargs... ):: MPO
16
+ function apply (A:: MPO , Ψ:: MPO ; alg:: String = " fit" , cutoff:: Real = 1e-30 , kwargs... ):: MPO
17
17
if :algorithm ∈ keys (kwargs)
18
18
error (" keyword argument :algorithm is not allowed" )
19
19
end
@@ -26,7 +26,7 @@ function apply(A::MPO, Ψ::MPO; alg::String="fit", cutoff::Real=1e-25, kwargs...
26
26
end
27
27
28
28
29
- function apply (A:: MPO , Ψ:: MPS ; alg:: String = " fit" , cutoff:: Real = 1e-25 , kwargs... ):: MPS
29
+ function apply (A:: MPO , Ψ:: MPS ; alg:: String = " fit" , cutoff:: Real = 1e-30 , kwargs... ):: MPS
30
30
if :algorithm ∈ keys (kwargs)
31
31
error (" keyword argument :algorithm is not allowed" )
32
32
end
0 commit comments