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] Documentation inconsistently states that GlobalPhase acts on all wires #5820

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

Comments

@dime10
Copy link
Contributor

dime10 commented Jun 7, 2024

Expected behavior

While any operator can be extended to act on a larger system by adding Identity tensor products, it is generally understood that the number of target wires in an operator is in reference to the smallest representation of the operator.

Given that the smallest representation of the GlobalPhase operator is a 1x1 matrix ( e ^ -i phi ), and the number of wires n relates to the matrix dimensions as 2^n x 2^n, this is consistent with saying the operator acts on 0 wires, rather than all wires.

Another reason to this why this notion is useful is that it demonstrates the operation can be applied anywhere in the circuit with equivalent results (i.e. it commutes with all other gates), because its wires do not overlap with other gates.

Finally, it becomes obvious that GlobalPhase cannot be acting on all wires as it would be otherwise impossible to control without having overlapping target and control wires.

Actual behavior

Additional information

While mathematically this is the most natural interpretation, draw the gate might require special handling.

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