-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quantum simulation effect #23
Conversation
also adds an option for a classical effect
I just thought I'd add a better summary of the effect. Basically, the (almost) 512 light are associated with the 512 vertices of a 9-dimensional hypercube. The 'classical' version of the effect just does a random walk around this hypercube
Of course, the tree is not a hypercube. If the bit strings were randomly assigned, this process would have the light randomly flitting around. So instead I tried to assign them in the most sensible way I could, trying to have neighbouring vertices on the hypercube correspond to neighbouring lights on the tree. This is not entirely possible, so some flitting around through will happen. But it hopefully ends up like a random walk on a tree, but with a few added wormholes! The quantum effect uses the same bit strings, but it does quantum interference stuff instead of just randomly applying bit flips. |
Hey @quantumjim! Love your PR - really fascinating idea behind the effect and a very thorough description. Matt asked if I could help with maintaining this repository, so I've been thinking about how best to do that. I've decided to create an examples folder where we can add contributions like this one - you can find some more information in the README. Would you be up for updating your PR, to move your effect in to the examples folder? |
Thanks @oliverdunk! I moved it, and made a few other improvements while I was at it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few extra comments! Thanks for the changes you've made already.
Thanks for all of your work on this @quantumjim! Time to get this merged. P.S: I read your blog post a few days ago which was a good read! |
Each coordinate is assigned a bit string such that the Hamming distance can only be large between two bit strings if the Euclidean distance between the coordinates is large. That's something that's tricky even on a grid, and worse on a Christmas tree!
The lights are then controlled by a simulation of a quantum computer. I basically use the same effect as I once wrote a blog about here.
The script uses the actual board and neopixel when available, and otherwise tries to use
sim.py
from #5.