-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
Update Qibo demo snippet on v0.34 changelog #2212
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for removing this! I'm still getting an error1 when trying to run this example:
TypeError: unsupported operand type(s) for /: 'QuantumState' and 'int'
Is it running on your side? If it's not, it looks like we will need to use a different executor.
Footnotes
-
We need to import
gates
fromqibo
as well asimport mitiq
to make sure it runs, but then after those issues, we still get the type error :/. ↩
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2212 +/- ##
=======================================
Coverage 98.28% 98.28%
=======================================
Files 90 90
Lines 4259 4259
=======================================
Hits 4186 4186
Misses 73 73 ☔ View full report in Codecov by Sentry. |
I'm looking at this and realize now there are more problems- the circuit is trivial, no noise applied, and I'm not sure where the executor error is coming from. |
Closing this as v0.34 has been released already, and it looks like a working version of the Qibo snippet made it into the changelog. |
The code snippet in the changelog is still broken (I don't think it ever worked). Whether it's worth fixing, I'm not sure, but I don't love the fact that we have code in the changelog (which, IMO, is a suggestion for users to run) which does not run. @Misty-W do you still want to update this? |
I’ll remove it. |
Sorry, I closed this PR because I thought the snippet from the changelog had been fixed already. Anyway, I looked at the code of the snippet. It doesn't make sense to me even before executing it, and that's neither in the original form, nor in the form of this PR. In the original form, we are converting the circuit from Qibo to Cirq, and then using a On the other hand, in the form of this PR, we are trivially using the Qibo execute() function, which does exist, but doesn't even have the signature required, i.e., it returns an object that is not Mitiq's QuantumResult. In both cases, I don't see why this should work in the simple form of the snippet, unless we write a non-trivial executor, similar to the one in the «Error mitigation with Qibo» example. |
My guess is that it went untested in #2191. Maybe a good practice to help eliminate this in the future is require 2 reviewers for release notes? |
Description
Now that Qibo is integrated with Mitiq, we don't need to use
convert_to_mitiq
for Qibo circuits.License
Before opening the PR, please ensure you have completed the following where appropriate.