Skip to content

Instantly share code, notes, and snippets.

@qubyte
qubyte / walker.py
Created September 23, 2012 04:45
Simple quantum random walk
"""
Requires matplotlib for plotting. Tested with python 27. If you want to try this
without plotting, remove the final two lines and the pylab import. The guts only
depends on math and will work with vanilla python.
"""
import math
import pylab
def probabilities(posn):