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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

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

Uploaded CPython 3.10+Windows x86-64

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

Uploaded CPython 3.10+Windows x86

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

Uploaded CPython 3.10+musllinux: musl 1.2+ i686

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

Uploaded CPython 3.10+musllinux: musl 1.2+ ARMv7l

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

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

zixy-0.1.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.1.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.1.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.1.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.3 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARMv7l

zixy-0.1.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.1.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.1.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.1.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: zixy-0.1.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.1.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a2974f3aed235a1198cb59022b87fc940c29d676931cd921ea9763fe60392924
MD5 47d19b2e734c3ce29667d47119d8fcaf
BLAKE2b-256 a986ce877afdb05ed136c5d9737ef457659260af4c659084042ca52f2c78ae9e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.1.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.1.0-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 175b4ebba7b0de065b79034a0d3012844cedcc484c1b5209ee3032de41a280b9
MD5 93760df1c5ba5fbc4dbf72799839daa9
BLAKE2b-256 6472b23120cfabde73184c34fefd134bcd6e15af750b1e609312a6b55e216601

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.1.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.1.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b4432b16f23b2ffa0e232cfa852cb211eb3beb97f992a1ad98211c9c1803f860
MD5 3313f18685cf42c4ca5ba5b37332fada
BLAKE2b-256 b9215e7fe1043d70762ef2719a886c0abf37451e5cac9f1c8ba9db6da932c7a5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.1.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.1.0-cp310-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 bbc93c8b3ccec3b25f67a25f37105de179e55258978c45a53cad2142b3cb67bf
MD5 8bb352c1b64ab6dacd0c07440bcf4a5b
BLAKE2b-256 9d166e19ed7c44d7fde73ed6e94665aa5c7016237eee6b1ccd4b52e116ea16d1

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.1.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.1.0-cp310-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 5e2dba589e422803896ed81f923552654357656bb94a87bce1782e7d3c8d8f02
MD5 cb86e9a85fc1bf5887b2ca0c70ad64dc
BLAKE2b-256 8458099e3530d0cabe1e1127d9482f630e5230dc3e4d53460ac0ad16ae85d6b3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.1.0-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 5f5872bf635b59e604675a7e751ffb0abaa9215a764f111e3c8f5167e1e91486
MD5 1aa3b2eb92e55ca84b30cba76ccefc2a
BLAKE2b-256 371e8a09cc74bc3a7a97d26a53d2c0a75823ba17d8b529519e8f01ee039ca453

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9777aea26490cdd192fa6532db35367deea3e3990bd190ff838776813ed02da3
MD5 9be8d4b63ed27b8e3e77284ea248e675
BLAKE2b-256 587c5ec61b7d20221ecb088c0d8fc73d32097743dc7a059fcee5e813ff68c435

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.1.0-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 7e057922bed754c1586497200eeaa72a6d44588e0227d73abbd9a6ae569164ac
MD5 f0017471f866bb6ea4abb24694e6d442
BLAKE2b-256 474cc8e8ef3a19e71131c91637ab83dbb13703320d9cb9295603756a13e55a22

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.1.0-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 ff946a1d34712c9e47b7cc98890ff730857ddd4a6b2cab0bb1908c4f7d40af0a
MD5 aa89f2979da3eb3ee91c32e407c97273
BLAKE2b-256 8fcd46b1247e931ea05659a8ca603bf87fa949447c786eca78eb703aa0a1852f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.1.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 779a2651d578c2b238ac3f02b6179094464d7ff3286a6991056343c282ed4474
MD5 acfa2a0b445222cedc088c02b4f48eb5
BLAKE2b-256 9e332f01a430c071c37f542c7b8727d69b209e9a4ac819adfecf23704404d0e5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6bf9502b086ba6fa8c00c470f002e51ccce7105f6a130ec21ea6ded50d46f88f
MD5 9c60bed84b9973c5f80122a3bbba74ef
BLAKE2b-256 461d547766d8c40b408c0f409ed05bbaf89c9c57098ee942ddcbd94bf47c3e09

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.1.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 916d7658f2ae55627ef3c31cb66059b457f86d437449e90c33edab4442313285
MD5 46321a8b285ec7b0d378ae0c1818b4a3
BLAKE2b-256 8fee53c97f703f621cfc9cb8a2adbe83644599b15db80440ec8c569678179232

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.1.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.1.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a1c3411ff34886401edda45761432db2c077029885ac08cba256b4b83c0cb4e3
MD5 e5abd77466895f428d4795a1aae2a98f
BLAKE2b-256 10194d1e95b362f9ef3bc139e39396823af74ae90771c05b6bbe6825f92c3430

See more details on using hashes here.

Provenance

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