Skip to content
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

Undefined variable used in raise #10113

Closed
Randl opened this issue May 15, 2023 · 2 comments · Fixed by #10117
Closed

Undefined variable used in raise #10113

Randl opened this issue May 15, 2023 · 2 comments · Fixed by #10117
Labels
bug Something isn't working

Comments

@Randl
Copy link
Contributor

Randl commented May 15, 2023

Environment

Current master

What is happening?

Here
https://github.com/Qiskit/qiskit-terra/blob/5177db6e09917809895fe37878422ba8fcb6321a/qiskit/transpiler/passes/calibration/rzx_builder.py#L363
the variable cr_sched is undefined.

How can we reproduce the issue?

Call the function with wrong parameters

What should happen?

The exception should be raised

Any suggestions?

Change the description to not include undefined variable

@Randl Randl added the bug Something isn't working label May 15, 2023
@jakelishman
Copy link
Member

Thanks for pointing this out! I imagine that the original intent was to say "native direction cannot be determined" and a bit of debugging information to go with it. Would you be interested in making a PR that updates the error to say that, and includes the qubits and instruction schedule map passed to the function?

@Randl
Copy link
Contributor Author

Randl commented May 15, 2023

Sure, I'll do that

Randl added a commit to Randl/qiskit-terra that referenced this issue May 16, 2023
Randl added a commit to Randl/qiskit-terra that referenced this issue May 16, 2023
mergify bot pushed a commit that referenced this issue May 24, 2023
* Remove undefined variable (fix #10113)

* Add test and bugfix description

(cherry picked from commit 02502b5)
jakelishman pushed a commit that referenced this issue May 24, 2023
* Remove undefined variable (fix #10113)

* Add test and bugfix description

(cherry picked from commit 02502b5)

Co-authored-by: Evgenii Zheltonozhskii <zheltonozhskiy@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants