We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently, broadcasting of multi-qubit gates works like e.g. cx a, b, c, d; -> cx a, b; cx c, d;.
cx a, b, c, d;
cx a, b; cx c, d;
This means that cx q[0], q[1], q[1], q[2]; should be fine in principle as this should simply translate to cx q[0], q[1]; cx q[1], q[2];.
cx q[0], q[1], q[1], q[2];
cx q[0], q[1]; cx q[1], q[2];
But instead compiling this results in pyqasm.exceptions.ValidationError: Duplicate qubit q[1] argument
pyqasm.exceptions.ValidationError: Duplicate qubit q[1] argument
To fix this, the check for duplicate arguments should only happen after the broadcast qubits have been unrolled.
But this issue is probably not of high priority since I don't know how many people actually use qubit broadcasting on multi-qubit gates.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment
What happened?
Currently, broadcasting of multi-qubit gates works like e.g.
cx a, b, c, d;
->cx a, b; cx c, d;
.This means that
cx q[0], q[1], q[1], q[2];
should be fine in principle as this should simply translate tocx q[0], q[1]; cx q[1], q[2];
.But instead compiling this results in
pyqasm.exceptions.ValidationError: Duplicate qubit q[1] argument
Suggestions (Optional)
To fix this, the check for duplicate arguments should only happen after the broadcast qubits have been unrolled.
But this issue is probably not of high priority since I don't know how many people actually use qubit broadcasting on multi-qubit gates.
The text was updated successfully, but these errors were encountered: