File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,8 @@ function Base.one(a::IsingBimodule)
8585 return IsingBimodule (a. row, a. col, 0 )
8686end
8787
88+ Base. isone (a:: IsingBimodule ) = leftone (a) == a == rightone (a)
89+
8890function Base. one (:: Type{IsingBimodule} )
8991 throw (ArgumentError (" one of Type IsingBimodule doesn't exist" ))
9092end
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ Istr = TensorKitSectors.type_repr(I)
2323 @test one (C1) == leftone (M) == rightone (Mop)
2424 @test one (D1) == rightone (M) == leftone (Mop)
2525
26+ @test @constinferred (isone (C0))
27+ @test isone (D0)
28+ @test ! isone (C1) && ! isone (D1) && ! isone (M) && ! isone (Mop)
29+
2630 @test eval (Meta. parse (sprint (show, s))) == s
2731 @test @constinferred (hash (s)) == hash (deepcopy (s))
2832 @constinferred dual (s)
You can’t perform that action at this time.
0 commit comments