Skip to content

Commit

Permalink
Remove PU1 and PU1Irrep
Browse files Browse the repository at this point in the history
This might need some more theoretical foundation, which we can add at a later point
  • Loading branch information
lkdvos committed Jan 17, 2024
1 parent 3faebe0 commit 2e7958b
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 50 deletions.
6 changes: 3 additions & 3 deletions src/TensorKit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export Sector, AbstractIrrep, Irrep
export FusionStyle, UniqueFusion, MultipleFusion, MultiplicityFreeFusion,
SimpleFusion, GenericFusion
export BraidingStyle, SymmetricBraiding, Bosonic, Fermionic, Anyonic, NoBraiding
export Trivial, Z2Irrep, Z3Irrep, Z4Irrep, ZNIrrep, U1Irrep, SU2Irrep, CU1Irrep, PU1Irrep
export Trivial, Z2Irrep, Z3Irrep, Z4Irrep, ZNIrrep, U1Irrep, SU2Irrep, CU1Irrep
export FermionParity, FermionNumber, FermionSpin
export FibonacciAnyon, IsingAnyon

Expand All @@ -38,14 +38,14 @@ export infimum, supremum, isisomorphic, ismonomorphic, isepimorphic
export sectortype, sectors, hassector, Nsymbol, Fsymbol, Rsymbol, Bsymbol,
frobeniusschur, twist
export fusiontrees, braid, permute, transpose
export ZNSpace, SU2Irrep, U1Irrep, CU1Irrep, PU1Irrep
export ZNSpace, SU2Irrep, U1Irrep, CU1Irrep
# other fusion tree manipulations, should not be exported:
# export insertat, split, merge, repartition, artin_braid,
# bendleft, bendright, foldleft, foldright, cycleclockwise, cycleanticlockwise

# some unicode
export , , ×, , ℂ, ℝ, ℤ, , , , , , ,
export ℤ₂, ℤ₃, ℤ₄, U₁, SU, SU₂, CU₁, PU₁
export ℤ₂, ℤ₃, ℤ₄, U₁, SU, SU₂, CU₁
export fℤ₂, fU₁, fSU₂
export ℤ₂Space, ℤ₃Space, ℤ₄Space, U₁Space, CU₁Space, SU₂Space

Expand Down
1 change: 0 additions & 1 deletion src/sectors/groups.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ abstract type AbelianGroup <: Group end

abstract type ℤ{N} <: AbelianGroup end
abstract type U₁ <: AbelianGroup end
abstract type PU₁ <: AbelianGroup end
abstract type SU{N} <: Group end
abstract type CU₁ <: Group end

Expand Down
43 changes: 0 additions & 43 deletions src/sectors/irreps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ an integer for a linear representation. However, it is often useful to allow hal
to represent irreps of ``U₁`` subgroups of ``SU₂``, such as the Sz of spin-1/2 system.
Hence, the charge is stored as a `HalfInt` from the package HalfIntegers.jl, but can be
entered as arbitrary `Real`. The sequence of the charges is: 0, 1/2, -1/2, 1, -1, ...
See also: [`PU1Irrep`](@ref)
"""
struct U1Irrep <: AbstractIrrep{U₁}
charge::HalfInt
Expand Down Expand Up @@ -145,47 +143,6 @@ Base.hash(c::U1Irrep, h::UInt) = hash(c.charge, h)
return isless(abs(c1.charge), abs(c2.charge)) || zero(HalfInt) < c1.charge == -c2.charge
end

"""
PU1Irrep(j::Rational)
Irrep[PU₁](j::Rational)
Represents irreps of the group ``PU₁``, corresponding to projective representations of the
group ``U₁``. The irrep is labelled by a charge, which should be a rational number, but can
be entered as arbitrary `Real`. The sequence of the charges is ordered by the absolute
value, with positive entries first. Note that if only half-integer charges are required, it
is better to use [`U1Irrep`](@ref) instead.
See also: [`U1Irrep`](@ref)
"""
struct PU1Irrep <: AbstractIrrep{PU₁}
charge::Rational{Int}
end
Base.getindex(::IrrepTable, ::Type{PU₁}) = PU1Irrep
Base.convert(::Type{PU1Irrep}, c::Real) = PU1Irrep(c)

Base.one(::Type{PU1Irrep}) = PU1Irrep(0)
Base.conj(c::PU1Irrep) = PU1Irrep(-c.charge)
(c1::PU1Irrep, c2::PU1Irrep) = (PU1Irrep(c1.charge + c2.charge),)

Base.IteratorSize(::Type{SectorValues{PU1Irrep}}) = IsInfinite()

# not sure how to define the iteration order here
# function Base.iterate(iter::SectorValues{PU1Irrep}, (p, q)::Tuple{Int,Int}=(0, 1))
# q == 0 && return iterate(iter, (1, p))
# # skip rationals that can be simplified
# gcd(p, q) > 1 && return iterate(iter, (p + 1, q - 1))
# return PU1Irrep(p // q), p > 0 ? (-p, q) : (-p + 1, q - 1)
# end
function Base.iterate(::SectorValues{PU1Irrep}, i=0 // 1)
return i <= 0 ? (PU1Irrep(i), 1 - i) : (PU1Irrep(i), -i)
end

Base.hash(c::PU1Irrep, h::UInt) = hash(c.charge, h)
@inline function Base.isless(c1::PU1Irrep, c2::PU1Irrep)
return isless(abs(c1.charge), abs(c2.charge)) ||
zero(typeof(c1.charge)) < c1.charge == -c2.charge
end

# Non-abelian groups
#------------------------------------------------------------------------------#
# SU2Irrep: irreps of SU2 are labelled by half integers j
Expand Down
2 changes: 0 additions & 2 deletions src/spaces/gradedspace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ const Z3Space = ZNSpace{3}
const Z4Space = ZNSpace{4}
const U1Space = Rep[U₁]
const CU1Space = Rep[CU₁]
const PU1Space = Rep[PU₁]
const SU2Space = Rep[SU₂]

# Unicode alternatives
Expand All @@ -277,5 +276,4 @@ const ℤ₃Space = Z3Space
const ℤ₄Space = Z4Space
const U₁Space = U1Space
const CU₁Space = CU1Space
const PU₁Space = PU1Space
const SU₂Space = SU2Space
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function hasfusiontensor(I::Type{<:Sector})
end
end

sectorlist = (Z2Irrep, Z3Irrep, Z4Irrep, U1Irrep, PU1Irrep, CU1Irrep, SU2Irrep, NewSU2Irrep,
sectorlist = (Z2Irrep, Z3Irrep, Z4Irrep, U1Irrep, CU1Irrep, SU2Irrep, NewSU2Irrep,
FibonacciAnyon, IsingAnyon, FermionParity, FermionParity FermionParity,
Z3Irrep Z4Irrep, FermionParity U1Irrep SU2Irrep,
FermionParity SU2Irrep SU2Irrep, NewSU2Irrep NewSU2Irrep,
Expand Down

0 comments on commit 2e7958b

Please sign in to comment.