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

Uploaded CPython 3.10+Windows x86-64

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

Uploaded CPython 3.10+Windows x86

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

Uploaded CPython 3.10+musllinux: musl 1.2+ i686

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

Uploaded CPython 3.10+musllinux: musl 1.2+ ARMv7l

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

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

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

File metadata

  • Download URL: zixy-0.2.2.tar.gz
  • Upload date:
  • Size: 475.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.2.2.tar.gz
Algorithm Hash digest
SHA256 f324308e137f4093fb13495a97301b674b1b471e5ddbbe237713ff973a0449a6
MD5 d5d4f3a097103f671fbaa1623d40678c
BLAKE2b-256 a1a26076f4753744216d64ec958f9f76b264c49aedfa45988260b30b0eb87539

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.2.2-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.2.2-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 15551019584f3ba5902db5d6818f07e8bd4d96f5606c567222033b7343addc35
MD5 8904a9a68ac3ba44b1a4e6577ded1c15
BLAKE2b-256 a1a603c48203e338c2d3545d1d844a0ea1b18923887f9b034ec034ea1aac2e7c

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.2.2-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.2.2-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 b2fbeb144c32f6a31135899a68ef72274c96c046b9e7db6bad3583c6399389aa
MD5 fc44ce5f7c094b8bd83fe6cd37ba0324
BLAKE2b-256 7811adcdbab37a6a3507f9b3ad38b0b3f41bbfd41d57ac8163891324531ea1f6

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.2.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/6.1.0 CPython/3.13.12

File hashes

Hashes for zixy-0.2.2-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ccfd03ca076b0b7bd1b86139faaa1f08ffcc26bb2863715d3b9a28958b4d3558
MD5 3b8b3de1b3d71f06813f6b3b02c05d12
BLAKE2b-256 9ab7ae396e17442c7623155a6c3d5e8d8652e1976e53b7b589895d45466775eb

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.2.2-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.2.2-cp310-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 9a5e71ac09d7341a46e4b9a98f0aa1c60237809416e3166409db9b065abda989
MD5 5bfe5cb903adcb4928844983e7f2c720
BLAKE2b-256 6eb7c5219ebd977e7824befb2ae1eaf95402ae4290f936982c9b258cd77570f0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.2.2-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.2.2-cp310-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 b87af25298757a29085f25f74acb198195b4c4d67212cae8d63be75474373d01
MD5 4e7ddd93d63cee96bf1e2168a9e8b453
BLAKE2b-256 fa6ff92ed9d353330ed45399c9e26765b519bdc4f67ca458b0833323eacc53d3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.2.2-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 d6ee483e7fc8999f7fd071db736fdf23f997875e83ec662c3e34d5d907e505e3
MD5 6a5d922331aaff5b331261edaa30e7a7
BLAKE2b-256 deb147257766459972ed1aee3bd2a1abbd83f46961ab2c72ffd39886ab826808

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.2.2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3dea982b632167b0be07648aa5805541aa4c35d36a17006d926e09be6f3bb1d5
MD5 fcb8a5d5ca922c0085478a529ef6ab1d
BLAKE2b-256 076833d2310bd90d82eb3075053ad037d3bd452a63e2f38e655b2f5ca795e635

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.2.2-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 33e1064cae43ff3a8abe77aa52167dcfaeacfed07d1e2471713d40d6edb208fa
MD5 0323d30058dcd588bbf29b7f12d2497b
BLAKE2b-256 a8258aa47aeba53fb306af0dc935054eb33494f07542baa6a969ada2513e4a18

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.2.2-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 26a92e0bc76e7f8c45d6180a9c204fdb712e71de35ef297778736bf2c6ee73ca
MD5 f040773794c9a34948d7748356725c21
BLAKE2b-256 f90357d96e0edb9432b01be33a9600dae2297e28699f44ff7060ec0a8fc8a1ab

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.2.2-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 abb446909cd6c9cd6812532e6687231f5a59aaeedb5b3018aa596720e8dd278d
MD5 7ee0003d530b75488148310b324fa65e
BLAKE2b-256 0708bf5d7fc39afa833feb8decbae0bac17c62f936dceb16554910b146a1b7d2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.2.2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b80756e49657f08b8adb8face5f046c0b962a2b8030aa8873d9327cdb2049401
MD5 7b38309423c28217d4ada33e161e1406
BLAKE2b-256 97a8930fd5a30eba4d8e1bddf4da972f08fd62f7858524b3cf05476e37cca30c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for zixy-0.2.2-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 0e441c37d4aeb61d8110b2fdf769d964531a62dd69727aeee1b9b1c49d39a96c
MD5 1384666af4ae5f7c2e4324c1a5b46fc2
BLAKE2b-256 5442311a9a09eb449e68b30e119d0531c85a5fc68721a49aa05ec7db3dad5d96

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: zixy-0.2.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/6.1.0 CPython/3.13.12

File hashes

Hashes for zixy-0.2.2-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ba9c0e14b7d257edaaec3ed18c5d08d59ad3aa8f7bc613899fad9ef4658153a9
MD5 f3463ecaf8b11929e62457ca68662ef0
BLAKE2b-256 928b1e5f040d1ceb0fd430d32ad2dfbaf778e6518fda92967e20f3926740b6d7

See more details on using hashes here.

Provenance

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

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