qiskit-community / qiskit-hackathon-singapore-19

11 stars 5 forks source link

Implementing entangled measurements for speeding up VQE #16

Open rraymondhp opened 4 years ago

rraymondhp commented 4 years ago

Abstract

The Variational Quantum Eigensolver (VQE) requires a step to evaluate the innerproduct of the quantum state (generated by NISQ computer) with the target Hamiltonian. A direct approach is to measure each qubit of the quantum state. However, recent approaches have shown how to measure multiple qubits to reduce the number of shots/measurement.

Original Description

One can design a heuristic algorithm to reduce the number of measurements used in VQE. A possible approach is by using entangled measurement (measuring multiple qubits instead of one qubit) to evaluate the inner product more efficiently. A recent paper on this subject is, e.g., here.

Final Description

VQE is a computing algorithm that can be used to obtain the eigenvalues of a Hamiltonian. A significant aspect of it involves finding the expectation values of Pauli strings. A N-qubit Hamitonian will require us to solve a worst case of 4^N Pauli strings which is an exponential problem. To speed this process up, we can form groups of Pauli strings that commute with each other together such that we only need to solve for any one of the strings to obtain information on all of them in the group. Following which, we can further optimise Qiskit's VQE which supports measurements on the z-basis by working out an algorithm to effectively rotate all the Pauli strings into the z-basis to conduct measurements all in one go as well.

Currently, Qiskit-Aqua has a module that can determine the commutability of Pauli strings and then form a Pauli graph. However, we have found a tighter condition that correctly checks for some cases that were left out in the initial code.

Updated code is found in https://github.com/xavierwwj/qiskit-aqua.

To test the code out, navigate to qiskit/aqua/operators/ and replace init.py, pauli_graph.py as well as add in pauli_graph2.py attached in https://github.com/xavierwwj/qiskit-aqua/tree/master/pauli_graph_tutorial. Run the Python notebook file.

Members

Deliverable

A qiskit-aqua module and probably a technical report if good results from NISQ devices are obtained.

GitHub repo

TerrySuun commented 4 years ago

Can I work on this?

xavierwwj commented 4 years ago

Hi can i work on this?

YH-R commented 4 years ago

Me too.

rraymondhp commented 4 years ago

Great, we have members on this topic.

rahula06 commented 4 years ago

me too!

huangjonahzichao commented 4 years ago

Can I join too

QuantumFall commented 4 years ago

Supanut and I would like to join!

rolask-l commented 4 years ago

rolask-l

rraymondhp commented 4 years ago

This is the source code for the PauliGraph https://github.com/Qiskit/qiskit-aqua/blob/719a2cc1e12b9659ffd916d129502c76033d19d8/qiskit/aqua/operators/pauli_graph.py

rraymondhp commented 4 years ago

A reference for consdieration: https://arxiv.org/abs/1907.13623

rraymondhp commented 4 years ago

Pauli class: https://github.com/Qiskit/qiskit-terra/blob/master/qiskit/quantum_info/operators/pauli.py

rraymondhp commented 4 years ago

https://github.com/Qiskit/qiskit-community-tutorials/blob/master/chemistry/PySCFChemistryDriver.ipynb

xavierwwj commented 4 years ago

Final Project Description:

VQE is a computing algorithm that can be used to obtain the eigenvalues of a Hamiltonian. A significant aspect of it involves finding the expectation values of Pauli strings. A N-qubit Hamitonian will require us to solve a worst case of 4^N Pauli strings which is an exponential problem. To speed this process up, we can form groups of Pauli strings that commute with each other together such that we only need to solve for any one of the strings to obtain information on all of them in the group. Following which, we can further optimise Qiskit's VQE which supports measurements on the z-basis by working out an algorithm to effectively rotate all the Pauli strings into the z-basis to conduct measurements all in one go as well.

Currently, Qiskit-Aqua has a module that can determine the commutability of Pauli strings and then form a Pauli graph. However, we have found a tighter condition that correctly checks for some cases that were left out in the initial code.

Updated code is found in https://github.com/xavierwwj/qiskit-aqua.

To test the code out, navigate to qiskit/aqua/operators/ and replace init.py, pauli_graph.py as well as add in pauli_graph2.py attached in https://github.com/xavierwwj/qiskit-aqua/tree/master/pauli_graph_tutorial. Run the Python notebook file.