Skip to content

Commit

Permalink
Refactor the single qubit Clifford gate (quantumlib#5069)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
BichengYing authored and tonybruguier committed Apr 22, 2022
1 parent 4b578b3 commit 950c0a9
Show file tree
Hide file tree
Showing 2 changed files with 650 additions and 641 deletions.
Loading

0 comments on commit 950c0a9

Please sign in to comment.