We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 731b8a1 commit 180175dCopy full SHA for 180175d
src/qibo/transpiler/unroller.py
@@ -20,10 +20,10 @@
20
class FlagMeta(EnumMeta):
21
"""Metaclass for :class:`qibo.transpiler.unroller.NativeGates` that allows initialization with a list of gate name strings."""
22
23
- def __getitem__(cls, keys):
+ def __getitem__(self, keys):
24
if isinstance(keys, str):
25
return super().__getitem__(keys)
26
- return reduce(or_, [cls[key] for key in keys]) # pylint: disable=E1136
+ return reduce(or_, [self[key] for key in keys]) # pylint: disable=E1136
27
28
29
class NativeGates(Flag, metaclass=FlagMeta):
0 commit comments