Safe Haskell | Safe-Infered |
---|

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 whereSource

The `Qdata`

type class defines the operation a quantum datatype must implement.

Qdata Bool Qbit | The lowest-level instance of Qdata is the relation between Booleans and Qubits. |

Qdata Int QInt | quantum integers form a quantum data type, relating them to the classical Haskell Int type. |

Qdata a qa => Qdata [a] [qa] | A list of quantum data is also a quantum data type |

(Qdata a qa, Qdata b qb) => Qdata (a, b) (qa, qb) | A pair of quantum data types is itself a quantum data type. |

condQRec :: Qdata a qa => [qa] -> [a -> U] -> USource

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