Skip to main content

Quantinuum's high performance library for the manipulation of Pauli strings and other quantum algebraic objects

Project description

Zixy

CI PyPI version License: Apache-2.0

Zixy is a high performance library for the manipulation of Pauli strings and other quantum algebraic objects.

Installation

From PyPI

The package is available via PyPI and can be installed using the preferred package manager, such as pip.

pip install zixy

From source

Developers may wish to install from source. The recommended method is by using maturin from the top level directory.

git clone https://github.com/quantinuum/zixy
cd zixy
maturin develop

Usage

Overview

The package is written in Rust, with Python bindings enabled via PyO3. The base containers in the Python interface are defined in a general fashion. The user-facing API separates these objects into three important classes:

  • Coeff: a coefficient, defining a scalar value of varying types.
  • Cmpnt: a component, defining a basic algebraic building block.
  • Term: a term, consisting of a Cmpnt scaled by a Coeff.

Coefficients are separated into built-in Python types such as float or complex, symbolic sympy expressions, and roots of unity such as Sign and ComplexSign, which have custom implementations.

Additionally, each such class has associated containers for collections of that type. Implementations of these base classes may narrow their implementation depending on the coefficient type.

Example

These general building blocks are sufficient to define many different quantum algebraic objects. An example of one such specification of the objects in Zixy is Pauli strings. These are made available in the zixy.qubit.pauli submodule, with the qubits forming a basis for their definition available in zixy.qubit.

import zixy.qubit as zq
import zixy.qubit.pauli as zqp

qubits = zq.Qubits.from_count(4)
print(len(qubits))  # 4

strings = zqp.Strings.from_str("X0 Y1 Z3", qubits)
print(str(strings))  # X0 Y1 Z3

terms = zqp.RealTerms.from_str("X0 Y1 Z3")
print(str(terms))  # (1, X0 Y1 Z3)

For other specifications such as computational basis vectors, further example notebooks are available.

Rust

The trait NumRepr (meaning "number representation") is implemented by all types that can represent the numbers multiplying components. In collections, these are stored contiguously in vector-like structures. Values of NumRepr types are closed under multiplication, but do not implement addition. Implementers of NumRepr are

  • Unity: a unit type representing +1 and only +1. The corresponding collection container UnityVec only stores a length, the number of unit values.
  • Sign: the square roots of unity (+1, -1). The corresponding collection container, SignVec is implemented as a bitset.
  • ComplexSign: the fourth roots of unity (+1, +i, -1, -i). The corresponding collection container, ComplexSignVec is implemented as a paired bitset.

The FieldElem subtrait of NumRepr is implemented by types whose values form a field with multiplication and addition. Implementers of both NumRepr and FieldElem use Vec<T> for collection storage, and are

  • Real: Floating point value f64
  • Complex: Complex floating point value Complex64 from num_complex crate.

The Python interface further supports symbolic types via SymPy, which are not currently available within the Rust library.

On the Rust side, components are stored contiguously in CmpntList types. These implement the business logic applicable to their elements. There are three main kinds of container that encapsulate CmpntList with generic coefficient type C

  • Terms<C: NumRepr>: stores a C::Vector of the same length as the CmpntList, offers mutable access to the components and coefficients.
  • TermSet<C: NumRepr>: stores a C::Vector of the same length as the CmpntList and via an indirect hash map, provides constant complexity lookup and enforces uniqueness among components. Offers mutable access only to the coefficients.
  • TermSum<C: FieldElem>: works like Set<C> but with linear combination semantics and is only defined for FieldElem-implementing coefficient types.

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

zixy-0.2.1.tar.gz (474.2 kB view details)

Uploaded Source

Built Distributions

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

zixy-0.2.1-cp310-abi3-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10+Windows x86-64

zixy-0.2.1-cp310-abi3-win32.whl (1.0 MB view details)

Uploaded CPython 3.10+Windows x86

zixy-0.2.1-cp310-abi3-musllinux_1_2_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

zixy-0.2.1-cp310-abi3-musllinux_1_2_i686.whl (1.6 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ i686

zixy-0.2.1-cp310-abi3-musllinux_1_2_armv7l.whl (1.6 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARMv7l

zixy-0.2.1-cp310-abi3-musllinux_1_2_aarch64.whl (1.6 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

zixy-0.2.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

zixy-0.2.1-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.5 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ s390x

zixy-0.2.1-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.6 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ppc64le

zixy-0.2.1-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.4 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARMv7l

zixy-0.2.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

zixy-0.2.1-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl (1.5 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.5+ i686

zixy-0.2.1-cp310-abi3-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: zixy-0.2.1.tar.gz
  • Upload date:
  • Size: 474.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zixy-0.2.1.tar.gz
Algorithm Hash digest
SHA256 2e4b3d60303a6d783577c76eaa51349a135561a86dfc8397ad04141c1c3a9091
MD5 72863e68ec6d04d3c45f96370d7f9bc8
BLAKE2b-256 3fa41da32e31cc2ed61f26d762d517c2e8a7ac6013300e92f3f045046f9af23b

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.1.tar.gz:

Publisher: release.yml on Quantinuum/zixy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zixy-0.2.1-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: zixy-0.2.1-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zixy-0.2.1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 255eb5788f92187e725d2adfbf628a1da04d2063fba7f99883d74a5b6de44a34
MD5 8ac486fa3373ca75085ea65be1d5fe13
BLAKE2b-256 4d46dfe1c88f5ebe7932878dd602b9a0fbc104550d09b00cb20ccd8e5aefdd18

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.1-cp310-abi3-win_amd64.whl:

Publisher: release.yml on Quantinuum/zixy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zixy-0.2.1-cp310-abi3-win32.whl.

File metadata

  • Download URL: zixy-0.2.1-cp310-abi3-win32.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.10+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zixy-0.2.1-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 a7619ba2cd6b37c6b87970a17c185f4abf4e7f007cf22ca7c30727352b87a94e
MD5 482c6c403522edaf569906fc273a7024
BLAKE2b-256 3299852175e6bb9168a3ef84c9efcd7e217c66a358fc67dfbf7f8c9aadd054a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.1-cp310-abi3-win32.whl:

Publisher: release.yml on Quantinuum/zixy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zixy-0.2.1-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

  • Download URL: zixy-0.2.1-cp310-abi3-musllinux_1_2_x86_64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.10+, musllinux: musl 1.2+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zixy-0.2.1-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 920f39142bcc234e24c607ba0a3da4e5732df5778ab959116a71bbb6d090e7b3
MD5 84cf075e1bffb767020c381172ac29e9
BLAKE2b-256 f8bd39bedf70713a7a279ad4a951c0b01be0a7bd7be84e4b1e1a4022ad7addef

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.1-cp310-abi3-musllinux_1_2_x86_64.whl:

Publisher: release.yml on Quantinuum/zixy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zixy-0.2.1-cp310-abi3-musllinux_1_2_i686.whl.

File metadata

  • Download URL: zixy-0.2.1-cp310-abi3-musllinux_1_2_i686.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.10+, musllinux: musl 1.2+ i686
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zixy-0.2.1-cp310-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 03be6e835537823935a9a2c1f3d5898997491a8011f9f4c0e6f7e3f27105f50e
MD5 48e96cabd0ec0500f3b2081496a145b4
BLAKE2b-256 12e28a7a619f8e91a03a86a5e71d9226dd068e39ae2f4f53a6b6738a639cb774

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.1-cp310-abi3-musllinux_1_2_i686.whl:

Publisher: release.yml on Quantinuum/zixy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zixy-0.2.1-cp310-abi3-musllinux_1_2_armv7l.whl.

File metadata

  • Download URL: zixy-0.2.1-cp310-abi3-musllinux_1_2_armv7l.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.10+, musllinux: musl 1.2+ ARMv7l
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zixy-0.2.1-cp310-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 feabfb156f16ff32e783af26f95ece527649450bdca0c163a595f00311368ce6
MD5 942bed8bd63b604799f0c5eb803f62f0
BLAKE2b-256 446504b9c9f95b7f2a90ee81a14208812201cbc330b21782efcb9854f59bdc09

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.1-cp310-abi3-musllinux_1_2_armv7l.whl:

Publisher: release.yml on Quantinuum/zixy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zixy-0.2.1-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for zixy-0.2.1-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 daa751e6d0bc29c690578c040eb84616c412867221586e5c7bd069f0c654b556
MD5 ee62093358070fdff27d1cd6e86254cc
BLAKE2b-256 188e05151cfe02ca31899afef6b761369cb75b35e1038276ba0a558c2d55f1a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.1-cp310-abi3-musllinux_1_2_aarch64.whl:

Publisher: release.yml on Quantinuum/zixy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zixy-0.2.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for zixy-0.2.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7d65223e24112183d0215e243e30c61b467a9b977c45277e01050c3e3a989aa9
MD5 6eb844269b63cd04cbee60b2c4c8a9de
BLAKE2b-256 7d98111164f97f130a5f0d7460a9d02ed00dd48198d4420b6e46cd031fef285d

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on Quantinuum/zixy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zixy-0.2.1-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for zixy-0.2.1-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 b044986ef4ed682ea92b37c999ccc931cc27203008240935f2f486e6d045c1a1
MD5 265b01f34a0f16b7effde50eedcd6091
BLAKE2b-256 b61cd52645955cf0b190a024473530ffe4f9ebe5da27fec3d7e06ac378acdeca

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.1-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl:

Publisher: release.yml on Quantinuum/zixy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zixy-0.2.1-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for zixy-0.2.1-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 a7d90ef092ceee67f3b33184fe135876d9a2de055d9a37cfe161f718c691d4ae
MD5 e71baf17ff8f135e44e269b015b835e5
BLAKE2b-256 4d5e2cd8e7bb92fb0945a89f1c9c8f03d1ef1450f151f55d91542b9e99fc4658

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.1-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl:

Publisher: release.yml on Quantinuum/zixy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zixy-0.2.1-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for zixy-0.2.1-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 ea1d8e9eaffdd9ad4c6f81e58f692faf2eab00c0c4576fa863f2b07d9ce6ffe1
MD5 f6f36b2580477b9f0b76748fa050db47
BLAKE2b-256 bcd8d867c522ce9d42b7d12e3b2c123c67a9a9e3e17df02d7ee87e55c8cec9fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.1-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl:

Publisher: release.yml on Quantinuum/zixy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zixy-0.2.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for zixy-0.2.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2e966a81bf77e67b248973947f0b71241535e9e19e7ab2f801f6a1f2f1388998
MD5 453fa73c2e75b7779ef3fb6da3aa9581
BLAKE2b-256 adcd66720949fcb168caac46023e653f1891638e36818044b06b367228b54e08

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on Quantinuum/zixy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zixy-0.2.1-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for zixy-0.2.1-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 db75d4052e2eb39b9991753d2ea8b30cf38f78029f7f2be59c950cd24288c3a7
MD5 fea609b43db25c058d9b1e12b3622372
BLAKE2b-256 c4b5c68b027127d791631a8389fdb5f595f868ed2c6b5085e428634fc88f6d6f

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.1-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl:

Publisher: release.yml on Quantinuum/zixy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zixy-0.2.1-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: zixy-0.2.1-cp310-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.10+, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zixy-0.2.1-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d314c21cce358c8da91ea56251bd84faad823b7f1d137249e81003f14c26d5c5
MD5 e5f0449f8913106698338eead61f14b3
BLAKE2b-256 86b93818107cc8c2b408ccdeec7493524ed8909ac42dcc756571ad752cb57b14

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.1-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on Quantinuum/zixy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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