Skip to content

Commit

Permalink
remove nonsense code
Browse files Browse the repository at this point in the history
  • Loading branch information
Fe-r-oz committed Sep 15, 2024
1 parent 066d7c2 commit a30997b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 90 deletions.
6 changes: 0 additions & 6 deletions src/QuantumClifford.jl
Original file line number Diff line number Diff line change
Expand Up @@ -993,23 +993,17 @@ end
# Conversion and promotion
##############################

Base.promote_rule(::Type{<:MixedStabilizer{T}} , ::Type{<:Stabilizer{T}} ) where {T<:Tableau} = Stabilizer{T}
Base.promote_rule(::Type{<:MixedStabilizer{T}} , ::Type{<:MixedStabilizer{T}}) where {T<:Tableau} = Stabilizer{T}
Base.promote_rule(::Type{<:MixedStabilizer{T}} , ::Type{<:Destabilizer{T}} ) where {T<:Tableau} = MixedDestabilizer{T}
Base.promote_rule(::Type{<:Stabilizer{T}} , ::Type{<:Destabilizer{T}} ) where {T<:Tableau} = MixedDestabilizer{T}
Base.promote_rule(::Type{<:Destabilizer{T}} , ::Type{<:Destabilizer{T}} ) where {T<:Tableau} = MixedDestabilizer{T}
Base.promote_rule(::Type{<:MixedDestabilizer{T}}, ::Type{<:Stabilizer{T}} ) where {T<:Tableau} = MixedDestabilizer{T}
Base.promote_rule(::Type{<:MixedDestabilizer{T}}, ::Type{<:Destabilizer{T}} ) where {T<:Tableau} = MixedDestabilizer{T}
Base.promote_rule(::Type{<:MixedDestabilizer{T}}, ::Type{<:MixedStabilizer{T}}) where {T<:Tableau} = MixedDestabilizer{T}

Base.convert(::Type{<:Stabilizer{T}} , x::MixedStabilizer{T} ) where {T<:Tableau} = Stabilizer(tab(x))
Base.convert(::Type{<:MixedStabilizer{T}} , x::MixedStabilizer{T} ) where {T<:Tableau} = Stabilizer(tab(x))
Base.convert(::Type{<:Stabilizer{T}} , x::Destabilizer{T} ) where {T<:Tableau} = MixedDestabilizer(x)
Base.convert(::Type{<:Destabilizer{T}} , x::Destabilizer{T} ) where {T<:Tableau} = MixedDestabilizer(x)
Base.convert(::Type{<:MixedDestabilizer{T}} , x::Stabilizer{T} ) where {T<:Tableau} = MixedDestabilizer(x)
Base.convert(::Type{<:MixedDestabilizer{T}} , x::Destabilizer{T} ) where {T<:Tableau} = MixedDestabilizer(x)
Base.convert(::Type{<:Destabilizer{T}} , x::MixedStabilizer{T} ) where {T<:Tableau} = MixedDestabilizer(Stabilizer(tab(x)))
Base.convert(::Type{<:MixedDestabilizer{T}} , x::MixedStabilizer{T} ) where {T<:Tableau} = MixedDestabilizer(Stabilizer(tab(x)))

##############################
# Helpers for binary codes
Expand Down
75 changes: 0 additions & 75 deletions src/linalg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -194,81 +194,6 @@ julia> tensor(d, md)
+ _X
```
Tensor product between [`MixedStabilizer`](@ref) and [`Stabilizer`](@ref):
```jldoctest promote
julia> ms = MixedStabilizer(S"-XZ//-ZX")
- XZ
- ZX
julia> tensor(S"X", ms)
+ X__
- _XZ
- _ZX
```
Tensor product between [`Stabilizer`](@ref) and [`Destabilizer`](@ref):
```jldoctest promote
julia> tensor(S"X", d)
𝒟ℯ𝓈𝓉𝒶𝒷
+ Z_
- _Y
𝒮𝓉𝒶𝒷
+ X_
- _X
```
Tensor product between [`MixedStabilizer`](@ref) and [`MixedDestabilizer`](@ref):
```jldoctest promote
julia> tensor(md, ms)
𝒟ℯ𝓈𝓉𝒶𝒷
+ Z__
+ _Z_
+ __Z
𝒮𝓉𝒶𝒷━
+ X__
- _XZ
- _ZX
```
Tensor product between [`MixedStabilizer`](@ref) and [`Destabilizer`](@ref):
```jldoctest promote
julia> tensor(d, ms)
𝒟ℯ𝓈𝓉𝒶𝒷
- Y__
+ _Z_
+ __Z
𝒮𝓉𝒶𝒷━
- X__
- _XZ
- _ZX
```
Tensor product between [`Destabilizer`](@ref) and [`Destabilizer`](@ref):
```jldoctest promote
julia> tensor(d, d)
𝒟ℯ𝓈𝓉𝒶𝒷
- Y_
- _Y
𝒮𝓉𝒶𝒷
- X_
- _X
```
Tensor product between [`MixedStabilizer`](@ref) and [`MixedStabilizer`](@ref):
```jldoctest promote
julia> tensor(ms, ms)
- XZ__
- ZX__
- __XZ
- __ZX
```
See also [`tensor_pow`](@ref)."""
function tensor end

Expand Down
9 changes: 0 additions & 9 deletions test/test_stabs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,10 @@
d = random_destabilizer(n)
dmd = dmd
@test mixed_destab_looks_good(dmd)
ms = MixedStabilizer(random_stabilizer(n))
mss = sms
@test mixed_stab_looks_good(mss)
sd = random_stabilizer(n)random_destabilizer(n)
@test mixed_destab_looks_good(sd)
mdms = mdms
@test mixed_destab_looks_good(mdms)
dms = dms
@test mixed_destab_looks_good(dms)
dd = dd
@test destab_looks_good(dd)
msms = msms
@test mixed_stab_looks_good(msms)
end
end

Expand Down

0 comments on commit a30997b

Please sign in to comment.