Skip to main content

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.

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.2.tar.gz (520.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.3.2-cp310-abi3-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.10+Windows x86-64

zixy-0.3.2-cp310-abi3-win32.whl (1.1 MB view details)

Uploaded CPython 3.10+Windows x86

zixy-0.3.2-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.2-cp310-abi3-musllinux_1_2_i686.whl (1.7 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ i686

zixy-0.3.2-cp310-abi3-musllinux_1_2_armv7l.whl (1.7 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARMv7l

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

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

zixy-0.3.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view details)

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

zixy-0.3.2-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.2-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.7 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ppc64le

zixy-0.3.2-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.2-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.2-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.2-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.2.tar.gz.

File metadata

  • Download URL: zixy-0.3.2.tar.gz
  • Upload date:
  • Size: 520.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for zixy-0.3.2.tar.gz
Algorithm Hash digest
SHA256 7d985d086878f9a53843d3f06086af057d959cb34203ca65f26d9daa2f24c16c
MD5 6e95674f9c64b6cd888135cbc52caacf
BLAKE2b-256 69e9cfda802f3e9f686a372e81301c6a04f0b8a86abcdb06e137e48d76bd06f5

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for zixy-0.3.2-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 78b663ac8ab24d150abb9499d6b1d2de923154d11ee2177332c856b485459887
MD5 a7098552c1b5f69604292e9e7261332b
BLAKE2b-256 a66ce85fa7e7e70d4e71748667d1670e26b1e7b1dc6ab1112364a647ae527f89

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.3.2-cp310-abi3-win32.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.10+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for zixy-0.3.2-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 fd40bac63a899edde3126eff2178aef7aa0fbe66dc3e391a2c2781260620a160
MD5 83b8cb1df41178224734603709a026eb
BLAKE2b-256 ed8957aa7ed8855557969c22f85ad0d2f28a6309b7734d3c4829f18fa3a49bbf

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.3.2-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/7.0.0 CPython/3.13.14

File hashes

Hashes for zixy-0.3.2-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 442466493ad2f188b2ffd37c4145fdb5ee78e0e1c0691eb535f1c120d5e0e7e9
MD5 ac45847cef75244c1cee288e6060610c
BLAKE2b-256 77bd53a398b49e21bfe0db06932df273484dd850c9d14eb7320b0d87834deb19

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for zixy-0.3.2-cp310-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 2efd7570d977f876b7ade3950291858b9da3c9c1bc738649b4571f6f9488d988
MD5 265e847bff61bc042e6f4b3fca1dc984
BLAKE2b-256 c5fb0391d5d922ac3e10fbd63ad8f1c36326e35c78f4feefef1c333cfa357195

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for zixy-0.3.2-cp310-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 6db50e4b3e604ebf002b5a10a6d1c9666506f176257bba91377257fb616d8866
MD5 da958da8695ce7e2441b0893592029c0
BLAKE2b-256 08cf33ae82675e3437fa3c03ae26a4b25c4b1decc8a2e02aea444a9a2c947316

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.3.2-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 798ff7b765f7e59953ecee6f12ca6c1f0517db499ed2d6f57b06de40eebbb93b
MD5 bac36848600ca4cbfb5ac09770959955
BLAKE2b-256 a919801b593e906c2d216a640c1720e906b000f9c6691dd6a7bb367b584359e1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.3.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fc3e43b8e114807e34ca2686afaa21b6a42e7bdf04cb09b1ab634fce90544968
MD5 4b5f0178b470ba4388bec08f524f4878
BLAKE2b-256 5daa283286f690d09351d699d3a9fdb3b923a83c6ed7a0b2fca5682a253aabb3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.3.2-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 647706a5b91c19b6c8fa947a2175c8463345946a6b09038a085164c39d451640
MD5 4766f62ed639caa07ce90d8b50cc7425
BLAKE2b-256 68e8e912a60a82906b3abc7e8a0936651e02ee2a13a39cd3b37e7901f1ceb096

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.3.2-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 48a5fa7978c094921fdb71bc91d3c3da72984996e956e0505a20687bc75e40aa
MD5 a1022d6e28cb49166bad50fb137c0b03
BLAKE2b-256 de67e42b5389d57242e4efd8b629ed805fac1421d5e1cb87d4ab1d12131abe1e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.3.2-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 2bf481c30cf2b74d5a71fcce856131be63e64497701103b692811b85259bd477
MD5 fc86ec845d98e4128bedc7e13b3a6cb0
BLAKE2b-256 0d02737c79ede9d4cba214df5635619c621b3fa2b1ee6fb362d232016235b3e4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.3.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3bf4a99a8a65c2ca8266c742587a28b815c6b1cb053c5d0038ef8192b399eb27
MD5 ee7004b35c7a5de7f2a3e8be4cfbd0d8
BLAKE2b-256 18a51b5878af16167c39d2e5250cd8b12f22a5c81163a4a1f2274d327d0822c8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.3.2-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 22742660907590db3c472f48add836462e3fc87cdce9b12ac1a80406c1b6df29
MD5 65948feaaedc97085034c48cb3942569
BLAKE2b-256 abcd6ebcd6744d79d9e65f22e41b8deab3a7ee2f28b9bfcef3b50f86d0e37d6c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.3.2-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/7.0.0 CPython/3.13.14

File hashes

Hashes for zixy-0.3.2-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6a4c6d962e72dd48589d8a6e3c33a8e27f27db96c716b6e3d6a1783a6bec4a32
MD5 8cb8083e7be196e162e719277b4b2590
BLAKE2b-256 50f21087dc3869bab9a59aed33bf4787f65c93db92f196df8089382fc49f5a99

See more details on using hashes here.

Provenance

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

Release history Release notifications | RSS feed

This release

0.3.2 This release

14 files

0.3.1

14 files

0.3.0

14 files

0.2.2

14 files

0.2.1

14 files

0.2.0

14 files

0.1.0

13 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page