File tree Expand file tree Collapse file tree
python/quantum-pecos/src/pecos/slr/gen_codes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,30 +65,7 @@ def __init__(self, gate: QG):
6565 SZdg = Sdg # Mapped to itself in qeclib
6666
6767 # Complicated gates that require decomposition, expressed as a lambda:
68- F = QG .decompose (
69- lambda f : [
70- q .SZdg (f .qargs [0 ]),
71- q .H (f .qargs [0 ]),
72- ],
73- )
74- Fdg = QG .decompose (
75- lambda fdg : [
76- q .H (fdg .qargs [0 ]),
77- q .SZ (fdg .qargs [0 ]),
78- ],
79- )
80- F4 = QG .decompose (
81- lambda f4 : [
82- q .H (f4 .qargs [0 ]),
83- q .SZdg (f4 .qargs [0 ]),
84- ],
85- )
86- F4dg = QG .decompose (
87- lambda f4dg : [
88- q .SZ (f4dg .qargs [0 ]),
89- q .H (f4dg .qargs [0 ]),
90- ],
91- )
68+
9269 SX = QG .decompose (
9370 lambda sx : [
9471 q .RX [np .pi / 2 ](sx .qargs [0 ]),
@@ -110,5 +87,33 @@ def __init__(self, gate: QG):
11087 ],
11188 )
11289
90+ # https://github.com/PECOS-packages/PECOS/blob/development/crates/pecos-qsim/src/clifford_gateable.rs#L681
91+ F = QG .decompose (
92+ lambda f : [
93+ q .SX (f .qargs [0 ]),
94+ q .SZ (f .qargs [0 ]),
95+ ],
96+ )
97+ # https://github.com/PECOS-packages/PECOS/blob/development/crates/pecos-qsim/src/clifford_gateable.rs#L715
98+ Fdg = QG .decompose (
99+ lambda fdg : [
100+ q .SZdg (fdg .qargs [0 ]),
101+ q .SXdg (fdg .qargs [0 ]),
102+ ],
103+ )
104+ # https://github.com/PECOS-packages/PECOS/blob/development/crates/pecos-qsim/src/clifford_gateable.rs#L885
105+ F4 = QG .decompose (
106+ lambda f4 : [
107+ q .SZ (f4 .qargs [0 ]),
108+ q .SX (f4 .qargs [0 ]),
109+ ],
110+ )
111+ F4dg = QG .decompose (
112+ lambda f4dg : [
113+ q .SXdg (f4dg .qargs [0 ]),
114+ q .SZdg (f4dg .qargs [0 ]),
115+ ],
116+ )
117+
113118 # Remaining QIR gates seen:
114119 # '__quantum__qis__rxxyyzz__body',
You can’t perform that action at this time.
0 commit comments