learn-physics-0.6.3: Haskell code for learning physics

Copyright (c) Scott N. Walck 2016 BSD3 (see LICENSE) Scott N. Walck experimental None Haskell98

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

A Vis object.

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

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

A static VisObj for the state of a qubit.

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

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.

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