diff --git a/src/QSymbolicsBase/QSymbolicsBase.jl b/src/QSymbolicsBase/QSymbolicsBase.jl index 8825cfe..ab89f7d 100644 --- a/src/QSymbolicsBase/QSymbolicsBase.jl +++ b/src/QSymbolicsBase/QSymbolicsBase.jl @@ -16,7 +16,8 @@ import QuantumInterface: basis,Basis,samebases,IncompatibleBases,SpinBasis,FockBasis,CompositeBasis, nqubits, projector,dagger,tr,ptrace, - AbstractBra,AbstractKet,AbstractOperator,AbstractSuperOperator + AbstractBra,AbstractKet,AbstractOperator,AbstractSuperOperator, + express,AbstractRepresentation,QuantumOpticsRepr,QuantumMCRepr,CliffordRepr export SymQObj,QObj, AbstractRepresentation,AbstractUse, @@ -53,8 +54,6 @@ export SymQObj,QObj, # Metadata cache helpers ## -"""An abstract type for the supported representation of quantum objects.""" -abstract type AbstractRepresentation end abstract type AbstractUse end struct UseAsState <: AbstractUse end struct UseAsOperation <: AbstractUse end diff --git a/src/QSymbolicsBase/express.jl b/src/QSymbolicsBase/express.jl index e40b2f0..19ce8bd 100644 --- a/src/QSymbolicsBase/express.jl +++ b/src/QSymbolicsBase/express.jl @@ -37,8 +37,6 @@ julia> express(QuantumSymbolics.X, CliffordRepr(), UseAsObservable()) + X ``` """ -function express end - function express(state::Symbolic, repr::AbstractRepresentation, use::AbstractUse) md = metadata(state) isnothing(md) && return express_from_cache(express_nolookup(state, repr, use)) @@ -72,23 +70,7 @@ function consistent_representation(reprs,state) end first(reprs) end - -## -# Commonly used representations -- interfaces for each one defined in separate packages -## - -"""Representation using kets, bras, density matrices, and superoperators governed by `QuantumOptics.jl`.""" -@kwdef struct QuantumOpticsRepr <: AbstractRepresentation - cutoff::Int = 2 -end -"""Similar to `QuantumOpticsRepr`, but using trajectories instead of superoperators.""" -struct QuantumMCRepr <: AbstractRepresentation end -"""Representation using tableaux governed by `QuantumClifford.jl`""" -struct CliffordRepr <: AbstractRepresentation end - -express(state::Symbolic) = express(state, QuantumOpticsRepr()) # The default representation express_nolookup(state, ::QuantumMCRepr) = express_nolookup(state, QuantumOpticsRepr()) -express(state) = state function express_nolookup(s, repr::AbstractRepresentation) if isexpr(s) @@ -96,4 +78,4 @@ function express_nolookup(s, repr::AbstractRepresentation) else error("Encountered an object $(s) of type $(typeof(s)) that can not be converted to $(repr) representation") # TODO make a nice error type end -end +end \ No newline at end of file