Skip to content

Commit

Permalink
DAGGER S, T to RZ rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Yarin Heffes authored and stylewarning committed Sep 25, 2024
1 parent 2a9fdf7 commit bcce7ee
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/compressor/rewriting-rules.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@

;;; rewriting rules in general

(define-compiler dagger-s-to-rz
((_ (#.(dagger-operator (named-operator "S")) () q)))
(inst "RZ" (list (/ pi -2)) q))

(define-compiler dagger-t-to-rz
((_ (#.(dagger-operator (named-operator "T")) () q)))
(inst "RZ" (list (/ pi -4)) q))

(define-compiler eliminate-identities
((x ("I" () _)))
"Eliminate I gates."
Expand Down

0 comments on commit bcce7ee

Please sign in to comment.