learn-physics-0.6.3: Haskell code for learning physics

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

Physics.Learn.BlochSphere

Description

This module contains functions for displaying the state of a spin-1/2 particle or other quantum two-level system as a point on the Bloch Sphere.

Synopsis

Documentation

type VisObj = VisObject Double Source #

A Vis object.

toPos :: Vector C -> Position Source #

Convert a 2x1 complex state vector for a qubit into Bloch (x,y,z) coordinates.

ketToPos :: Ket -> Position Source #

Convert a qubit ket into Bloch (x,y,z) coordinates.

staticBlochSphere :: Position -> VisObj Source #

A static VisObj for the state of a qubit.

displayStaticState :: Vector C -> IO () Source #

Display a qubit state vector as a point on the Bloch Sphere.

animatedBlochSphere :: (Double -> Position) -> Float -> VisObj Source #

Given a Bloch vector as a function of time, return a VisObj as a function of time.

simulateBlochSphere :: Double -> Vector C -> (Float -> (Float, Vector C) -> (Float, Vector C)) -> IO () Source #

Given a sample rate, initial qubit state vector, and state propagation function, produce a simulation. The Float in the state propagation function is the time since the beginning of the simulation.

simulateBlochSphereK :: Double -> Ket -> (Float -> (Float, Ket) -> (Float, Ket)) -> IO () Source #

Given a sample rate, initial qubit state ket, and state propagation function, produce a simulation. The Float in the state propagation function is the time since the beginning of the simulation.

stateProp :: (Double -> Matrix C) -> Float -> (Float, Vector C) -> (Float, Vector C) Source #

Produce a state propagation function from a time-dependent Hamiltonian.

statePropK :: (Double -> Operator) -> Float -> (Float, Ket) -> (Float, Ket) Source #

Produce a state propagation function from a time-dependent Hamiltonian.

evolutionBlochSphere :: Vector C -> (Double -> Matrix C) -> IO () Source #

Given an initial qubit state and a time-dependent Hamiltonian, produce a visualization.

evolutionBlochSphereK :: Ket -> (Double -> Operator) -> IO () Source #

Given an initial qubit ket and a time-dependent Hamiltonian, produce a visualization.

hamRabi :: Double -> Double -> Double -> Double -> Matrix C Source #

Hamiltonian for nuclear magnetic resonance. Explain omega0, omegaR, omega.