qiskit-advocate / qamp-fall-22

Qiskit advocate mentorship program (QAMP) fall 22 cohort (Sep - Dec 2022)
15 stars 7 forks source link

Implementation of Generalized Subspace Expansion (GSE) #33

Closed BOBO1997 closed 1 year ago

BOBO1997 commented 1 year ago

Description

Quantum error mitigation (QEM) is essential to exploit better performance from noisy near- and middle-term quantum devices. The basic idea of QEM is to extend quantum circuits for characterizing noise and perform classical postprocessing to recover clean results. Researchers have developed many kinds of effective QEM methods, and there are already several platforms such as Mitiq that collect the existing QEM methods.

In this proposal, we are going to collect those QEM methods again and unify them into one customizable QEM package under the Qiskit implementation. This will enable Qiskit users to run quantum-classical hybrid algorithms with appropriate QEM methods, and will also provide a standard baseline of QEM methods. We hope this project will pave the way for easy access to those QEMs and accelerate the research in and around this field.

We already have a working implementation of generalized subspace expansion method which is a generalization of exponential error suppression (i.e. virtual distillation) and even zero-noise extrapolation. We also have the implementation of dual-state purification.

Note that this issue is closely related to issue #3. We wonder if we can merge our idea to make a better proposal.

Deliverables

Completing all the results listed below might be somehow an ambitious task in one QAMP season. We expect we can achieve them step by step through a series of QAMP projects.

Implementation of major QEM techniques

The main target here is to provide a flexible toolkit for generalized subspace expansion and other major QEM techniques shown below.

This QEM collection can be implemented as a submodule of qiskit-experiments or qiskit-runtime, or as a new package which might be called something like “qiskit-qem”.

An “organic” framework that integrates those QEM techniques in a flexible, composable way.

We also expect this QEM package will be integrated with qiskit-runtime, since the concept of “QEM” may not be limited to just reducing the error. As a result, Qiskit users can choose and customize their own quantum-classical hybrid computation while considering the limitation and noise characterization of their devices.

Acceleration

In addition, since most QEM methods are classical postprocessing, the backend of the package can be accelerated with the support of high-performance languages such as Rust and C++.

Mentors details

Mentor 1 Name: Bo Yang GitHub ID: BOBO1997 What they do: Qiskit Advocate, PhD student on quantum error mitigation (Time zone: CET)

Mentors are also welcome.

Number of mentees

0 ~ 3 and more(?)

Type of mentees

BOBO1997 commented 1 year ago

Let me try to mention issue #3 directly.

derek-wang-ibm commented 1 year ago

Hi @BOBO1997 I'm a mentor for issue #3 (implement virtual distillation). While we agree it would be great to have an error mitigation toolbox, we should consider carefully a) which techniques to include, taking into account the toolboxes available elsewhere (e.g. Mitiq, the Qiskit Research repo) and the efficacy of each technique, and b) which features to add. Both of these points, in my opinion, require at least some sort of benchmarking on prototypical problem types, e.g. chemistry, Bell/GHZ state preparation, spin chains. Are you more interested in implementing/packaging techniques, or would you also be interested in doing a benchmarking study first to help us prioritize which techniques to include in "qiskit-qem"?

BOBO1997 commented 1 year ago

Thank you for reading my proposal! I agree that we have first to identify and prepare such benchmarking tasks to evaluate the performance of QEMs. And yes, I am both willing to implement the methods themselves and clarify the good benchmarking tasks for QEMs. In my original plan, I was also planning to implement a benchmarking task for test code. What is your plan in issue #3 on those benchmarks for exponential error suppression / virtual distillation?

BOBO1997 commented 1 year ago

@derek-wang-ibm I have shared some messages via slack DM. I would appreciate it if you could check them also.

tinyRickk commented 1 year ago

@BOBO1997 Hi, I am Aman Gupta, I am very interested in this project. I have done Hamiltonian simulations and Blind quantum Computation and have implemented some error mitigation techniques in both. @derek-wang-ibm I am also interested in the error mitigation via virtual distillation project. So I would like to work on any one of them if not both.

miamico commented 1 year ago

I'm not an expert in the mitigation techniques proposed here but I can help integrating them (as a mentor) with the existing qiskit-research repository which is an open-source effort supported by IBM to collect and integrate tools (like error mitigation techniques) to help researchers get the most out of Qiskit and the IBM Quantum systems. Please, @HuangJunye if you could add me to the mentors' list that would be great!

BOBO1997 commented 1 year ago

Here are the slides I used at the talk for checkpoint 1. checkpoint1.pdf

derek-wang-ibm commented 1 year ago

Great to hear that you were planning to benchmark too! We haven’t planned specific benchmarks for virtual distillation yet, but we do some circuits inspired by an actual physical problem (interacting/disordered spin chains with nearest-neighbor couplings) that we can use to benchmark virtual distillation vs. zero-noise extrapolation vs. … We can come up with other relevant classes of circuits / applications. We can look at scaling with system size, classical and quantum overhead, accuracy, etc.

From: Bo Yang @.> Date: Tuesday, August 23, 2022 at 6:04 PM To: qiskit-advocate/qamp-fall-22 @.> Cc: Derek Wang @.>, Comment @.> Subject: [EXTERNAL] Re: [qiskit-advocate/qamp-fall-22] A General Framework of Quantum Error Mitigation (Issue #33) Thank you for reading my proposal! I agree that we have first to identify and prepare such benchmarking tasks to evaluate the performance of QEMs. And yes, I am both willing to implement the methods themselves and clarify the good benchmarking ZjQcmQRYFpfptBannerStart This Message Is From an External Sender This message came from outside your organization. ZjQcmQRYFpfptBannerEnd

Thank you for reading my proposal! I agree that we have first to identify and prepare such benchmarking tasks to evaluate the performance of QEMs. And yes, I am both willing to implement the methods themselves and clarify the good benchmarking tasks for QEMs. In my original plan, I was also planning to implement a benchmarking task for test code. What is your plan in issue #3https://github.com/qiskit-advocate/qamp-fall-22/issues/3 on those benchmarks for exponential error suppression / virtual distillation?

— Reply to this email directly, view it on GitHubhttps://github.com/qiskit-advocate/qamp-fall-22/issues/33#issuecomment-1224935930, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A2AK75VZFELMTPXMPHZR57TV2VDIJANCNFSM57A5JW2Q. You are receiving this because you commented.Message ID: @.***>

BOBO1997 commented 1 year ago

Yes, we start with checking the performance of GSE (and purification-based method) for GHZ state since it seems easy to be implemented on IBM Quantum devices with restricted qubit connection. Then, we will move to the basic Ising model, such as (subspace-search) VQE for 8-qubit transverse field Ising model. We are also looking for other important problems and applications that GSE can be incorporated with. It would be nice if we can have a call among our teams for synchronization.

BOBO1997 commented 1 year ago

[Short Report for Checkpoint 2]

Our goal is to implement an error mitigation method called “Generalized Subspace Expansion (GSE)” and test its performance on both the simulators and real IBM Quantum backends. This method is suitable for getting a better ground state in variational quantum algorithms for a given Hamiltonian. Before using a fancy physical model, we tested the mitigation performance of GSE using a 4-qubit GHZ state ansatz. We first introduce the following Hamiltonian that takes the GHZ state as its ground state. $$H = -ZZII - IZZI - IIZZ - XXXX$$ A perfect 4-qubit GHZ state will result in the ground state energy $-4$ for this Hamiltonian. With noise, the ground state energy will get worse.

The GSE method uses virtual distillation as a subroutine in subspace expansion. To make a device-efficient implementation, we used a certain purification-based method for virtual distillation.

We tested the performance of our GSE implementation through the following two experiments.

  1. Simulator with different levels of depolarizing noise 
We first tested how much the ground state energy would be damaged by the depolarizing noise and how it could be recovered by the GSE mitigation.
 The result is shown in the following figure. image 
In this figure, the x-axis represents the different magnitude of the depolarizing error (the two-qubit gate error was set to 10 times larger than the one-qubit gate error).
 From this figure, we can see that without the GSE, the ground state energy gets worse rapidly as the depolarizing noise rate increases (blue line). 
With GSE, the figure implies that we can still obtain better ground state energies with large depolarizing noise (red line).
  2. Real IBM Quantum Backend 
We also tested the same experiment on IBM Quantum Jakarta.
We got the mitigated ground state energy $-3.7836$ which is better than the raw ground state energy without error mitigation.
 (c.f. This shows a clear improvement from the raw result which only reached the energy $-3.3853$ on IBM Quantum Oslo.
)

For the plan towards checkpoint 3, we are going to apply GSE to the noisy result of VQE for the transverse field Ising model on real backends as a showcase of our Qiskit implementation of GSE.

GemmaDawson commented 1 year ago

@BOBO1997 - please upload your Final Showcase presentation materials, and if needed, update the project Title and/or description.

BOBO1997 commented 1 year ago

@GemmaDawson I am sorry for this late update. Here are the slides I used at the final showcase. I also changed the project title. Thank you so much for your support! qamp_gse.pdf

GemmaDawson commented 1 year ago

Congratulations on completing all the requirements for QAMP Fall 2022!! 🌟🌟🌟