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

Uploaded CPython 3.10+Windows x86-64

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

Uploaded CPython 3.10+Windows x86

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

Uploaded CPython 3.10+musllinux: musl 1.2+ i686

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

Uploaded CPython 3.10+musllinux: musl 1.2+ ARMv7l

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

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

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

File metadata

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

File hashes

Hashes for zixy-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 0c70d2a4abc72d0047f6d71073a87b791ffe468f7696620d828de6be81916039
MD5 04a10a1f02142fda938dac2ab0b7f00b
BLAKE2b-256 07945081d684b6c27c9cde07a78e6b6edeba4e2cfdc8399f53469396be87a05c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.1.0a1-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.0a1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 e3810e94693ffb06b2170eafffceff3668e26f98329646ca86de80f91728d89e
MD5 3a8a2312d959cead6ef1da09071c46a6
BLAKE2b-256 9f70e57f4b6e83c43ea837be563132ed1269c8e077181981d31cd2dae7f24d28

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.1.0a1-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.0a1-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 7a308ca4733d29e963de0ad39340564205b9c19172e98410e22e7bc2e3f920ee
MD5 b5b2b289aa283d3050da70ade76c53b4
BLAKE2b-256 8168b60f7987877a2ccb1961792f4755840a0eaa4156dd69e9a957b5af1d7f4a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.1.0a1-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 cb4e90304e69a7ec77eea86e9340e6bbd2ad9f87ecd5b506eef0781ea7818878
MD5 4fc6cede4dcdd8a5dc05f2da388382b7
BLAKE2b-256 b23188e7004189978a23494050d6b463e633ed3de11125e294eb697b7897957b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.1.0a1-cp310-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 bf511bd9b2c2d9dd31c456ccdf8af649c680ae94137986d8701ea1c9f168e74d
MD5 bf55b674f417716ed3c591f62b742983
BLAKE2b-256 1b7fca765b63c116eea7848f448ceeb6e8587127d7cfeee244484808f8fa2557

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.1.0a1-cp310-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 1f5a32d4012ec239e689f9c8c528f5b969ada4de58bfde3d0ebdad870ea00fff
MD5 fabee7341e6ccd359481d9bf34408a27
BLAKE2b-256 74e51d363f91f1b86d628485ee31390e9fdc816b2892fc8f6e1796af8b177809

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.1.0a1-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 7d9f8d1b09738f48c7de245d309510d1507b391b98f1e9badd6a872bdecce7b7
MD5 2589d606497348fd8a57e4f0ea56e51c
BLAKE2b-256 5b5bc8d0dedb1727ef6abf123154fc30b5ab69f1b48a2620fa77797b4c1365be

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.1.0a1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3b59365eba665a557776e9e2b7b71058f05f72126eeba8c06e27b7f3305453fc
MD5 fe2e968ae5f429d47a63a79914069261
BLAKE2b-256 dfc8c9d2562fdb1f8cbbe7da07a8aa347a1af07755a8a0df269591b278e74996

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.1.0a1-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 700330fbdf09549ca2d55298be65797815cd39999764eb67fea6861d12b69d9a
MD5 5768b23505067f730df6864e6714bb75
BLAKE2b-256 0cbde8193a5d00e50a004d95339b870fcdff0d2d805c21d4795a43d73d9d2370

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.1.0a1-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 24992e7d3eba8bb391a0717f20bb8e94bd033beb159af39518f737b9202f9db7
MD5 e443dce70e61c22d42c90e3efe1628ad
BLAKE2b-256 5e7493c3fd051165a52e5c98a0aa7968c9fb4870810937cf96359a47de9a82c7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.1.0a1-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 037517edc31ae23dcbd45bac4a38ad883b149d1304d97f605524d49c50a4c4f5
MD5 863dc2d937de53e0330c34175916f6ae
BLAKE2b-256 a4e3fc000ce40aef0f7b42bdd6010f49ff5d4d85696641adf1553bfe6bdaf839

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.1.0a1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1939adceb841c3a6051156626ad5ab336ebd9b17f2406c384c58cc50fd87fca6
MD5 66c0187ef626564ccde013aa5766dd45
BLAKE2b-256 58cb4e1e99c8a1fbeeaed505031e6f5859b891268fad0cd1a380c7d7fc9555a9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.1.0a1-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 a7a12c5e5876e37fbd77945f834294a15b4b2ed31804701eb9015d4305960352
MD5 10d615f30ae04a19f0f447a5290da38c
BLAKE2b-256 d18f33aa9e6273ac9a004b8f015f5cc5414882b15d69d62446b8f17a6982f2b2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.1.0a1-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5573fa6ce894ea173be361f2cad566c942d7be7a5b37464cbab65907e0e73cc2
MD5 8b2138862be7e504684aaa83ee8612a8
BLAKE2b-256 8c5820c6b24bb36a75244d49a73403264dbae7c54b264d7db1da16e2c28feabe

See more details on using hashes here.

Provenance

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