Closed jsmallz333 closed 1 year ago
I can correct this with the above indicated as long as the reasoning follows
Yeah, I believe your reasoning is correct here, thanks - I don't think there's anything to do if there's nothing to decompose. @ewinston can check me, though, and I'll assign him to the PR if you're able to make it. Let us know if not, though, and one of us will.
The _apply_a2
function actually wasn't supposed to by applied for dim == 2
. I can submit a pr for that fix. Did you ever notice this for dimension > 2?
Hi @jsmallz333 .
EDIT: I have added you as an author to the PR fixing this issue. The rest of this comment is now outdated.
We'd like to add you as an author to the PR since you suggested the correct fix. To add you manually, I'd need the email account associated with your github account. Alternatively, you can open a PR yourself, as I explain below.
In either case, you would need to sign a CLA. A notice including a link to do this will be added by a bot before the PR is merged.
Currently, we have the following: @ewinston opened https://github.com/Qiskit/qiskit-terra/pull/10126 to try to fix this. It doesn't really fix the problem, but is a closely related improvement, so I thought we should include it along with the proper fix. I then made this PR https://github.com/ewinston/qiskit-terra/pull/4 adding your suggested fix to his PR branch.
If you'd like to proceed as author, you can do whatever is most convenient, including one of the following:
Environment
What is happening?
qs_decomposition in qsd.py throws an error for some examples, seemingly due to a bug in the code
How can we reproduce the issue?
Output:
Alternatively,
Giving the same error
What should happen?
We should still be able to produce a decomposed circuit from these examples
Any suggestions?
This seems to occur when line 233 of qsd.py in the function ‘_apply_a2()’ does not transpile to include any of the ‘qsd2q’ gate type for an instance.
To fix this add something such as the following before the loop on line 242:
Additionally should add a test for this kind of case to the test