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