This is not a very good explanation, nor is it useful for anything.
A single qubit is not useful for computation and the way it is written doesn't generalize to more than a single qubit.
The code doesn't even really simulate a single qubit properly, since it doesn't use complex numbers.
What they call a "Rydberg gate" is not a gate at all.
Most of the text feels like it's written by an AI.
An alternative to this that also runs in the browser is the Azure Quantum katas at https://quantum.microsoft.com/en-us/experience/quantum-katas. It has an introduction to quantum computing concepts with exercises in Q# you can evaluate in the browser, as well as a quantum focused Copilot you can use with login.
(Full disclosure: I work on the team that builds the developer tools for Q#)
Hi Austin, nice to see you on here! Glad you find it useful. If you want to try out the VSCode.dev experience too, check out https://vscode.dev/quantum/playground/. Let us know what you think!
This tutorial [1] shows you how to simulate an arbitrary number of qubits and arbitrary quantum gates of arbitrary dimension in about 150 lines of code. The article uses Common Lisp but has ports to OCaml, Rust, and Python.
Excitement after Darpas Q circuit breakthrough, just added a Rydberg gate to this JavaScrip Qubit class simulator. Soo much fun! Try it out! More coming soon!
A single qubit is not useful for computation and the way it is written doesn't generalize to more than a single qubit. The code doesn't even really simulate a single qubit properly, since it doesn't use complex numbers.
What they call a "Rydberg gate" is not a gate at all.
Most of the text feels like it's written by an AI.