unitaryfund / mitiq

Mitiq is an open source toolkit for implementing error mitigation techniques on most current intermediate-scale quantum computers.
https://mitiq.readthedocs.io
GNU General Public License v3.0
368 stars 163 forks source link

Develop a fixed sample of using Mitiq consuming QIR #1208

Open crazy4pi314 opened 2 years ago

crazy4pi314 commented 2 years ago

Issue Description

One initial step to exploring the use of IRs and Mitiq/error mitigation more generally is to add pre-processing to inputs to Mitiq to allow it to consume QIR programs. As noted in #1207, Mitiq is like a box that takes circuit-like programs in, and after immediately formulating and running it's own subroutines, returns measurement results to the user.

For this issue, we need a sample (can be a fixed input circuit and executor) where a user can specify a circuit-like QIR program and have Mitiq return the same results (modulo noise) as if the circuit was passed directly as a Cirq circuit.

Proposed Solution

One approach could be to use a combination of existing community tools for Python and QIR to handle the parsing and translation of QIR files. In particular qwop is a developing package that can take a circuit-like QIR file and return a circuit object in a number of different frameworks like Qiskit or Cirq. These could then be passed immediately to Mitiq just like normal.

The remaining question would be how to generate the circuit-like QIR in the first place which could be done quite easily with Q# compiling to QIR, or possibly PyQIR.

github-actions[bot] commented 2 years ago

This issue had no activity for 4 months, and will be closed in 2 weeks unless there is new activity. Cheers!