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

Uploaded CPython 3.10+Windows x86-64

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

Uploaded CPython 3.10+Windows x86

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

Uploaded CPython 3.10+musllinux: musl 1.2+ i686

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

Uploaded CPython 3.10+musllinux: musl 1.2+ ARMv7l

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

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

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

File metadata

  • Download URL: zixy-0.3.1.tar.gz
  • Upload date:
  • Size: 581.9 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.1.tar.gz
Algorithm Hash digest
SHA256 312de14db0605d62ddadcc98d2f7ba1b1697c95a87708c040a58d338ececdb3b
MD5 bdba97ff9ab02b25d472d94b99bf5fb6
BLAKE2b-256 1c1305dddf23d752578ca17b14b00cf356f0e0f0a0f3775a89b59bcf8b23f0ef

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.3.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.3.1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4a5bd7415e3ffc9967a90e5693827c70ba6019b5c16158a347a887e5b742fcca
MD5 032c0bba0104e73942807d9b1fc80e6c
BLAKE2b-256 793bf0d43413b2ff7ac96d06e0f8ce590f2ec63eff0a3fefd166ac41616a2d35

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.3.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.3.1-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 48d7baeebc2b098e46b0653a65e7d571fd68661a7c67cf5b2ce3b0a38d439fd7
MD5 112bffd831df11b5796148b486090d9a
BLAKE2b-256 25768aaec8bc0abacf7d72ae68f17a506a401149f5cae667908eb09b03bfcea1

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.3.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.3.1-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ec88ecc7d6e39f3917b05ed8fd516f1a91295f273bc7440a64ab01c997902a28
MD5 de3479eb906523116f5e39f1fc89b9ca
BLAKE2b-256 8be46d6a4d564e37b8e230099d6baf6818b9f4778637a92f9dc8de4ddc53f764

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.3.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.3.1-cp310-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 c8f0bb522d6af3ce390b21ec047ffdf1d8fc07d0dc31253601216b687da90826
MD5 dc7ec4f925399a1d783087aa58efbf23
BLAKE2b-256 3524a52e201a18f0cb568f13843616660d9f995ce5ea1ba39c33a5737b401a9c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.3.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.3.1-cp310-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 cc4a5d944477a09b56a0f6ea46f351aa73577ad3dd1ce5b22936e4092af71a5c
MD5 c85e8d3b05c8d7415ad166f70f5fdee3
BLAKE2b-256 193bbc1dc88d43fa906c0ea0e644fb686d5c33bef156cb03f1037114011dbff1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.3.1-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 050ded989f1bff7609335f3416e92b1e0c2d7a143195e35163756e7b770fa445
MD5 f99262b7154689f706f6fcb1536ed2e1
BLAKE2b-256 c083113b9f320bb1b6074c4f53707499fe1e9da26c9d898f9a2582ec4985a595

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.3.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c870f97b0029c1761e6d1d2a948d6ef6144758ed1f7498bd279b96c8db7be1a2
MD5 69b42ee204e4eebc59a5fe7684749eaf
BLAKE2b-256 9349879553b93fe42b18b6d524ba28c870ad8189a006e405a348ec0452a29c7d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.3.1-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 b02460fb77a3867bed009aee8d89addc60d67381148af93bb83fb8664b610e83
MD5 b1d4105c604e8f7ab34afb694e2aeb4b
BLAKE2b-256 3ea68c7aca95cdb68d34901af0c24588d2465dab3829a8e71c2c5564bfd14063

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.3.1-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 f2186a06d76292c4c61a15f91ccf7fdaf56b2190da99fbccf060e54a09881ed4
MD5 f1002a7f0381fc1fbf3de199e1394d0b
BLAKE2b-256 8ba7371fc5986c535f4bd728b0279636ef56a4d12b34692dac2f9bf52a9aede6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.3.1-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 2e4ce614bb6b3bae1767814c0214c5e71037bd74b61fb2c170fced983d50ae49
MD5 86885482a8a05e68d44fb7c27f46b4ca
BLAKE2b-256 29fd9c6d7a5af0cbeb016a953bf6fb1aaa8eab2834ef769f9876033db6c2a034

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.3.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 24e485959f5d7089b96e8841b7302c9fba87813b17a41bc7bb62ba43e708c88c
MD5 3ceb95901acb803c51e1e4de9c0acf98
BLAKE2b-256 fc45f02a7dc7e6c3f897e5bd63911204671105bd65cbfefc84ba7bdad2d634f0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.3.1-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 5d49262ebef9adb2023d88b1051ebfa34115405665f3869d97c4f6c032c7086f
MD5 be69a2666e84badc1c79f30510980636
BLAKE2b-256 574bc674c2ce7821796f152af4274cfb4d892f13c69f815dbfec1e5a55f3fe9d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.3.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.3.1-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 af89a2883a85f602d8ce69c692bebc0abdaffe4755ae6622fb7ba0984d5e0be7
MD5 69329ba5e1a719fd3c1233d7a3414b97
BLAKE2b-256 a811c20c356b97ed3da217bdbf1359713d4bb73f9c3e3e1977cd390e2805ed0c

See more details on using hashes here.

Provenance

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