QuantumVector
Documentation
class DiracVector a where
Methods
 add :: a -> a -> a scale :: Scalar -> a -> a reduce :: a -> a basis :: a -> [a] components :: a -> [Scalar] compose :: [Scalar] -> [a] -> a dimension :: a -> Int norm :: a -> Double normalize :: a -> a
Instances
 Ord a => DiracVector (Bra a) Ord a => DiracVector (Ket a)
type Scalar = Complex Double
data Ket a
Constructors
 KetZero Ket a (:|>) Scalar (Ket a) (:+>) (Ket a) (Ket a)
Instances
 Ord a => DiracVector (Ket a) (Eq a, Ord a) => Eq (Ket a) (Show a, Eq a, Ord a) => Show (Ket a)
(*>) :: (Ord a, Ord b) => Ket a -> Ket b -> Ket (Tuple a b)
(|>) :: Ord a => Scalar -> Ket a -> Ket a
(+>) :: Ord a => Ket a -> Ket a -> Ket a
reduceKet :: Ord a => Ket a -> Ket a
ketBasis :: Ord a => Ket a -> [Ket a]
toBra :: Ord a => Ket a -> Bra a
data Bra a
Constructors
 BraZero Bra a (:<|) Scalar (Bra a) (:<+) (Bra a) (Bra a)
Instances
 Ord a => DiracVector (Bra a) (Eq a, Ord a) => Eq (Bra a) (Show a, Eq a, Ord a) => Show (Bra a)
(<*) :: (Ord a, Ord b) => Bra a -> Bra b -> Bra (Tuple a b)
(<|) :: Ord a => Scalar -> Bra a -> Bra a
(<+) :: Ord a => Bra a -> Bra a -> Bra a
reduceBra :: Ord a => Bra a -> Bra a
braBasis :: Ord a => Bra a -> [Bra a]
toKet :: Ord a => Bra a -> Ket a
(<>) :: Ord a => Bra a -> Ket a -> Scalar
d :: Eq a => a -> a -> Scalar
closure :: (DiracVector a, DiracVector b) => (a -> b) -> a -> b
rot :: Ket Int -> Ket (Int, Int)
label' :: (Ord a, Ord b) => Ket (a, b) -> Ket b
rot' :: Ket (Int, Int) -> Ket Int
data Tuple a b
Constructors
 (:*) a b
Instances
 (Eq a, Eq b) => Eq (Tuple a b) (Ord a, Ord b) => Ord (Tuple a b) (Show a, Show b) => Show (Tuple a b)