Metadata-Version: 2.4
Name: qanimate
Version: 0.1.1
Summary: Animate qubit states on the Bloch sphere from Qiskit circuits, using Manim
Author-email: Tomek <tomek.zmuda@outlook.com>
License: MIT License
        
        Copyright (c) 2026 Tomek2008
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/Tomek2008/QAnimate
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: manim>=0.18.0
Requires-Dist: qiskit>=1.0.0
Requires-Dist: numpy>=1.24.0
Dynamic: license-file

<h1 align="center">QAnimate</h1>

<p align="center">
  <img src="assets/demo.gif" width="800" alt="QAnimate Demo">
</p>

Manim extension for animating qubit states on bloch sphere, driven directly from a Qiskit's QuantumCircuit

Quantum computing concepts like superposition, rotation gates, and
entanglement are hard to build intuition for from equations alone - I
struggled with it myself. I built this tool because I needed a way to
actually *see* what a gate does to a qubit's state while learning it,
not just read about it.

Goal: `animate(qc)` - automatically generated Manim animations showing how a
qubit's state moves on the Bloch sphere as each gate in the circuit is applied.
## Status: early MVP
### Currently working
- Full 3D Bloch Sphere (BlochSphere3D) using Manim's (Sphere, Circle meridians/equator, Arrow3D state vector).
- Qubit class with animatable state (theta, phi, r via ValueTracker)
- Manual state transitions (q.set_angles(theta, phi))
- Basic entanglement indicator (manual color trigger, not automatic detection)
### Not yet implemented:
- Qiskit bridge
- Multi-qubit entanglement
- Gate labels / circuit diagram
- Multi-qubit circuit layout (multiple spheres side by side, synced timing).

## Setup
```bash
pip install qanimate
```

## Try it out
Google Colab: https://colab.research.google.com/github/Tomek2008/QAnimate/blob/main/demo.ipynb


## Development setup

If you want to contribute or run the test suite locally:

```bash
git clone https://github.com/Tomek2008/QAnimate.git
cd QAnimate
python -m venv .venv
source .venv/bin/activate
pip install -e .
pip install pytest
```

## Render a scene

```bash
manim -pql scenes/scene_name.py ClassName
```
(-pql = preview, low quality. Use -pqm/-pqh for medium/high.)

e.g.
```bash
manim -pql scenes/bloch_sphere_conversion.py BlochSphereOneQubit
```


Parts of this project were developed with the assistance of AI tools:
- Explaining quantum computing concepts (qubit states, Bloch sphere
  representation, gate rotations) to guide implementation decisions.
- README translation.
