Q : Type -> Type The Monad in which quantum computations are performed.
Visibility: public exportQSystem : Nat -> Type A quantum system of size `n` where `n` represents the
number of possible states in the system.
For a quantum system of 3 qubits, `n` would be 8.
because 2^3 = 8.
Visibility: public exportQCircuit : Nat -> Type A quantum circuit is defined as a function that applies
a transformation to a quantum system.
NOTE: The input to the circuit is a linear argument.
Visibility: public exportrunCircuitWith : QSystem n -> QCircuit n -> IO (QSystem n) Run a quantum circuit with a given initial system state.
Example: runCircuitWith (one >< zero >< zero) myCircuit
runs `myCircuit` with the initial state |100>.
Visibility: exportrunCircuit : QCircuit (S n) -> IO (QSystem (S n)) Run a quantum circuit with an initial state where each qubit is |0>.
Example: runCircuit myCircuit runs `myCircuit` with the initial state |000>.
Visibility: exportfinish : (1 _ : QSystem n) -> Q (QSystem n) Finish a quantum circuit by returning the given system state.
Visibility: exportzero : Matrix 2 1 Double Equivalent to |0>, or the column vector [1, 0].
Visibility: exportzeroT : Matrix 1 2 Double Equivalent to <0|, or the row vector [1, 0].
Visibility: exportone : Matrix 2 1 Double Equivalent to |1>, or the column vector [0, 1].
Visibility: exportoneT : Matrix 1 2 Double Equivalent to <1|, or the row vector [0, 1].
Visibility: exportshowStateVec : NonZero n => Matrix n 1 Double -> String Convert a column state vector to a string representation.
Example: showStateVec zero =
|0> : [1.0]
|1> : [0.0]
Visibility: exportprintStateVec : HasIO io => NonZero n => Matrix n 1 Double -> io () Prints a column state vector to the console. See `showStateVec`.
Visibility: export