1+ """
2+ express(obj, repr::AbstractRepresentation)
3+ express(obj, repr::AbstractRepresentation, use::AbstractUse)
4+
5+ Translate a quantum object `obj` to a backend representation `repr`. It is relevant to define `use`
6+ for formalism-specific cases, e.g., for `QuantumCliffordRepr`.
7+ """
8+ function express end
9+
10+ """ An abstract type for the supported representation of quantum objects."""
11+ abstract type AbstractRepresentation end
12+ abstract type AbstractUse end
13+ struct UseAsState <: AbstractUse end
14+ struct UseAsOperation <: AbstractUse end
15+ struct UseAsObservable <: AbstractUse end
16+
17+ express (obj) = express (obj, QuantumOpticsRepr ()) # The default representation
18+ express (s:: Number , repr:: AbstractRepresentation , use:: AbstractUse ) = s
19+ express (s, repr:: AbstractRepresentation ) = express (s, repr, UseAsState ())
20+
21+ # #
22+ # Commonly used representations -- interfaces for each one defined in separate packages
23+ # #
24+
25+ """ Representation using kets, bras, density matrices, and superoperators governed by `QuantumOptics.jl`."""
26+ Base. @kwdef struct QuantumOpticsRepr <: AbstractRepresentation
27+ cutoff:: Int = 2
28+ end
29+ """ Similar to `QuantumOpticsRepr`, but using trajectories instead of superoperators."""
30+ struct QuantumMCRepr <: AbstractRepresentation end
31+ """ Representation using tableaux governed by `QuantumClifford.jl`"""
32+ struct CliffordRepr <: AbstractRepresentation end
0 commit comments