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

Uploaded CPython 3.10+Windows x86-64

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

Uploaded CPython 3.10+Windows x86

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

Uploaded CPython 3.10+musllinux: musl 1.2+ i686

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

Uploaded CPython 3.10+musllinux: musl 1.2+ ARMv7l

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

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

zixy-0.3.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.3.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.3.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.3.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.3.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.3.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.3.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.3.0.tar.gz.

File metadata

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

File hashes

Hashes for zixy-0.3.0.tar.gz
Algorithm Hash digest
SHA256 7cd2a3324818ac858c674839b90524783a4af748b5c9695c792e9b4d58bd9332
MD5 1b366bc8cdd90b631c082fd6a4177255
BLAKE2b-256 8e9a317aca8c40c86abd241ae2c7f216bc9c94e9d9a06f68a2f2e31df8173461

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.3.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.3.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 2c1f5ae8a94ce1cf01f16d691addc2a29cc327afa04fb538a664231ae789ac9d
MD5 d729cd1e75cf4a13736e176cd200b786
BLAKE2b-256 22c588983f10b6d416a4c53414ae44c2cf997d3faf28a3cb128317a2c9a66735

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.3.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.3.0-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 28b8e6b7bb65871fa6e849c46ec6a2cb0cb29bd90e5fc1d6e612e1ccffd4ddb6
MD5 890f2d6e6279d448b02419699858b236
BLAKE2b-256 e18955796fe9b2185ca15d0576e84d989bafd255f21747be8a686044022ad0af

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.3.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.3.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d0f03c9f571bc588fb5ab4702b56126e2a84d65dd243b41f73339b459a121842
MD5 2d108d2de4969b7675e77747e168e641
BLAKE2b-256 b6486d26210bded99e81b78286f78dabba2b6aeb24728205510dbd8cf4db6d8b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.3.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.3.0-cp310-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 655fadb792730c7065d14156434debd55faccd20550d589a12fce7e2587ce5a9
MD5 d2db666456032ebf56d382ded55586ad
BLAKE2b-256 0028db6243ae6f6bea76ad51917b506c0841bec43189e8bda1cde27475f9e600

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.3.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.3.0-cp310-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 8d25ebdf1087f7f87a3354c30ac7b90dfe0168c9e16d4e4260190981a1508714
MD5 5ff652e1725b8699bedbaec0a3eab5b7
BLAKE2b-256 ce5144a63788b77848f6a472138b19d451f5856e24e3c5ffb6f1df7e79add810

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.3.0-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 39ee217e9ebcb39e63b61d9d5735e79f7b0d43b2581c0661b83e5ef3474d9d5a
MD5 49a117d7d1563651b891dd5cbb936738
BLAKE2b-256 a71c7f2bd588cea644d86dcaf7aa4c1358a0c5c8f058c11c867b3db7c7cebbc0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b5156cf894061a2a0f525a0053aa065b6dfd2c776b1706082e32a5e9579677ca
MD5 e64570231178766bde68a1b89669e75a
BLAKE2b-256 7e64d73bb3d65346392f860f8046325b13e50297f752f750ed50369e4dc5db82

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.3.0-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 0b0835a947d7271c61257ed6b1504d066a5e69e467cd67df91567fdcf6cc0ad9
MD5 45493354e5f8ca2436df7e07afb5fa8a
BLAKE2b-256 ca70a7ad09453407f6804e6bcf6fd4d9cedd501cd69e0793302435b22728d290

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.3.0-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 e89880227f030af13bc6a8a6f2fb3d6f7107d2dc2c287dbad0c84d155dc03a5a
MD5 f8625b9d57c59d176240cec83bd907f7
BLAKE2b-256 e9574edfe757ea194852dc9515689b42172c3b988e1aa80382b3acdd638d8535

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.3.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 fd3e3c47077cc6a2d063db85dc90919d28a5872a5cc0f9a076ee8d0b0ca2ac96
MD5 05b96f574a968a1fa7b6ba93d3abbaf1
BLAKE2b-256 8f0b82f92e1fe391c2360c542a37923f151c7076d7b8cc54bcd073cf1fbd4b73

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.3.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e4a0d5857eac35ffb975431a9ec4292218e433db8149087dae06924758f650c8
MD5 58c1799182e31a19c1b176b73e6326e0
BLAKE2b-256 7c95dd8727684a53fd786a9ba5330a6ab71e7d6632c6fb1fa6edc31042283660

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.3.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 ca22960746fb5413ad2485a8bd061a99784c95c946c2931af66bc7a5bf3050bb
MD5 37a0aa79af42e6c9f5b2a97ed72708b5
BLAKE2b-256 a21066eb4215aa3b11cc5083eec901f646c6077e20aca5c93d6dd882af02ef23

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.3.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.3.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 522e5ad22c482e947cd8ff673fd5928202a0a87426299dce481d28db416c783e
MD5 77037492f92ff21a92aa6ceaa88de00a
BLAKE2b-256 77a747c74a7b8e6813d8c764304af57d8f7ae1e954dc561bea8f178eeb7b2c2b

See more details on using hashes here.

Provenance

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