Metadata-Version: 2.3
Name: quantum-emotion
Version: 0.1.0
Summary: Classical simulation of quantum circuits.
Author: Tanishka Birdavade, Hendrik Kuehne, Matthew Howarth
Author-email: Tanishka Birdavade <tanishka.birdavade.22@ucl.ac.uk>, Hendrik Kuehne <hendrik.kuehne.26@ucl.ac.uk>, Matthew Howarth <matthew.howarth.26@ucl.ac.uk>
Requires-Dist: cotengra>=0.8.3
Requires-Dist: matplotlib>=3.11.2
Requires-Dist: networkx>=3.7
Requires-Dist: numpy>=2.5.4
Requires-Dist: scipy>=1.18.1
Requires-Dist: tqdm>=4.70.1
Requires-Dist: mkdocs>=1.6.1 ; extra == 'docs'
Requires-Dist: mkdocs-material>=9.7.7 ; extra == 'docs'
Requires-Dist: mkdocstrings[python]>=1.0.8 ; extra == 'docs'
Requires-Python: >=3.13
Provides-Extra: docs
Description-Content-Type: text/markdown

[![Tests](https://github.com/QC2-python-SE/quantum-emotion/actions/workflows/tests.yml/badge.svg)](https://github.com/QC2-python-SE/quantum-emotion/actions/workflows/tests.yml)

<img src="logo.png" alt="Logo" width="25%">

The `quantum-emotion` package provides educational tools for quantum circuit simulation. Users may...

+ assemble quantum circuits using a variety of gates, including mid-circuit measurements and classical control,
+ visualise circuits,
+ calculate the quantum states that circuits produce, or get access to probability distributions over mid-circuit measurements,
+ add their own gates.

Under the hood, a quantum circuit is represented by a tensor network. Adding an operation to the circuit corresponds to connecting another tensor to the network, and calculating quantum states means contracting the entire tensor network.

# Getting Started

`quantum-emotion` may be installed from PyPi:

```
pip install quantum-emotion
```

The package is designed to closely follow the way in which quantum states and operators behave mathematically. As a result, assembling a circuit looks just like matrix multiplication. Consider for example a circuit that produces the Bell state $\frac{1}{\sqrt{2}} (|00\rangle + |11\rangle)$:

```python
import matplotlib.pyplot as plt
from quantum_emotion import KetState, Hadamard, CNOT

# Create the quantum state and apply the circuit
psi0 = KetState(N=2)
psi_final = CNOT(wires=(0, 1)) @ Hadamard(wires=0) @ psi0

# Calculate the output state
print(psi_final.eval())

# Plot the circuit
ax = psi_final.plot()
plt.show()
```

More examples, along with tutorials on how to use all aspects of `quantum-emotion`, can be found in [`notebooks/`](https://github.com/QC2-python-SE/quantum-emotion/tree/main/notebooks).
