Skip to content

Commit

Permalink
update docstring and add AbstractUse method
Browse files Browse the repository at this point in the history
  • Loading branch information
apkille committed Jan 16, 2025
1 parent 74d4d29 commit 1adf939
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/express.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
"""
express(obj, repr::AbstractRepresentation)
express(obj, repr::AbstractRepresentation, use::AbstractUse)
Translate a quantum object `obj` to a backend representation `repr`. It is relevant to define `use`
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
Expand Down

0 comments on commit 1adf939

Please sign in to comment.