Skip to content

Commit

Permalink
Some more aliases and Artifact update (#16)
Browse files Browse the repository at this point in the history
* Project.toml changes

* Format alias

* Some more prettyprinting updates

* Add RepD6 alias

* updates on prettyprinting

* update exports

* Update artifact

* Update artifact path

* Add update explanations to readme
  • Loading branch information
lkdvos authored Mar 16, 2024
1 parent 1d721c4 commit 0a2f564
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 16 deletions.
7 changes: 3 additions & 4 deletions Artifacts.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[fusiondata]
git-tree-sha1 = "a78aef5f0f8ab16826829569a14853251ec367ab"
git-tree-sha1 = "28a4485085322175745017915ba6803fa87a5d3b"

[[fusiondata.download]]
url = "https://github.com/lkdvos/CategoryData.jl/archive/refs/tags/data-v0.1.1.tar.gz"
sha256 = "b2749f171756f2a9b6799e00716411a5deff5dba4059b2a6a37a41b610eb5821"

sha256 = "3c4cc655e6d173f4597b84edf18a2c9a1040407ad5e13ebc4a697a5aa69d3d76"
url = "https://github.com/lkdvos/CategoryData.jl/archive/refs/tags/data-v0.1.2.tar.gz"
3 changes: 1 addition & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ version = "0.2.3"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
Inflate = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce"
SparseArrayKit = "a9a3c162-d163-4c15-8926-b8794fbefed2"
Tar = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
TensorKit = "07d1fe3e-3e46-537d-9eac-e9e13d0d4cec"
TestExtras = "5ed8adda-3752-4e41-b88a-e8b09835ee3a"

[compat]
Downloads = "1"
Expand All @@ -22,6 +20,7 @@ SHA = "0.7, 1"
SparseArrayKit = "0.2, 0.3"
Tar = "1"
TensorKit = "0.11, 0.12"
TestExtras = "0.2"
julia = "1.6"

[extras]
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,17 @@ using TensorKit, CategoryData

t = TensorMap(rand, ComplexF64, Vect[𝒪](1 => 2, 2 => 2) Vect[𝒪](1 =>2, 2 => 2))
```

# Artifacts

The data for the fusion categories is stored in the `data` github branch, and retrieved using the `Artifacts` package. In particular, in order to add to, or change the data, the following steps should be taken:
1. Update the `data` github branch with the new data.
2. Release/tag a new version of the data `data-vX.Y.Z`, which can then be registered as an artifact.
3. Check the url of the release, which should be of the following form `"https://github.com/lkdvos/CategoryData.jl/archive/refs/tags/data-vX.Y.Z.tar.gz"`
4. Switch to the `main` branch, and update the `Artifact.toml` file. This can be done either manually, or by using `ArtifactUtils.jl`:
```julia-repl
julia> using ArtifactUtils
julia> add_artifact("Artifacts.toml", "fusiondata", "https://github.com/lkdvos/CategoryData.jl/archive/refs/tags/data-vX.Y.Z.tar.gz"; force=true);
```
5. Update the `artifact_path` constant in the source code `src/artifacts.jl`.
6. Push the changes to the `main` branch.
1 change: 1 addition & 0 deletions src/CategoryData.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export FR, UFC, PMFC
export RepA4, E6, Fib, Ising
export Object
export multiplicity, rank, algebraic_structure, selfduality
export S, D, Ƶ

include("categories.jl")
include("objects.jl")
Expand Down
37 changes: 28 additions & 9 deletions src/aliases.jl
Original file line number Diff line number Diff line change
@@ -1,19 +1,38 @@
# Rep[Zₙ] ? Vec[Zₙ]
const Z2 = PMFC{2,1,0,1,0,0}
const RepS3 = PMFC{3,1,0,2,0,0}
const Z3 = PMFC{3,1,2,1,0,0}
const Z2xZ2 = PMFC{4,1,0,1,0,0}
const RepD5 = PMFC{4,1,0,3,0,0}
const Z4 = PMFC{4,1,2,1,0,0}
const Z5 = PMFC{5,1,4,1,0,0}
const Z6 = PMFC{6,1,4,1,0,0}

const Z2xZ2 = PMFC{4,1,0,1,0,0}

# Rep[Dₙ]
const RepD3 = PMFC{3,1,0,2,0,0}
const RepD4 = PMFC{5,1,0,1,3,0}
const RepD5 = PMFC{4,1,0,3,0,0}
const RepD6 = PMFC{6,1,0,2,0,0}
const RepD7 = PMFC{5,1,0,4,0,0}

# Vec[Dₙ]
const VecD3 = UFC{6,1,2,1,0}

# Rep[Sₙ]
const RepS3 = RepD3
const RepS4 = PMFC{5,1,0,6,1,0}
const Z5 = PMFC{5,1,4,1,0,0}
const Z6 = PMFC{6,1,4,1,0,0}

const H2 = UFC{6,1,2,8,2}
const H3 = UFC{6,1,2,8,3}
# Vec[Sₙ]
const VecS3 = VecD3

# Haagerup
@objectnames H1 = UFC{4,2,0,1,0} I μ η ν
@objectnames H2 = UFC{6,1,2,8,2} I α α² ρ αρ α²ρ
@objectnames H3 = UFC{6,1,2,8,3} I α α² ρ αρ α²ρ

# Centers
Base.getindex(::CenterTable, ::Type{VecS3}) = ZVecS3
@objectnames ZVecS3 = ZVecS3 A B C F G H D E

# Varia
@objectnames Fib = PMFC{2,1,0,2,0,0} I τ
@objectnames Ising = PMFC{3,1,0,1,1,3} I ψ σ
@objectnames H1 = UFC{4,2,0,1,0} I μ η ν
@objectnames ZVecS3 = ZVecS3 A B C F G H D E
2 changes: 1 addition & 1 deletion src/artifacts.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const artifact_path = joinpath(artifact"fusiondata", "CategoryData.jl-data-v0.1.1", "data")
const artifact_path = joinpath(artifact"fusiondata", "CategoryData.jl-data-v0.1.2", "data")

function list_fusionrings()
foldername = joinpath(artifact_path, "Nsymbols")
Expand Down
43 changes: 43 additions & 0 deletions src/prettyprinting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,46 @@ function Base.show(io::IO, ::MIME"text/plain", ψ::Object{FR}) where {FR<:Fusion
print(io, ψ.id)
end
end

# Grouplike things
# ----------------
abstract type D{N} <: TensorKit.Group end

const D₃ = D{3}
const D₄ = D{4}
const D₅ = D{5}
const D₆ = D{6}

abstract type S{N} <: TensorKit.Group end

const S₃ = S{3} # == D₃
const S₄ = S{4}

function Base.getindex(::TensorKit.IrrepTable, G::Type{D{N}}) where {N}
𝒞 = N == 3 ? RepD3 :
N == 4 ? RepD4 :
N == 5 ? RepD5 :
N == 6 ? RepD7 :
throw(ArgumentError("Rep[D{$N}] not implemented."))
return Object{𝒞}
end

function Base.getindex(::TensorKit.IrrepTable, G::Type{S{N}}) where {N}
𝒞 = N == 3 ? RepS3 :
N == 4 ? RepS4 :
throw(ArgumentError("Rep[S{$N}] not implemented."))
return Object{𝒞}
end

# Centers
# -------

struct CenterTable end

"""
const Ƶ
A constant of singleton type used as `Ƶ[C]` with `C<:FusionCategory` to construct or obtain
the concrete type of the center of the category `C`.
"""
const Ƶ = CenterTable()

0 comments on commit 0a2f564

Please sign in to comment.