Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module defines a type class for quantum data types, as well as some instances of this class for pairs, lists, and quantum integers
Documentation
class Qdata a qa | a -> qa, qa -> a where Source #
The Qdata
type class defines the operation a quantum datatype must implement.
Qdata Bool Qbit Source # | The lowest-level instance of Qdata is the relation between Booleans and Qubits. |
Qdata Int QInt Source # | quantum integers form a quantum data type, relating them to the classical Haskell Int type. |
Qdata a qa => Qdata [a] [qa] Source # | A list of quantum data is also a quantum data type |
(Qdata a qa, Qdata b qb) => Qdata (a, b) (qa, qb) Source # | A pair of quantum data types is itself a quantum data type. |
condQRec :: Qdata a qa => [qa] -> [a -> U] -> U Source #
A recursive conditional on a list of quantum data
Quantum integers are of a fixed length, which is defined by this constant. Currently, this is set to 4.
A Quantum integer is a wrapper around a fixed-length list of qubits