We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
length(::ProductSector)
1 parent 1180232 commit 1a246a1Copy full SHA for 1a246a1
src/product.jl
@@ -16,6 +16,7 @@ end
16
Base.Tuple(a::ProductSector) = a.sectors
17
18
Base.getindex(s::ProductSector, i::Int) = getindex(s.sectors, i)
19
+Base.length(s::ProductSector) = length(s.sectors)
20
Base.iterate(s::ProductSector, args...) = iterate(s.sectors, args...)
21
Base.indexed_iterate(s::ProductSector, args...) = Base.indexed_iterate(s.sectors, args...)
22
test/runtests.jl
@@ -60,6 +60,7 @@ end
60
@test typeof(a ⊠ b) == I1 ⊠ I2
61
end
62
@test @constinferred(Tuple(SU2Irrep(1) ⊠ U1Irrep(0))) == (SU2Irrep(1), U1Irrep(0))
63
+ @test @constinferred(length(FermionParity(1) ⊠ SU2Irrep(1 // 2) ⊠ U1Irrep(1))) == 3
64
65
66
@testset "Issue that came up in #11" begin
0 commit comments