A cutting-edge, interactive web application for visualizing two-level quantum states on a Bloch sphere, built with modern web technologies for a seamless and immersive experience.
- Interactive Bloch Sphere: Real-time 3D visualization of quantum states with smooth animations.
- Quantum Parameters: Adjust polar (ฮธ) and azimuthal (ฯ) angles to explore quantum state space.
- Fundamental States: Easily switch between basis states like |0โฉ, |1โฉ, |+โฉ, |-โฉ, |+iโฉ, and |-iโฉ.
- Quantum Operators: Apply Pauli-X, Pauli-Y, Pauli-Z, Hadamard, Phase, and T gates to manipulate states.
- Visual Controls: Customize blur, rotation velocity, toggle auto-rotation, wireframe mode, and reset or randomize states.
- State Information: Displays real-time coordinates (X, Y, Z), probabilities P(|0โฉ) and P(|1โฉ), and state purity.
- A modern web browser (Chrome, Firefox, or Safari recommended).
- No additional dependencies requiredโruns entirely in the browser!
- Clone the repository:
git clone https://github.com/your-username/quantum-bloch-sphere.git
- Navigate to the project directory:
cd quantum-bloch-sphere - Open
bloch.htmlin a web browser:Alternatively, serve the file using a local server (e.g., with Python):open bloch.html
Then visitpython -m http.server 8000
http://localhost:8000/bloch.html.
- Adjust Angles: Use sliders to modify ฮธ (polar) and ฯ (azimuthal) angles to explore quantum states.
- Select States: Click on fundamental states (|0โฉ, |1โฉ, etc.) to set the Bloch sphere to predefined quantum states.
- Apply Operators: Use quantum operator buttons (Pauli-X, Hadamard, etc.) to transform the quantum state.
- Customize Visualization:
- Adjust blur and rotation velocity for visual effects.
- Toggle auto-rotation or wireframe mode.
- Reset the view or randomize the quantum state for experimentation.
- Monitor State: View real-time updates of the state vector |ฯโฉ, coordinates, probabilities, and purity.
- HTML5/CSS3: For structure and styling of the interface.
- JavaScript: For interactivity and quantum state calculations.
- WebGL (assumed): For rendering the 3D Bloch sphere.
- MathJax (assumed): For rendering quantum state notation (e.g., |ฯโฉ).
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature). - Commit your changes (
git commit -m "Add your feature"). - Push to the branch (
git push origin feature/your-feature). - Open a pull request.
Please ensure your code follows the project's coding style and includes appropriate documentation.
This project is licensed under the MIT License. See the LICENSE file for details.
- Inspired by quantum mechanics and the need for intuitive visualization tools.
- Built with love for the open-source community and quantum computing enthusiasts.
