-
-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure LRE executors work with observables #2513
Comments
Hi! I can work on this issue if it is available. I am listing all the top-level functions I could find in the code (after comparing them to functions in ZNE).
I hope these are the only functions when you say that all top-level functions in LRE should work with |
Yup those are correct! The main code changes will be in |
Great! You can assign this to me then. |
To work with observable, I think I need to change the So in the line:
Since I need to pass the observables here, I need call the function
And for that to work, I also need to change the executor from the definition:
to:
This is further leading to more changes in the program and tests in the test file. Am I heading in the right direction? |
Good find, that's exactly right! Sorry for not pointing this out earlier, but the first step is exactly what @bdg221 is working on in #2676. I'll give that PR a review today, and hopefully it will be merged soon. If you want to start this issue in the meantime you can start working on top of that branch. |
Oh alright. This helps. But there is another problem. I am getting the below error when I tried running the
I tried running the below test:
I think the solution to this requires changing the return type of |
In order to make this work, you'll need an executor function which returns either bitstrings or a density matrix. Some documentation can be found here and an example of how this is done in ZNE here: mitiq/mitiq/zne/tests/test_zne.py Lines 91 to 94 in 34eb6ce
|
All the top-level functions in LRE should work with
observable
. This issue is to make sure of this as well as add unit tests for the same.The text was updated successfully, but these errors were encountered: