Skip to content

Commit

Permalink
move express definitions so tests don't fail
Browse files Browse the repository at this point in the history
  • Loading branch information
apkille committed Jan 16, 2025
1 parent 1adf939 commit 5d78e5f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/express.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ for formalism-specific cases, e.g., for `QuantumCliffordRepr`.
"""
function express end

express(obj) = express(obj, QuantumOpticsRepr()) # The default representation
express(s::Number, repr::AbstractRepresentation, use::AbstractUse) = s
express(s, repr::AbstractRepresentation) = express(s, repr, UseAsState())

"""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
struct UseAsObservable <: AbstractUse end

express(obj) = express(obj, QuantumOpticsRepr()) # The default representation
express(s::Number, repr::AbstractRepresentation, use::AbstractUse) = s
express(s, repr::AbstractRepresentation) = express(s, repr, UseAsState())

##
# Commonly used representations -- interfaces for each one defined in separate packages
##
Expand Down

0 comments on commit 5d78e5f

Please sign in to comment.