Skip to content

Commit f38fb42

Browse files
committed
[minor] change the order of gates
1 parent 3fbff25 commit f38fb42

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

torchquantum/devices.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
__all__ = ['QuantumDevice']
88

9+
910
class QuantumDevice(nn.Module):
1011
def __init__(self, n_wires: int):
1112
super().__init__()

torchquantum/functional.py

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,20 @@
2727
'cnot',
2828
'cz',
2929
'cy',
30+
'swap',
31+
'sswap',
32+
'cswap',
33+
'toffoli',
34+
'multicnot',
35+
'multixcnot',
3036
'rx',
3137
'ry',
3238
'rz',
3339
'rxx',
3440
'ryy',
3541
'rzz',
36-
'zz',
3742
'rzx',
38-
'zx',
39-
'swap',
40-
'sswap',
41-
'cswap',
42-
'toffoli',
4343
'phaseshift',
44-
'p',
45-
'cp',
4644
'rot',
4745
'multirz',
4846
'crx',
@@ -52,25 +50,32 @@
5250
'u1',
5351
'u2',
5452
'u3',
55-
'u',
5653
'cu1',
5754
'cu2',
5855
'cu3',
59-
'cu',
6056
'qubitunitary',
6157
'qubitunitaryfast',
6258
'qubitunitarystrict',
63-
'multicnot',
64-
'multixcnot',
59+
'single_excitation',
60+
'h',
61+
'sh',
6562
'x',
6663
'y',
6764
'z',
65+
'xx',
66+
'yy',
6867
'zz',
68+
'zx',
6969
'cx',
7070
'ccnot',
7171
'ccx',
72+
'u',
73+
'cu',
74+
'p',
75+
'cp',
76+
'cr',
77+
'cphase',
7278
'reset',
73-
'single_excitation'
7479
]
7580

7681

0 commit comments

Comments
 (0)