-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Multiple Qubits Clifford Gate #4791
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit b2d9269.
@MichaelBroughton Thanks for the reviewing! I think I have addressed most comments but also left a few more to discuss. PTAL. |
MichaelBroughton
approved these changes
Feb 22, 2022
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.
LGTM, be sure to tag me on the next PR the combines these two gates into an inheritance hierarchy :).
MichaelBroughton
added
the
automerge
Tells CirqBot to sync and merge this PR. (If it's running.)
label
Feb 22, 2022
CirqBot
added
the
front_of_queue_automerge
CirqBot uses this label to indicate (and remember) what's being merged next.
label
Feb 22, 2022
CirqBot
removed
automerge
Tells CirqBot to sync and merge this PR. (If it's running.)
front_of_queue_automerge
CirqBot uses this label to indicate (and remember) what's being merged next.
labels
Feb 22, 2022
95-martin-orion
pushed a commit
to 95-martin-orion/Cirq
that referenced
this pull request
Mar 2, 2022
Add initial Clifford Gate with multiple qubits. Compared with SingleQubitCliffordGate, it has fewer functionalities since we cannot enumerate all of them with PauliGates and several special single qubit properties like Bloch rotation no longer exist. Anyway, it provides several basic interactions: 1. It uses Clifford tableau as underlying data representation (different from the state representation). 2. It can be constructed from a tableau or list of operations (`_has_stabilizer_effect_` only). All Clifford gates can be built through \{S, H, CNOT\}, so we can construct any Clifford Gate from the list of operations. We just cannot pre-define it. 3. Decomposing into several basic operations. 4. Get unitary matrix through decomposing (we cannot do this in a reverse way from unitary to Clifford gate :( ). 5. Know how to interact with ActOnCliffordTableauArgs, i.e. it should be able to use with CliffordTableau simulator (Looks like we don't have that in cirq yet? @daxfohl will add that? see quantumlib#4639 and quantumlib#4748.). This PR is part of efforts for quantumlib#3639. Context: this PR doesn't introduce any new algorithms but the key methods are already implemented in quantumlib#4183 and quantumlib#4096.
CirqBot
pushed a commit
that referenced
this pull request
Apr 20, 2022
This PR mainly moved the `SingleQubitCliffordGate` as the derived class of `CliffordGate`. It didn't add any new functionalities or features. The code change looks large but actually not. Because I moved the `SingleQubitCliffordGate` to the place after `CliffordGate` and auto-diff is not that smart enough to tell that. Context #4791. Main change are: 1. Modify the value equality so that SingleQubitCliffordGate can be evaluate equal to the same CliffordGate 2. Moved the module-level initialization common SingleQubitCliffordGate (like X, Y, Z) to the class-level one. 3. Make a few function `SingleQubitCliffordGate` to use `CliffordGate` one.
tonybruguier
pushed a commit
to tonybruguier/Cirq
that referenced
this pull request
Apr 22, 2022
This PR mainly moved the `SingleQubitCliffordGate` as the derived class of `CliffordGate`. It didn't add any new functionalities or features. The code change looks large but actually not. Because I moved the `SingleQubitCliffordGate` to the place after `CliffordGate` and auto-diff is not that smart enough to tell that. Context quantumlib#4791. Main change are: 1. Modify the value equality so that SingleQubitCliffordGate can be evaluate equal to the same CliffordGate 2. Moved the module-level initialization common SingleQubitCliffordGate (like X, Y, Z) to the class-level one. 3. Make a few function `SingleQubitCliffordGate` to use `CliffordGate` one.
rht
pushed a commit
to rht/Cirq
that referenced
this pull request
May 1, 2023
Add initial Clifford Gate with multiple qubits. Compared with SingleQubitCliffordGate, it has fewer functionalities since we cannot enumerate all of them with PauliGates and several special single qubit properties like Bloch rotation no longer exist. Anyway, it provides several basic interactions: 1. It uses Clifford tableau as underlying data representation (different from the state representation). 2. It can be constructed from a tableau or list of operations (`_has_stabilizer_effect_` only). All Clifford gates can be built through \{S, H, CNOT\}, so we can construct any Clifford Gate from the list of operations. We just cannot pre-define it. 3. Decomposing into several basic operations. 4. Get unitary matrix through decomposing (we cannot do this in a reverse way from unitary to Clifford gate :( ). 5. Know how to interact with ActOnCliffordTableauArgs, i.e. it should be able to use with CliffordTableau simulator (Looks like we don't have that in cirq yet? @daxfohl will add that? see quantumlib#4639 and quantumlib#4748.). This PR is part of efforts for quantumlib#3639. Context: this PR doesn't introduce any new algorithms but the key methods are already implemented in quantumlib#4183 and quantumlib#4096.
rht
pushed a commit
to rht/Cirq
that referenced
this pull request
May 1, 2023
This PR mainly moved the `SingleQubitCliffordGate` as the derived class of `CliffordGate`. It didn't add any new functionalities or features. The code change looks large but actually not. Because I moved the `SingleQubitCliffordGate` to the place after `CliffordGate` and auto-diff is not that smart enough to tell that. Context quantumlib#4791. Main change are: 1. Modify the value equality so that SingleQubitCliffordGate can be evaluate equal to the same CliffordGate 2. Moved the module-level initialization common SingleQubitCliffordGate (like X, Y, Z) to the class-level one. 3. Make a few function `SingleQubitCliffordGate` to use `CliffordGate` one.
harry-phasecraft
pushed a commit
to PhaseCraft/Cirq
that referenced
this pull request
Oct 31, 2024
Add initial Clifford Gate with multiple qubits. Compared with SingleQubitCliffordGate, it has fewer functionalities since we cannot enumerate all of them with PauliGates and several special single qubit properties like Bloch rotation no longer exist. Anyway, it provides several basic interactions: 1. It uses Clifford tableau as underlying data representation (different from the state representation). 2. It can be constructed from a tableau or list of operations (`_has_stabilizer_effect_` only). All Clifford gates can be built through \{S, H, CNOT\}, so we can construct any Clifford Gate from the list of operations. We just cannot pre-define it. 3. Decomposing into several basic operations. 4. Get unitary matrix through decomposing (we cannot do this in a reverse way from unitary to Clifford gate :( ). 5. Know how to interact with ActOnCliffordTableauArgs, i.e. it should be able to use with CliffordTableau simulator (Looks like we don't have that in cirq yet? @daxfohl will add that? see quantumlib#4639 and quantumlib#4748.). This PR is part of efforts for quantumlib#3639. Context: this PR doesn't introduce any new algorithms but the key methods are already implemented in quantumlib#4183 and quantumlib#4096.
harry-phasecraft
pushed a commit
to PhaseCraft/Cirq
that referenced
this pull request
Oct 31, 2024
This PR mainly moved the `SingleQubitCliffordGate` as the derived class of `CliffordGate`. It didn't add any new functionalities or features. The code change looks large but actually not. Because I moved the `SingleQubitCliffordGate` to the place after `CliffordGate` and auto-diff is not that smart enough to tell that. Context quantumlib#4791. Main change are: 1. Modify the value equality so that SingleQubitCliffordGate can be evaluate equal to the same CliffordGate 2. Moved the module-level initialization common SingleQubitCliffordGate (like X, Y, Z) to the class-level one. 3. Make a few function `SingleQubitCliffordGate` to use `CliffordGate` one.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add initial Clifford Gate with multiple qubits. Compared with SingleQubitCliffordGate, it has fewer functionalities since we cannot enumerate all of them with PauliGates and several special single qubit properties like Bloch rotation no longer exist. Anyway, it provides several basic interactions:
_has_stabilizer_effect_
only). All Clifford gates can be built through {S, H, CNOT}, so we can construct any Clifford Gate from the list of operations. We just cannot pre-define it.This PR is part of efforts for #3639. Context: this PR doesn't introduce any new algorithms but the key methods are already implemented in #4183 and #4096.