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.
NOTE: PECOS currently requires installation using
pip install "quantum-pecos@git+https://github.com/PECOS-packages/PECOS.git@e2e-testing"
for the CLI to work.
❯ phirc -h
usage: phirc [-h] [-m {H1-1,H1-2}] [-v] 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
-m {H1-1,H1-2}, --machine {H1-1,H1-2}
machine name, H1-1 by default
-v, --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.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 992af49b9f3baae25307f25757db6679fdaf68f3f0f49f312302d00b2144785b |
|
MD5 | bddc867bbf678cf2d2e726dfbfcaba92 |
|
BLAKE2b-256 | ca20e2728fd5585f8f73c2b6e2a9159ab7ce6b47059397d8b5f1177f424230e4 |