Skip to content

Commit f8d45c3

Browse files
committed
have a functioning Fsymbol
1 parent 16e683b commit f8d45c3

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/bimodulesector.jl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ function convert_Fs(Farray_part::Matrix{Float64}) # Farray_part is a matrix with
261261
return data_dict
262262
end
263263

264-
# TODO: figure out correct Fcache type
264+
# TODO: do we want this type for Fcache?
265265
const Fcache = IdDict{Type{<:BimoduleSector},
266266
Array{Dict{NTuple{4, Int64}, Dict{NTuple{6, Int64}, Array{ComplexF64, 4}}}}}()
267267

@@ -280,10 +280,8 @@ function TensorKitSectors.Fsymbol(a::I, b::I, c::I, d::I, e::I,
280280
throw(ArgumentError("invalid fusion channel"))
281281

282282
i, j, k, l = a.i, a.j, b.j, c.j
283-
return get(_get_Fcache(I)[i, j, k, l],
284-
(a.label, b.label, c.label, d.label, e.label, f.label)) do
285-
return zeros(sectorscalartype(A4Object),
286-
(Nsymbol(a, b, e), Nsymbol(e, c, d), Nsymbol(b, c, f),
287-
Nsymbol(a, f, d)))
283+
colordict = _get_Fcache(I)[i][i, j, k, l]
284+
return get(colordict, (a.label, b.label, c.label, d.label, e.label, f.label)) do
285+
return colordict[(a.label, b.label, c.label, d.label, e.label, f.label)]
288286
end
289287
end

0 commit comments

Comments
 (0)