File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change 4444function LinearAlgebra. norm (ft:: FusionTensor )
4545 m = data_matrix (ft)
4646 row_sectors = blocklabels (matrix_row_axis (ft))
47- n2 = sum (
48- quantum_dimension (row_sectors[Int (first (Tuple (b)))]) * norm (m[b])^ 2 for
49- b in eachblockstoredindex (m);
50- init= zero (real (eltype (ft))),
51- )
47+ n2 = sum (eachblockstoredindex (m); init= zero (real (eltype (ft)))) do b
48+ return quantum_dimension (row_sectors[Int (first (Tuple (b)))]) * norm (m[b])^ 2
49+ end
5250 return sqrt (n2)
5351end
5452
5553function LinearAlgebra. tr (ft:: FusionTensor )
5654 m = data_matrix (ft)
5755 row_sectors = blocklabels (matrix_row_axis (ft))
58- return sum (
59- quantum_dimension (row_sectors[Int (first (Tuple (b)))]) * tr (m[b]) for
60- b in eachblockstoredindex (m);
61- init= zero (eltype (ft)),
62- )
56+ return sum (eachblockstoredindex (m); init= zero (eltype (ft))) do b
57+ return quantum_dimension (row_sectors[Int (first (Tuple (b)))]) * tr (m[b])
58+ end
6359end
6460
6561function LinearAlgebra. qr (ft:: FusionTensor )
You can’t perform that action at this time.
0 commit comments