| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Qubits
Description
- Module : Qubits
- Description : Definitions of |0>, |1>, |+> and |->
- Copyright : (c) Mihai Sebastian Ardelean, 2017
- License : BSD3
- Maintainer : ardeleanasm@gmail.com
- Portability : POSIX
Documentation
- qOne function is used to represent a 1 qubit |1>
>>>qOne(2><1) [ 0.0 :+ 0.0 , 1.0 :+ 0.0 ]
- qZero function is used to represent a 0 qubit |0>
>>>qZero(2><1) [ 1.0 :+ 0.0 , 0.0 :+ 0.0 ]
- qPlus function is used to represent a + qubit |+>
- |+> can be also obtained by applying Hadamard Gate on |0>. See
applyfor more information
>>>qPlus(2><1) [ 0.7071067811865475 :+ 0.0 , 0.7071067811865475 :+ 0.0 ]
- qMinus function is used to represent a - qubit |->
- Same as |+>, qubit |-> can be obtained by applying Hadamard Gate on |1>. See
applyfor more information
>>>qMinus(2><1) [ 0.7071067811865475 :+ 0.0 , (-0.7071067811865475) :+ (-0.0) ]