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.
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.