Skip to main content

High performance quantum simulations on qudits

Project description

icon

qudit

Sparse Matrix 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.1.0.tar.gz (20.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.1.0-py3-none-any.whl (32.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qudit-0.1.0.tar.gz
  • Upload date:
  • Size: 20.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.1.0.tar.gz
Algorithm Hash digest
SHA256 d15b8f522c3e41a05bea787fa663aa36cdcb62b499a9e1b2e081a9faa2478d40
MD5 125e3ca3202c86191cec1ca4adf355ec
BLAKE2b-256 ffa4bb142267380d199b0ee38b2db45ac2a6943a3fb0e690bd5704a1db8c8416

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qudit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 32.0 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 90cf83ce17b87dadc70fd54d456f27ccd595b5f717e1ec07a95f9b7b850fe076
MD5 456bc4e1db3d9c99422273a4b2b60610
BLAKE2b-256 7374930950e1025fbffaad1560cdd5afc07ea1ad5459afc43f4862ff63dcf01c

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