File tree Expand file tree Collapse file tree 3 files changed +39
-0
lines changed
Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 4343 SwapGate
4444 SqrtXGate
4545 SXGate
46+ SqrtXdgGate
47+ SXdgGate
4648 SycamoreGate
4749 TGate
4850 TdgGate
Original file line number Diff line number Diff line change 3434from bqskit .ir .gates .constant .swap import SwapGate
3535from bqskit .ir .gates .constant .sx import SqrtXGate
3636from bqskit .ir .gates .constant .sx import SXGate
37+ from bqskit .ir .gates .constant .sxdg import SqrtXdgGate
38+ from bqskit .ir .gates .constant .sxdg import SXdgGate
3739from bqskit .ir .gates .constant .sycamore import SycamoreGate
3840from bqskit .ir .gates .constant .t import TGate
3941from bqskit .ir .gates .constant .tdg import TdgGate
7981 'SwapGate' ,
8082 'SqrtXGate' ,
8183 'SXGate' ,
84+ 'SqrtXdgGate' ,
85+ 'SXdgGate' ,
8286 'SycamoreGate' ,
8387 'TGate' ,
8488 'TdgGate' ,
Original file line number Diff line number Diff line change 1+ """This module implements the SqrtXdgGate/SXdgGate."""
2+ from __future__ import annotations
3+
4+ from bqskit .ir .gates .constantgate import ConstantGate
5+ from bqskit .ir .gates .qubitgate import QubitGate
6+ from bqskit .qis .unitary .unitarymatrix import UnitaryMatrix
7+
8+
9+ class SqrtXdgGate (ConstantGate , QubitGate ):
10+ """
11+ The Dagger(Sqrt(X)) gate.
12+
13+ The SXdg gate is given by the following unitary:
14+
15+ .. math::
16+
17+ \\ begin{pmatrix}
18+ \\ frac{1}{2} - \\ frac{1}{2}i & \\ frac{1}{2} + \\ frac{1}{2}i \\ \\
19+ \\ frac{1}{2} + \\ frac{1}{2}i & \\ frac{1}{2} - \\ frac{1}{2}i \\ \\
20+ \\ end{pmatrix}
21+ """
22+
23+ _num_qudits = 1
24+ _qasm_name = 'sxdg'
25+ _utry = UnitaryMatrix (
26+ [
27+ [0.5 - 0.5j , 0.5 + 0.5j ],
28+ [0.5 + 0.5j , 0.5 - 0.5j ],
29+ ],
30+ )
31+
32+
33+ SXdgGate = SqrtXdgGate
You can’t perform that action at this time.
0 commit comments