From 0a2f564fe6d968cac0f56f1e1721c8bcf395e106 Mon Sep 17 00:00:00 2001 From: Lukas <37111893+lkdvos@users.noreply.github.com> Date: Sat, 16 Mar 2024 11:04:00 +0100 Subject: [PATCH] Some more aliases and Artifact update (#16) * 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 --- Artifacts.toml | 7 +++---- Project.toml | 3 +-- README.md | 14 ++++++++++++++ src/CategoryData.jl | 1 + src/aliases.jl | 37 ++++++++++++++++++++++++++++--------- src/artifacts.jl | 2 +- src/prettyprinting.jl | 43 +++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 91 insertions(+), 16 deletions(-) diff --git a/Artifacts.toml b/Artifacts.toml index 8a5a08d..643212d 100644 --- a/Artifacts.toml +++ b/Artifacts.toml @@ -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" - \ No newline at end of file + sha256 = "3c4cc655e6d173f4597b84edf18a2c9a1040407ad5e13ebc4a697a5aa69d3d76" + url = "https://github.com/lkdvos/CategoryData.jl/archive/refs/tags/data-v0.1.2.tar.gz" diff --git a/Project.toml b/Project.toml index d0bf25c..2435ba7 100644 --- a/Project.toml +++ b/Project.toml @@ -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" @@ -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] diff --git a/README.md b/README.md index cd59232..fe880ec 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/src/CategoryData.jl b/src/CategoryData.jl index 217f36c..8a5f762 100644 --- a/src/CategoryData.jl +++ b/src/CategoryData.jl @@ -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") diff --git a/src/aliases.jl b/src/aliases.jl index f67482f..ef21d49 100644 --- a/src/aliases.jl +++ b/src/aliases.jl @@ -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 \ No newline at end of file diff --git a/src/artifacts.jl b/src/artifacts.jl index 8aa1435..d45dd37 100644 --- a/src/artifacts.jl +++ b/src/artifacts.jl @@ -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") diff --git a/src/prettyprinting.jl b/src/prettyprinting.jl index 2045d96..65c1bd9 100644 --- a/src/prettyprinting.jl +++ b/src/prettyprinting.jl @@ -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()