Skip to main content

pytket-phir

PyPI version Python versions

PHIR stands for PECOS High-level Intermediate Representation. See PHIR specification for more.

pytket-phir is a circuit analyzer and translator from pytket to PHIR.

Also included is the CLI tool phirc that takes QASM programs as input and emulates them using PECOS.

Prerequisites

Python >=3.10

Installation

Just issue pip install pytket-phir to obtain the latest stable release.

phirc CLI

The package includes a tool for emulating QASM files from the command line using PECOS.

Install additional dependencies needed for the CLI using pip install pytket-phir[phirc].

 phirc -h
usage: phirc [-h] [-w WASM_FILE] [-m {H1}] [-v] [--version] qasm_files [qasm_files ...]

Emulates QASM program execution via PECOS

positional arguments:
  qasm_files            One or more QASM files to emulate

options:
  -h, --help            show this help message and exit
  -w WASM_FILE, --wasm-file WASM_FILE
                        Optional WASM file for use by the QASM programs
  -m {H1}, --machine {H1}
                        Machine name, H1 by default
  -v, --verbose
  --version             show program's version number and exit

Development

Clone the repository and run:

uv sync
uv run prek install

See Makefile for other useful commands.

Testing

Issue make tests from the root directory.

Dependency Audit

Use make audit or uv audit --locked to scan locked dependencies for known vulnerabilities. The project configures uv with a 7-day dependency cooldown so routine dependency resolution avoids newly uploaded packages while the package ecosystem has time to discover and report supply-chain compromises.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytket_phir-0.10.2.tar.gz (235.9 kB view details)

Uploaded Source

Built Distribution

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

pytket_phir-0.10.2-py3-none-any.whl (83.3 kB view details)

Uploaded Python 3

File details

Details for the file pytket_phir-0.10.2.tar.gz.

File metadata

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

File hashes

Hashes for pytket_phir-0.10.2.tar.gz
Algorithm Hash digest
SHA256 74f578845b079385ba04f2ffcad09bc6ac1f610d7d609d2b13fb48b045d3ecb4
MD5 20afda9fb04606cd7271871111435960
BLAKE2b-256 82375fbd43d00d9e4d0a2343725e179f9873b3c4006a75796fa44775852b2052

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytket_phir-0.10.2.tar.gz:

Publisher: python-publish.yml on Quantinuum/pytket-phir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pytket_phir-0.10.2-py3-none-any.whl.

File metadata

  • Download URL: pytket_phir-0.10.2-py3-none-any.whl
  • Upload date:
  • Size: 83.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pytket_phir-0.10.2-py3-none-any.whl
Algorithm Hash digest
SHA256 caaed0fac2b4b8364950a9e118c3b93158299832c7519bc395e25a421ed22194
MD5 b350b5a19921a28dd74c38f67af3a53d
BLAKE2b-256 3779345ea191544ed94ae0b121935852ac55eee0f5cd57f317332e9034a4af5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytket_phir-0.10.2-py3-none-any.whl:

Publisher: python-publish.yml on Quantinuum/pytket-phir

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.10.2 This release

2 files

0.10.1

2 files

0.10.0

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.1

2 files

0.8.0

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.1

2 files

0.5.0

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 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