You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like the openQAOA ecosystem and I am trying to integrate a tensor network based backend (using cuQuantum SDK), which does not calculate the explicit wf as statevec. I can use qiskit circuits as starting point before converting them to perform TN contractions, so I adapted a backend from qiskit_sim. However the optimization fails at the first cycle without measurement_outcomes.
Here is the kernel code from the backend, is there a way to bypass measurement_outcomes?
Hi @quosta, thanks for trying out OpenQAOA; we are glad you like it! Your proposition to add cuQuantum simulator in OpenQAOA sounds quite exciting!
So, backends that are non-conventional and do not produce either a wavefunction or some measurement counts as the output of the quantum circuit need to be handled separately. We have been working internally to add one such backend in PR #147.
The process I encourage you to follow to add a new backend to OpenQAOA is as follows:
Decide which base backend classes should your backed inherit from. (You can find them in openqaoa/basebackend.py
In this case, since cuQuantum simulator does not support any measurement outcomes, you can set the attribute self.measurement_outcomes = {} (an empty dictionary) in the __init__ of the backend.
You would also like to raise, for instance, a NotImplementedError for unsupported methods for this backend like the get_counts function.
Once you have added and tested your new backend class in OpenQAOA, we can proceed to add it as a supported backend in get_qaoa_backend.
Feel free to ask more questions, and we will be happy to help you!
P.S. One important workflow comment -- The best way to contribute would be to fork the dev branch
I like the openQAOA ecosystem and I am trying to integrate a tensor network based backend (using cuQuantum SDK), which does not calculate the explicit wf as statevec. I can use qiskit circuits as starting point before converting them to perform TN contractions, so I adapted a backend from qiskit_sim. However the optimization fails at the first cycle without measurement_outcomes.
Here is the kernel code from the backend, is there a way to bypass measurement_outcomes?
The text was updated successfully, but these errors were encountered: