-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Cannot use resets in a circuit #5736
Comments
What operations are you running on that circuit to raise the error? That exception is being raised from trying to create an operator from something (I assume the circuit given it's erroring on reset). We probably just need to add special handling to the operator constructor to deal with reset instructions. As far as I know everything in the circuit -> transpile -> assemble -> execute path works for reset (although there are some complaints about resets being removed during transpilation #5127, although that case isn't a hard failure it just optimizes away resets during a transpile) |
It is a random 1Q unitary followed by a reset and meas (as the circuit shows), then passed to device using |
Ok, that's what I needed to know, it's being raised by a transpile (that wasn't in the orriginal issue). This is actually a duplicate of #5543 (although it should be fixed by #5570) and we unfortunately backported a regression in 0.16.2 with #5655 (which I thought should have included the fix). Which means we'll need to fix it for real on the stable branch and push out a terra 0.16.3. |
FWIW, this should work fine on master, it appears to just be a bug in that backport :( |
Ok cool. Getting a fix out would be nice since reset is a new(ish) feature we would like to highlight. |
Yeah, I've got the patch ready, just adding a test now. As soon as that merges to stable/0.16 we'll prepare and push out a 0.16.3 release |
This commit fixes a bug introduced in the backport PR Qiskit#5655. On the current master branch the bugfix that was being backported relies on a feature in newer versions of retworkx. Since we can't bump the minimum retworkx version required on a stable branch that functionality was rewritten in the dagcircuit class directly. However, that implementation included a typo which is causing non-gates and atomic instructions to be included in collected runs which is not correct behavior and causes errors to be raised. This commit corrects the bug in the backport and adds a test to ensure the regression is not present. This is a direct commit to the stable branch and not a backport since this bug is not present on master and was only introduced through a bad backport. Fixes Qiskit#5736
This commit fixes a bug introduced in the backport PR #5655. On the current master branch the bugfix that was being backported relies on a feature in newer versions of retworkx. Since we can't bump the minimum retworkx version required on a stable branch that functionality was rewritten in the dagcircuit class directly. However, that implementation included a typo which is causing non-gates and atomic instructions to be included in collected runs which is not correct behavior and causes errors to be raised. This commit corrects the bug in the backport and adds a test to ensure the regression is not present. This is a direct commit to the stable branch and not a backport since this bug is not present on master and was only introduced through a bad backport. Fixes #5736
This was fixed in #5740 which has merged and been released as 0.16.3. |
Information
What is the current behavior?
gives:
even if the backend supports it. The code I am using used to work in previous versions.
Steps to reproduce the problem
What is the expected behavior?
Suggested solutions
The text was updated successfully, but these errors were encountered: