numeric-quest-0.2.0.2: Math and quantum mechanics

Safe HaskellSafe
LanguageHaskell98

QuantumVector

Documentation

class DiracVector a where Source #

Minimal complete definition

add, scale, reduce, basis, components, compose, norm

Methods

add :: a -> a -> a Source #

scale :: Scalar -> a -> a Source #

reduce :: a -> a Source #

basis :: a -> [a] Source #

components :: a -> [Scalar] Source #

compose :: [Scalar] -> [a] -> a Source #

dimension :: a -> Int Source #

norm :: a -> Double Source #

normalize :: a -> a Source #

Instances

Ord a => DiracVector (Bra a) Source # 

Methods

add :: Bra a -> Bra a -> Bra a Source #

scale :: Scalar -> Bra a -> Bra a Source #

reduce :: Bra a -> Bra a Source #

basis :: Bra a -> [Bra a] Source #

components :: Bra a -> [Scalar] Source #

compose :: [Scalar] -> [Bra a] -> Bra a Source #

dimension :: Bra a -> Int Source #

norm :: Bra a -> Double Source #

normalize :: Bra a -> Bra a Source #

Ord a => DiracVector (Ket a) Source # 

Methods

add :: Ket a -> Ket a -> Ket a Source #

scale :: Scalar -> Ket a -> Ket a Source #

reduce :: Ket a -> Ket a Source #

basis :: Ket a -> [Ket a] Source #

components :: Ket a -> [Scalar] Source #

compose :: [Scalar] -> [Ket a] -> Ket a Source #

dimension :: Ket a -> Int Source #

norm :: Ket a -> Double Source #

normalize :: Ket a -> Ket a Source #

data Ket a Source #

Constructors

KetZero 
Ket a 
Scalar :|> (Ket a) 
(Ket a) :+> (Ket a) 

Instances

(Eq a, Ord a) => Eq (Ket a) Source # 

Methods

(==) :: Ket a -> Ket a -> Bool #

(/=) :: Ket a -> Ket a -> Bool #

(Show a, Eq a, Ord a) => Show (Ket a) Source # 

Methods

showsPrec :: Int -> Ket a -> ShowS #

show :: Ket a -> String #

showList :: [Ket a] -> ShowS #

Ord a => DiracVector (Ket a) Source # 

Methods

add :: Ket a -> Ket a -> Ket a Source #

scale :: Scalar -> Ket a -> Ket a Source #

reduce :: Ket a -> Ket a Source #

basis :: Ket a -> [Ket a] Source #

components :: Ket a -> [Scalar] Source #

compose :: [Scalar] -> [Ket a] -> Ket a Source #

dimension :: Ket a -> Int Source #

norm :: Ket a -> Double Source #

normalize :: Ket a -> Ket a Source #

(*>) :: (Ord a, Ord b) => Ket a -> Ket b -> Ket (Tuple a b) infixl 7 Source #

(|>) :: Ord a => Scalar -> Ket a -> Ket a infix 6 Source #

(+>) :: Ord a => Ket a -> Ket a -> Ket a infixl 5 Source #

reduceKet :: Ord a => Ket a -> Ket a Source #

ketBasis :: Ord a => Ket a -> [Ket a] Source #

toBra :: Ord a => Ket a -> Bra a Source #

data Bra a Source #

Constructors

BraZero 
Bra a 
Scalar :<| (Bra a) 
(Bra a) :<+ (Bra a) 

Instances

(Eq a, Ord a) => Eq (Bra a) Source # 

Methods

(==) :: Bra a -> Bra a -> Bool #

(/=) :: Bra a -> Bra a -> Bool #

(Show a, Eq a, Ord a) => Show (Bra a) Source # 

Methods

showsPrec :: Int -> Bra a -> ShowS #

show :: Bra a -> String #

showList :: [Bra a] -> ShowS #

Ord a => DiracVector (Bra a) Source # 

Methods

add :: Bra a -> Bra a -> Bra a Source #

scale :: Scalar -> Bra a -> Bra a Source #

reduce :: Bra a -> Bra a Source #

basis :: Bra a -> [Bra a] Source #

components :: Bra a -> [Scalar] Source #

compose :: [Scalar] -> [Bra a] -> Bra a Source #

dimension :: Bra a -> Int Source #

norm :: Bra a -> Double Source #

normalize :: Bra a -> Bra a Source #

(<*) :: (Ord a, Ord b) => Bra a -> Bra b -> Bra (Tuple a b) infixl 7 Source #

(<|) :: Ord a => Scalar -> Bra a -> Bra a infix 6 Source #

(<+) :: Ord a => Bra a -> Bra a -> Bra a infixl 5 Source #

reduceBra :: Ord a => Bra a -> Bra a Source #

braBasis :: Ord a => Bra a -> [Bra a] Source #

toKet :: Ord a => Bra a -> Ket a Source #

(<>) :: Ord a => Bra a -> Ket a -> Scalar infix 4 Source #

d :: Eq a => a -> a -> Scalar Source #

closure :: (DiracVector a, DiracVector b) => (a -> b) -> a -> b Source #

(><) :: (DiracVector b, DiracVector a) => (a -> b) -> a -> b infix 5 Source #

label :: t -> Ket t1 -> Ket (t, t1) Source #

label' :: (Ord a, Ord b) => Ket (a, b) -> Ket b Source #

data Tuple a b Source #

Constructors

a :* b 

Instances

(Eq b, Eq a) => Eq (Tuple a b) Source # 

Methods

(==) :: Tuple a b -> Tuple a b -> Bool #

(/=) :: Tuple a b -> Tuple a b -> Bool #

(Ord b, Ord a) => Ord (Tuple a b) Source # 

Methods

compare :: Tuple a b -> Tuple a b -> Ordering #

(<) :: Tuple a b -> Tuple a b -> Bool #

(<=) :: Tuple a b -> Tuple a b -> Bool #

(>) :: Tuple a b -> Tuple a b -> Bool #

(>=) :: Tuple a b -> Tuple a b -> Bool #

max :: Tuple a b -> Tuple a b -> Tuple a b #

min :: Tuple a b -> Tuple a b -> Tuple a b #

(Show a, Show b) => Show (Tuple a b) Source # 

Methods

showsPrec :: Int -> Tuple a b -> ShowS #

show :: Tuple a b -> String #

showList :: [Tuple a b] -> ShowS #