qiskit-community / prototype-qrao

Quantum random access optimization prototype
https://arxiv.org/abs/2111.03167
Apache License 2.0
27 stars 15 forks source link

Incorporate qiskit primitives into magic rounding #21

Open garrison opened 2 years ago

garrison commented 2 years ago

What is the expected enhancement?

Once we have migrated to qiskit-ibm-provider (#15), the next step is to adopt and move toward the qiskit primitives. We use the VQE implementation from Terra, so the only thing to migrate in QRAO itself is the magic rounding scheme (and for that we will use the Sampler primitive).

We will probably begin by parameterizing the various basis rotations, so that a single circuit can be sent to the primitives, along with various parameter sets.

garrison commented 1 year ago

Related PR in qiskit-optimization for the MinimumEigenOptimizer: https://github.com/Qiskit/qiskit-optimization/pull/436

t-imamichi commented 1 year ago

I see this issue from https://github.com/Qiskit/qiskit-optimization/pull/436. The PR is about to be merged. So, could you take a look at it so that it won't break qrao?

garrison commented 1 year ago

could you take a look at it so that it won't break qrao?

Thanks for asking. I made the following change to QRAO and ran tox -elint,py3,docs -r. All tests passed, so it looks like merging that PR will not break qrao.

diff --git a/requirements.txt b/requirements.txt
index 4b7dd02..2689ab9 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -3,6 +3,6 @@ importlib_metadata>=4.8.1,!=5.0.0
 qiskit-terra>=0.21.0
 qiskit-aer>=0.11.0
 qiskit-ibm-provider>=0.1.0
-qiskit-optimization>=0.4.0
+qiskit-optimization @ git+ssh://git@github.com/t-imamichi/qiskit-optimization.git@update-meo2
 rustworkx>=0.12.0
 matplotlib>=3.0.1
t-imamichi commented 1 year ago

Thank you for testing the PR. I will merge the PR soon.