Skip to main content

A circuit analyzer and translator from pytket to PHIR

Project description

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 pre-commit install

See Makefile for other useful commands.

Testing

Issue make tests from the root directory.

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

pytket_phir-0.10.1.tar.gz (196.0 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.1-py3-none-any.whl (83.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytket_phir-0.10.1.tar.gz
  • Upload date:
  • Size: 196.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pytket_phir-0.10.1.tar.gz
Algorithm Hash digest
SHA256 8126a8b0c7889205f98c83952f678e62fc71e271ee09888a94fad75c2fab6b4b
MD5 84f9749bf465c31980563e71ea4f7d28
BLAKE2b-256 70967723e974fa9a560b6d4ac0cead2a514fd443284830706a638e8aff8b64a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytket_phir-0.10.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: pytket_phir-0.10.1-py3-none-any.whl
  • Upload date:
  • Size: 83.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pytket_phir-0.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa01736adc9b5120abc0407e4d2a9cad1c55e8f1f7532a16e99ef76c74844851
MD5 3223f45c26f60e06e0b6e1b176a248a0
BLAKE2b-256 5d532c3687fadd8ed2d7c6ec8b38cfe2afe4fdf616449f60d723c87f796ccda6

See more details on using hashes here.

Provenance

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

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