Skip to main content

Tests

Logo

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)$:

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/.

Metadata

Release files for quantum-emotion 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quantum-emotion 0.1.0
File Size Uploaded Provenance Actions
quantum_emotion-0.1.0.tar.gz 36.9 kB Without provenance Details for quantum_emotion-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for quantum-emotion 0.1.0
File Interpreter ABI Platform Actions
quantum_emotion-0.1.0-py3-none-any.whl Python 3 none any Details for quantum_emotion-0.1.0-py3-none-any.whl

Total release size: 80.1 kB

Release files / quantum_emotion-0.1.0.tar.gz

Download URL quantum_emotion-0.1.0.tar.gz
Size 36.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d9573de19105736b0bd5070b4aa951caa13d047d913777292802e2f123195323
BLAKE2b-256 checksum
How to use checksums
255a170e24be881f4141925bd397e92b78c052e4e12fe99ae99f0f55c1c207d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / quantum_emotion-0.1.0-py3-none-any.whl

Download URL quantum_emotion-0.1.0-py3-none-any.whl
Size 43.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ff9c29b8762ec478f0b67669bb98d8ef6ed95f6a7ee2c187025b0888654dfd4
BLAKE2b-256 checksum
How to use checksums
5e4c6fee3d85e4aef9d175afd386019fba98ba946212204781423c8372cb75e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for quantum-emotion 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page