Copyright | (c) Scott N. Walck 2016 |
---|---|
License | BSD3 (see LICENSE) |
Maintainer | Scott N. Walck <walck@lvc.edu> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell98 |
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.
- type VisObj = VisObject Double
- toPos :: Vector C -> Position
- staticBlochSphere :: Position -> VisObj
- displayStaticState :: Vector C -> IO ()
- animatedBlochSphere :: (Double -> Position) -> Float -> VisObj
- simulateBlochSphere :: Double -> Vector C -> (Float -> (Float, Vector C) -> (Float, Vector C)) -> IO ()
- stateProp :: (Double -> Matrix C) -> Float -> (Float, Vector C) -> (Float, Vector C)
- evolutionBlochSphere :: Vector C -> (Double -> Matrix C) -> IO ()
- hamRabi :: Double -> Double -> Double -> Double -> Matrix C
Documentation
toPos :: Vector C -> Position Source
Convert a 2x1 complex state vector for a qubit 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.
stateProp :: (Double -> Matrix C) -> Float -> (Float, Vector C) -> (Float, Vector C) Source
Produce a state propagation function from a time-dependent Hamiltonian.