[DISCUSSION] Support for transforming QASM to other IRs

Open
#212 3 comments 2 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
8/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
compilers

Research direction

This is an open discussion, not a defined change, so there is no code to start from. The issue links src/ucc_ft/checker.py in the separate ucc-ft project, which subclasses the openqasm3 printer visitor; read that to understand the current workaround. Done would be a maintainer decision on whether pyqasm should offer a QASM-to-IR visitor or translation API, and that decision is not in the thread.

Written by the indexing model from the issue text.

Description

In ucc-ft, we are prototyping a tool to check the fault tolerance of a quantum circuit that implements an aspect of an error correcting code. This example) is checking if circuit implementing state preparation for the surface code fault tolerant. ucc-ft relies internally on an existing Julia package to do the check. That package uses its own representation for quantum programs.

The current heavy lifting in ucc-ft is converting from QASM to this Julia representation (called qprog). It does so by customizing the printer visitor that is part of openqasm3 package.

The approach so far is a bit of a hack, so in opening this discussion, curious if this translating use case is one pyqasm supports/intends to support, or if not directly, if some components in pyqasm would be useful to build on top of.

Note that this QASM -> qprog approach might change over time if we decide to shift the implementation to python. In that case, symbolically executing the QASM could would be the next challenge.

Dominant language
Python
Stars
29
Forks
33
Avg merge
1d 20h
Merged PRs (30d)
8

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from qBraid/pyqasm

All issues in qBraid/pyqasm

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.