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

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.1.tar.gz (18.7 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.1-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qudit-0.2.1.tar.gz
  • Upload date:
  • Size: 18.7 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.1.tar.gz
Algorithm Hash digest
SHA256 0d47567a452b2a0671b2e00d8558e5c77eb7f89de4d17a19ba902aa28a9e288f
MD5 1bdab5f0b84e312281decd61065b02e4
BLAKE2b-256 3a1e9f259fa922a31a4acb9c03b44e3a5beaac1f1dbb5f66d5cc8b42da5e6ed1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qudit-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 23.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 caa1778f506ea9504d419d19b0eadcddac125129f15691d3eae364e5082c2821
MD5 71455f32d3d625488ba62542d71bca9a
BLAKE2b-256 9678002cd1f866858eed862f8fe782910c038565af46928a016ad619220bf057

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