Skip to content

Commit 8031e6a

Browse files
committed
Fix add_physical_charge for fermionic operators
1 parent 24c6730 commit 8031e6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/operators/localoperator.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ TensorKit.spacetype(::Type{T}) where {S, T <: LocalOperator{<:Any, S}} = S
176176
end
177177
f_dag_es = map(1:N) do i
178178
j = 3 * (i - 1) + 1
179-
return tensorexpr(:(fs[$i]), -(N + i), (j + 1, j + 2))
179+
return tensorexpr(:(twistdual(fs[$i]', 1:2)), (j + 1, j + 2), -(N + i))
180180
end
181181
multiplication_ex = Expr(
182-
:call, :*, op_e, f_es..., map(x -> Expr(:call, :conj, x), f_dag_es)...
182+
:call, :*, op_e, f_es..., f_dag_es...
183183
)
184184
return macroexpand(@__MODULE__, :(return @tensor $op_out_e := $multiplication_ex))
185185
end

0 commit comments

Comments
 (0)