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

[BUG] Allow natural extension of QubitUnitary to 1x1 matrices #5819

Open
1 task done
dime10 opened this issue Jun 7, 2024 · 0 comments
Open
1 task done

[BUG] Allow natural extension of QubitUnitary to 1x1 matrices #5819

dime10 opened this issue Jun 7, 2024 · 0 comments
Labels
bug 🐛 Something isn't working

Comments

@dime10
Copy link
Contributor

dime10 commented Jun 7, 2024

Expected behavior

QubitUnitary currently does not accept a 1x1 matrix on 0 wires, which would be equivalent to a GlobalPhase gate. Since PennyLane actually does allow 0 wire circuits and a 1x1 unitary matrix is a valid quantum operator (with an existing alias in PennyLane, see GlobalPhase), it would be nice to resolve this inconsistency.

Actual behavior

Error is raised:

ValueError: QubitUnitary: wrong number of wires. At least one wire has to be given.

Additional information

No response

Source code

No response

Tracebacks

No response

System information

-

Existing GitHub issues

  • I have searched existing GitHub issues to make sure the issue does not already exist.
@dime10 dime10 added the bug 🐛 Something isn't working label Jun 7, 2024
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

No branches or pull requests

1 participant