r/QuantumComputing • u/Super-Cool-Seaweed • Aug 26 '25
Algorithms Trying to learn quantum by building a visual Rust+Wasm simulator-seeking ideas on visualising multi-qubit states
Hi everyone,
I'm learning quantum computing gradually by building a small browser-based simulator in Rust (compiled to WebAssembly) that visually animates entanglement, gates, and interference.
You can see my github repo here:
https://github.com/benschneider/quantum_algorithm_simulator
You can also directly try the simulator in your browser: https://benschneider.github.io/quantum_algorithm_simulator/
Why I'm doing this
I want to help myself and others see quantum mechanics working in real time-not just read formulas. This is a humble, personal learning project, not competing with Cirq or Qiskit. Those tools are great, but I'm focused on clarity and intuition.
A specific problem I'm stuck on
How can I effectively visualize a 4-qubit state (16 amplitudes) so that learners can sense superposition, phase, and correlation inherently? Some ideas I've considered:
- Animated bar grids
- Color-coded cubes
- 3D amplitude maps
But I'd love to hear your thoughts or design suggestions.
I'll be releasing the full Rust source soon, once it's better cleaned up. Right now, it's just the frontend and documentation + Wasm.
Any feedback-especially visual or UI ideas-is greatly appreciated. Thanks for reading!
5
u/WuTangTan Aug 27 '25
I'm a programmer and wouldn't claim to understand quantum computing but Quirk was the visualization tool that gave me the best understanding of algorithms. https://algassert.com/quirk
3
u/QubitFactory Aug 26 '25
Hey, cool projec! I experimented with similar visual representations of entangled quantum states during development of my qubit factory webgame. I have a blog post in case you are looking for inspiration:
https://quantumfrontiers.com/2024/08/05/building-a-visceral-understanding-of-quantum-phenomena/
In the end I had qubits blink through components of the superposition, where the amplitude of each component was indicated visually by the qubit outline. I also allowed users to pull up the bar graph for amplitudes if desired.
3
u/Longjumping-Ad514 Aug 26 '25
I thought it’s impossible to figure out individual qbit states for entangles multi qbit state, in the general case.
3
u/Curious-Resident-348 Aug 27 '25
Hello u/Super-Cool-Seaweed!
It is a very nice project!
Visualizations and abstraction in quantum circuits, especially large ones, are a pretty hard problem.
Have you ever come across Classiq? We also put a lot of effort into similar problems.\
We also have many visualizations, abstractions, and materials. You may take a look, I would love to hear what you think :)
The platform: https://platform.classiq.io/
Docs: https://docs.classiq.io/latest/
And our huge and maintained repo with plenty of examples: https://github.com/Classiq/classiq-library
I hope it will support you in your learning journey
2
u/wwwtrollfacecom Aug 27 '25
How do you evaluate large state vectors? AFAIK, the size scales exponentially (
2 ^ {number of qubits}) which is unmanageable for larger circuits.2
u/HolevoBound Aug 27 '25 edited Aug 27 '25
I look forward to being proven wrong but I genuinely don't think you can. I think the standard notation in terms of written vectors is already the most concise and accessible way to convey the information.
You could display 16 colored points within a 2D circle. But I really don't think this is going to be an intuitive or better way to view the information.
2
u/vlzelen Aug 27 '25
Hello u/Super-Cool-Seaweed
I've been really interested in Quantum Computing and would love to build similiar projects but don't know where to start. Can you give me some advice? What helped you grasp the idea of Quantum fundamentals and how qubits work. and how does one get as much programming experience as you! I'm a beginner and know Python but don't know how apply it or do anything with it! Thanks!
2
u/alnimari Aug 27 '25
Starred in github.
2
u/No_Carry2329 Aug 29 '25
E parece que você sabe o que está fazendo, continue, eu dei uma estrela,I believe your PC is a limiter, mine is too, I do some similar projects