learn-physics-0.6.0.0: Haskell code for learning physics

Copyright(c) Scott N. Walck 2016
LicenseBSD3 (see LICENSE)
MaintainerScott N. Walck <walck@lvc.edu>
Stabilityexperimental
Safe HaskellSafe
LanguageHaskell98

Physics.Learn.Ket

Description

This module contains ket vectors, bra vectors, and operators for quantum mechanics.

Synopsis

Documentation

class Mult a b c | a b -> c where Source

Generic multiplication including inner product, outer product, operator product, and whatever else makes sense. No conjugation takes place in this operation.

Methods

(<>) :: a -> b -> c infixl 7 Source

class Dagger a b | a -> b where Source

The adjoint operation on complex numbers, kets, bras, and operators.

Methods

dagger :: a -> b Source

data OrthonormalBasis Source

An orthonormal basis of kets.

makeOB :: [Ket] -> OrthonormalBasis Source

Make an orthonormal basis from a list of linearly independent kets.

xp :: Ket Source

State of a spin-1/2 particle if measurement in the x-direction would give angular momentum +hbar/2.

xm :: Ket Source

State of a spin-1/2 particle if measurement in the x-direction would give angular momentum -hbar/2.

yp :: Ket Source

State of a spin-1/2 particle if measurement in the y-direction would give angular momentum +hbar/2.

ym :: Ket Source

State of a spin-1/2 particle if measurement in the y-direction would give angular momentum -hbar/2.

zp :: Ket Source

State of a spin-1/2 particle if measurement in the z-direction would give angular momentum +hbar/2.

zm :: Ket Source

State of a spin-1/2 particle if measurement in the z-direction would give angular momentum -hbar/2.

np :: Double -> Double -> Ket Source

State of a spin-1/2 particle if measurement in the n-direction, described by spherical polar angle theta and azimuthal angle phi, would give angular momentum +hbar/2.

nm :: Double -> Double -> Ket Source

State of a spin-1/2 particle if measurement in the n-direction, described by spherical polar angle theta and azimuthal angle phi, would give angular momentum -hbar/2.

sx :: Operator Source

The Pauli X operator.

sy :: Operator Source

The Pauli Y operator.

sz :: Operator Source

The Pauli Z operator.