Skip to content

Commit

Permalink
add rhoABstar methods
Browse files Browse the repository at this point in the history
  • Loading branch information
BrieucLD committed Dec 7, 2024
1 parent 13648ea commit c4a4bf2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/tensorOps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ end
function rhoAAstar::Array{T1,2}, A::Array{T2,3}) where {T1,T2}
return @tensoropt ρO[a,b] := ρ[a0,b0] * conj(A[a0,a,s]) * A[b0,b,s]
end
function rhoABstar::Array{T1,2}, A::Array{T2,2}, B::Array{T3,2}) where {T1,T2,T3}
@tensoropt ρO = tensorscalar(ρ[a0,b0] * conj(B[a0,s]) * A[b0,s])
end
function rhoABstar::Array{T1,2}, A::Array{T2,3}, B::Array{T3,3}) where {T1,T2,T3}
return @tensoropt ρO[a,b] := ρ[a0,b0] * conj(B[a0,a,s]) * A[b0,b,s]
end

function rhoAAstar::Array{T1,2}, A::Array{T2,4}, indir::Int, outdir::Int) where {T1,T2}
indir==1 && outdir==2 && return @tensoropt ρO[a,b] := ρ[a0,b0] * conj(A[a0,a,c0,s]) * A[b0,b,c0,s]
Expand Down

0 comments on commit c4a4bf2

Please sign in to comment.