-
Notifications
You must be signed in to change notification settings - Fork 164
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
Add global phase gate. #579
Conversation
Before I dig into review: this PR impacts more of qsim than I would have expected. Is this primarily due to adding support for zero-qubit gates, or were there other complications that expanded the change? |
Yes, this is due to adding support for zero-qubit gates. Perhaps the only non-trivial change in this PR is addition to the fusers. |
@@ -212,6 +220,8 @@ class BasicGateFuser final : public Fuser<IO, Gate> { | |||
gates_lat[gate.qubits[0]].push_back(&gate); | |||
gates_lat[gate.qubits[1]].push_back(&gate); | |||
gates_seq.push_back(&gate); | |||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any case where this else
triggers for gates with >2 qubits?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is no such a case. The else
in line 206 triggers for gates with >2 qubits
} | ||
if (qs.size() == 0) { | ||
IO::errorf( | ||
"error: controlled global phase gate is not implemented %s %d\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this intended for this PR, planned for a future PR, or not on the roadmap?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not on the roadmap.
Thank you so much for the PR! |
No description provided.