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.0.tar.gz (474.1 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.0-cp310-abi3-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10+Windows x86-64

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

Uploaded CPython 3.10+Windows x86

zixy-0.2.0-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.0-cp310-abi3-musllinux_1_2_i686.whl (1.6 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ i686

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

Uploaded CPython 3.10+musllinux: musl 1.2+ ARMv7l

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

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

zixy-0.2.0-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.0-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.0-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.0-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.0-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.0-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.0-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.0.tar.gz.

File metadata

  • Download URL: zixy-0.2.0.tar.gz
  • Upload date:
  • Size: 474.1 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.0.tar.gz
Algorithm Hash digest
SHA256 95ecd67dbd3f7c569067573820addb5b8fb7cef91dee01bd6af90b0e437e31ec
MD5 1fd5cf06af98104b482629bded83fcf2
BLAKE2b-256 3c8bc285dea8073f1ae1c163d33ca962cde6d8855caeade33cc850b4d6453af3

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.0.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.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: zixy-0.2.0-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.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 f22cb042a1e517de3b1ad350778ab5a73fb0591c2a9ae68cb1652b6ffe95091a
MD5 baacf09d25daa41c8a7e8422b64d1d8f
BLAKE2b-256 1300c1851cfbef6e9468bf4b96e960eb6891a4098bf8ecc0b718df11f1bfbc3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.0-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.0-cp310-abi3-win32.whl.

File metadata

  • Download URL: zixy-0.2.0-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.0-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 61f0443c2f8e5527d1b974099aaa54b4999e5445b901ecd5cf1bf1dd0001c8c8
MD5 bbdba37b480fa18f44e17093978dc60b
BLAKE2b-256 8a235f079548e00972517bab1c173757a47bc1c2da9c80e29736769f2fdbfb64

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.0-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.0-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

  • Download URL: zixy-0.2.0-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.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b71270cb77c06e526439ace9ead9969f300dea9458771f6c7e3d002b3c0cff8b
MD5 20ca992c6c2e2169d8814fefa5dbd4a9
BLAKE2b-256 4a941da2ad5632555b8e4252b9a69f330410d32dba24d3304cdb7a1ea2a75029

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.0-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.0-cp310-abi3-musllinux_1_2_i686.whl.

File metadata

  • Download URL: zixy-0.2.0-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.0-cp310-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 2bf941c9a859385b12a5965f51aaf26ded8d41f4d624de47eeb90baa25313f7b
MD5 0a6c8d52e7eb591ec8d976033b58bd2d
BLAKE2b-256 1d4eba8ddef5720458f621c645f382a0f66016ebd2200ba3d8cdc75342695b69

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.0-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.0-cp310-abi3-musllinux_1_2_armv7l.whl.

File metadata

  • Download URL: zixy-0.2.0-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.0-cp310-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 d2f15e1d0b66c6fd62f17c07fa95acee3708cdbf8b1f0acf48cfcd95d3dd0d07
MD5 4fc9c57cf6f400bd9f1741e580c0c6c9
BLAKE2b-256 c4b448501c4e4ce512d895ece62e7cf054e81a3fb1fe532c6533557af61a4f9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.0-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.0-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for zixy-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 5bf9932b73084c28f333029c6f35e8c54eb440c8641258e1950f5bbe583e8c29
MD5 87e04bd459b20d0025581a56780d58ba
BLAKE2b-256 069fcbbfd58734186e04f1e801379bdafddb3956a97962da6a489f2df718fec8

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.0-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.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for zixy-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5015d1a216822af3fc05760621adf811696be7c841cb67300552e00d57822a13
MD5 a18b84a3a7e2ec6666135c31c050f89b
BLAKE2b-256 3eadebcd7dbf739dbcb3ecde7bd1280a92876b6241457c307b0d3a3ec254c642

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.0-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.0-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for zixy-0.2.0-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 5612c4cc3a5ab87e1b077bb20b6b9270a80ec7d714f1a0199077703b6adb36f1
MD5 fd31d849bf5356cba15c54eb5a535d67
BLAKE2b-256 03431f7d491e8317bfb01493c4bc36b72d165a879e25dd4890d90b56e5bb3271

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.0-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.0-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for zixy-0.2.0-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 20d9ba009228544f8691fff0eae741dafd90c760eb0b0c6adc73802abb695b07
MD5 af77c8d967d010ba044f822f81e3b6e9
BLAKE2b-256 b5ecf542c95f72445dedb85430395760821dfe685e71f9e6bdf92061e7ccfb5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.0-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.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for zixy-0.2.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 b113bb4380c7881975cc7fbf8c96723cdf7f4f278391650da7c9e6be1051ff0f
MD5 08c6ebc72ac27638e8d6c630192b4d6f
BLAKE2b-256 66992aa8f7e4c4c2442ce6322ec81c7e83bc96693c49ea177d116ed0f011eca6

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.0-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.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for zixy-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 420f2d497903fd4d4d2d6cfb46b1ccf7fb1700a0bb9c639b1d24fc6f5e1c30d2
MD5 1b5d47bf7fb10627827dd246a7bbb599
BLAKE2b-256 e8803ce8f605262dcf6c92874ba7bf51c7afea4c8d29ba7682cb58a3254ce392

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.0-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.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for zixy-0.2.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 223a2d3d18b7ce1cae03f4ad23490e3288410ee452b377325a029697d809b8f6
MD5 6fa690491c08ad8ae43597c1794b9f45
BLAKE2b-256 08c0eb6e4b22a50806ec5784e315fb1d287b22490085cfd32254a206ecee952c

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.0-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.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: zixy-0.2.0-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.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 67157e187b5ecbec4ebd29573ce228636e044b9c378e70412ef5b069ece082f7
MD5 1f3f9ec62d067c39079befde159e0b24
BLAKE2b-256 ea829ccfaa92e905c789d7500c3ac5ca2a56b5ede51acd946ea41a3678486643

See more details on using hashes here.

Provenance

The following attestation bundles were made for zixy-0.2.0-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