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.
Synopsis
- type VisObj = VisObject Double
- toPos :: Vector C -> Position
- ketToPos :: Ket -> 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 ()
- simulateBlochSphereK :: Double -> Ket -> (Float -> (Float, Ket) -> (Float, Ket)) -> IO ()
- stateProp :: (Double -> Matrix C) -> Float -> (Float, Vector C) -> (Float, Vector C)
- statePropK :: (Double -> Operator) -> Float -> (Float, Ket) -> (Float, Ket)
- evolutionBlochSphere :: Vector C -> (Double -> Matrix C) -> IO ()
- evolutionBlochSphereK :: Ket -> (Double -> Operator) -> 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.
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.