Skip to content

Non-existing BraidingTensor constructor encountered in planar contraction #68

Description

@leburgel

Performing this contraction (encountered in finite-temperature MPS routines) on tensors with a non-trivial braiding seems run into a non-existing constructor for TensorKit.BraidingTensor.

The minimal example

using TensorKit
using BlockTensorKit

using TensorKit: ℙ

F = ℙ

x = randn(ComplexF64, ((F^1)  (F^1))  (F^1))
O = randn(ComplexF64, ((F^1  F^4  F^16  F^4)  (F^2))  ((F^2)  (F^1)))
A = randn(ComplexF64, (F^4  F^2  (F^2)')  F^1)
Ab = randn(ComplexF64, (F^4  F^2  (F^2)')  F^1)

@plansor y[-1 -2; -3] ≔ A[-1 4 2; 1] * O[-2 6; 4 5] * τ[5 7; 2 3] *
    conj(Ab[-3 6 7; 8]) * x[1 3; 8]

gives

ERROR: LoadError: MethodError: no method matching BraidingTensor{ComplexF64, SumSpace{GradedSpace{TensorKitSectors.PlanarTrivial, Tuple{Int64}}}, Vector{ComplexF64}}(::GradedSpace{TensorKitSectors.PlanarTrivial, Tuple{…}}, ::SumSpace{GradedSpace{…}})
The type `BraidingTensor{ComplexF64, SumSpace{GradedSpace{TensorKitSectors.PlanarTrivial, Tuple{Int64}}}, Vector{ComplexF64}}` exists, but no method is defined for this combination of argument types when trying to construct it.

Closest candidates are:
  BraidingTensor{T, S, A}(::S, ::S, ::Bool) where {T, S<:ElementarySpace, A<:DenseVector{T}}
   @ TensorKit ~/.julia/packages/TensorKit/zSHBV/src/tensors/braidingtensor.jl:21
  BraidingTensor{T, S, A}(::S, ::S) where {T, S<:ElementarySpace, A<:DenseVector{T}}
   @ TensorKit ~/.julia/packages/TensorKit/zSHBV/src/tensors/braidingtensor.jl:21
  BraidingTensor{T, S, A}(::HomSpace) where {T, S, A}
   @ TensorKit ~/.julia/packages/TensorKit/zSHBV/src/tensors/braidingtensor.jl:45
  ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions