A circuit analyzer and translator from pytket to PHIR
Project description
pytket-phir
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:
python -m venv .venv
source .venv/bin/activate
pip install -U pip setuptools
pip install -r requirements.txt
pre-commit install
Then, install the project using:
pip install -e .
See Makefile
for other useful commands.
Testing
Issue pytest
from the root directory.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pytket_phir-0.8.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b186f6d3d84a7eb92a829a67bfc6367287f81f7df04bef6c7908ed27dea80c5 |
|
MD5 | 024c7bfeb6164c3123efe4184cec304f |
|
BLAKE2b-256 | ca78e3f0c9bf2498599d576d567d8932536ee538d5ba2f2198bb5049491050f8 |