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.
Python >=3.10
Just issue pip install pytket-phir to obtain the latest stable release.
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 exitClone the repository and run:
uv sync
uv run prek installSee Makefile for other useful commands.
Issue make tests from the root directory.
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.