File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
torchquantum/operator/standard_gates Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change 54
54
from .xx_min_yy import XXMINYY
55
55
from .xx_plus_yy import XXPLUSYY
56
56
57
- all_variables = [
57
+ _all_variables = [
58
58
EchoedCrossResonance ,
59
59
ECR ,
60
60
GlobalPhase ,
127
127
XXPLUSYY ,
128
128
]
129
129
130
- __all__ = [a ().__class__ .__name__ for a in all_variables ]
131
-
132
- # add the aliased and incomptaible classes
133
- __all__ .extend (["U" , "CH" , "QubitUnitary" , "QubitUnitaryFast" ])
134
-
135
- # add the dictionary
136
- __all__ .extend (["op_name_dict" , "fixed_ops" , "parameterized_ops" ])
137
-
138
130
# create the operations dictionary
139
- op_name_dict = {x .op_name : x for x in all_variables }
131
+ op_name_dict = {_x .op_name : _x for _x in _all_variables }
140
132
141
133
# add aliases as well
142
134
op_name_dict .update (
161
153
}
162
154
)
163
155
164
- fixed_ops = [a ().__class__ .__name__ for a in all_variables if a .num_params == 0 ]
165
- parameterized_ops = [a ().__class__ .__name__ for a in all_variables if a .num_params > 0 ]
156
+ # TODO: make this compatible with aliases
157
+ fixed_ops = [_a ().__class__ .__name__ for _a in _all_variables if _a .num_params == 0 ]
158
+ parameterized_ops = [_a ().__class__ .__name__ for _a in _all_variables if _a .num_params > 0 ]
You can’t perform that action at this time.
0 commit comments