Safe Haskell | Safe-Infered |
---|
This module contains the definition of a Type Class that represents a Heap. In the context of QIO, a Heap is the type used to represent a classical basis state. An instance of a Heap is also defined, that makes use of a Map.
Documentation
class Eq h => Heap h whereSource
The Heap Type Class
define an initial
(i.e. empty) Heap
update :: h -> Qbit -> Bool -> hSource
update
the value of a Qubit within the Heap to the given Boolen value
(?) :: h -> Qbit -> Maybe BoolSource
Lookup the value of the given Qubit in the Heap (if it exists)
forget :: h -> Qbit -> hSource
remove the given Qubit from the Heap
hswap :: h -> Qbit -> Qbit -> hSource
Swap the values associated with two Qubits within the Heap