Skip to content

Commit 1cd044a

Browse files
committed
Loosen derivatives type restriction
1 parent dfebfe5 commit 1cd044a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/algorithms/derivatives.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function ∂AC(x::GenericMPSTensor{S,3}, operator::MPOTensor{S}, leftenv::MPSTen
8383
end
8484

8585
# mpo multiline
86-
function ∂AC(x::Vector, opp, leftenv, rightenv)
86+
function ∂AC(x::AbstractVector, opp, leftenv, rightenv)
8787
return circshift(map(∂AC, x, opp, leftenv, rightenv), 1)
8888
end
8989

@@ -109,7 +109,7 @@ function ∂AC2(x::AbstractTensorMap{<:Any,<:Any,3,3}, operator1::MPOTensor,
109109
operator2[7 -6; 4 5] * τ[5 -5; 2 3]
110110
end
111111

112-
function ∂AC2(x::Vector, opp1, opp2, leftenv, rightenv)
112+
function ∂AC2(x::AbstractVector, opp1, opp2, leftenv, rightenv)
113113
return circshift(map(∂AC2, x, opp1, opp2, leftenv, rightenv), 1)
114114
end
115115

@@ -122,7 +122,7 @@ function ∂C(x::MPSBondTensor, leftenv::MPSBondTensor, rightenv::MPSBondTensor)
122122
@plansor toret[-1; -2] := leftenv[-1; 1] * x[1; 2] * rightenv[2; -2]
123123
end
124124

125-
function ∂C(x::Vector, leftenv, rightenv)
125+
function ∂C(x::AbstractVector, leftenv, rightenv)
126126
return circshift(map(t -> ∂C(t...), zip(x, leftenv, rightenv)), 1)
127127
end
128128

0 commit comments

Comments
 (0)