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
362 stars 158 forks source link

Develop a fixed sample of using Mitiq to produce an IR program #1211

Open crazy4pi314 opened 2 years ago

crazy4pi314 commented 2 years ago

Issue Description

This issue is kind of the other half of #1208, but here we want to pass a fixed circuit input to Mitiq (in whatever platform, let's say Cirq), and have the results of Mitiq (measurement results) be achieved by somewhere emitting a QIR program and simulating it.

Proposed Solution

The main part of Mitiq that generates the results passed to the user is a class called Executor. We would want to make a new instance of the executor class (need not implement the full feature set of executors like batching) that takes a group of circuits as input, converts those to QIR programs, simulates them on a noisy simulator, and returns the results.

The Cirq representations to QIR programs could be handled by PyQIR Generator, possibly needing a shim to take Cirq to PyQIR's data model.

The simulation could be handled by any number of different simulators that support QIR [link tbd], and it will be managing the handoff in Python that might be tricky if the simulator does not have a Python API, but many do.

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!