diff --git a/pennylane_pq/devices.py b/pennylane_pq/devices.py index dd9504a..713a1cb 100644 --- a/pennylane_pq/devices.py +++ b/pennylane_pq/devices.py @@ -294,7 +294,7 @@ class ProjectQSimulator(_ProjectQDevice): short_name = 'projectq.simulator' _operation_map = PROJECTQ_OPERATION_MAP _expectation_map = dict({key:val for key, val in _operation_map.items() - if val in [XGate, YGate, ZGate, HGate]} , **{'Identity': None}) + if val in [XGate, YGate, ZGate, HGate]}, **{'Identity': None}) _circuits = {} _backend_kwargs = ['gate_fusion', 'rnd_seed'] diff --git a/pennylane_pq/pqops.py b/pennylane_pq/pqops.py index 5ce78e1..078cb39 100644 --- a/pennylane_pq/pqops.py +++ b/pennylane_pq/pqops.py @@ -35,8 +35,8 @@ def __str__(self): return self.name try: - from projectq.ops import MatrixGate -except: + from projectq.ops import MatrixGate #pylint: disable=ungrouped-imports +except ImportError: MatrixGate = BasicGate class BasicProjectQMatrixGate(MatrixGate): # pylint: disable=too-few-public-methods