Skip to main content

High performance quantum sims on qudits

Project description

icon

qudit

High performance simulations for qudit systems. To make qudit machine learning, qudit error correction, and qudit circuit simulation easier. Qudit is made fully around numpy and pytorch to make it easy to mix and match tools without worrying about type errors.

PyPI version

pip install qudit

Quickstart

In most cases it should not matter if you mix and match numpy with qudit since most abstractions are built on top of numpy arrays. The following is two examples to do the same thing, one using the Circuit class and the other manually using the matrices.

Using the Circuit class:

from qudit import Circuit
import numpy as np

C = Circuit(2, dim=2)  # 2 qBits with d=2
G = C.gates[2]

C.gate(G.H, dits=[0])
C.gate(G.CX, dits=[0, 1])

ket0 = np.zeros(2**2)
ket0[0] = 1.0  # |00>

print(C(ket0))  # [1. 0. 0. 1.]/rt2

Acknowledgements

Many many thanks to Sai Sakunthala and R-Phoenix for testing and fixing bugs!

This library is built on top of pytorch, and takes ideas from Qiskit, Cirq, and QuDiet.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qudit-0.2.2.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qudit-0.2.2-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

File details

Details for the file qudit-0.2.2.tar.gz.

File metadata

  • Download URL: qudit-0.2.2.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for qudit-0.2.2.tar.gz
Algorithm Hash digest
SHA256 70776c880766668fe309bde916c08e8b540ece89716e84b7cc51c23607857bbb
MD5 152354143811fee156218b3f8d53e875
BLAKE2b-256 8de576b73559ff4d97961ff5ec46b05f1eeae11f02bfda5a6f5b188c3c504a3d

See more details on using hashes here.

File details

Details for the file qudit-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: qudit-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 23.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for qudit-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 101b582f172dd245c61860ed685ffac337c169988bdf2f742813b9985011a249
MD5 710bd9e729278a2a9dd3197f3ea814a2
BLAKE2b-256 276ed6ee9c70a42683349c69fb4494136b13c537e3f08fdea875d4b1f941c05e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page