Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/spaces/homspace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,15 @@ function _contractedspace(
return cod ← dom
end

# generic fallback for mixed elementary space type: compose the intermediate spaces
function _contractedspace(
A::HomSpace, (oindA, cindA)::Index2Tuple,
B::HomSpace, (cindB, oindB)::Index2Tuple,
pAB::Index2Tuple
)
return permute(compose(select(A, (oindA, cindA)), select(B, (cindB, oindB))), pAB)
end

function TensorOperations.tensorcontract(
A::HomSpace, pA::Index2Tuple, conjA::Bool,
B::HomSpace, pB::Index2Tuple, conjB::Bool,
Expand Down
Loading