Skip to content

Commit

Permalink
Run black
Browse files Browse the repository at this point in the history
  • Loading branch information
jlapeyre committed May 30, 2024
1 parent db8fbad commit 6799e19
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions qiskit/qasm3/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,7 @@ def hoist_declarations(self, instructions, *, opaques, gates):
for block in operation.blocks:
self.hoist_declarations(block.data, opaques=opaques, gates=gates)
continue
if operation in self.global_namespace or isinstance(
operation, self.builtins
):
if operation in self.global_namespace or isinstance(operation, self.builtins):
continue

if isinstance(operation, standard_gates.CXGate):
Expand All @@ -525,9 +523,7 @@ def hoist_declarations(self, instructions, *, opaques, gates):
elif not isinstance(operation, Gate):
raise QASM3ExporterError("Exporting non-unitary instructions is not yet supported.")
else:
self.hoist_declarations(
operation.definition.data, opaques=opaques, gates=gates
)
self.hoist_declarations(operation.definition.data, opaques=opaques, gates=gates)
self._register_gate(operation)
gates.append(operation)
return opaques, gates
Expand Down Expand Up @@ -934,10 +930,7 @@ def case(values, case_block):
ast.AssignmentStatement(target, real_target),
ast.SwitchStatementPreview(
target,
(
case(values, block)
for values, block in operation.cases_specifier()
),
(case(values, block) for values, block in operation.cases_specifier()),
),
]

Expand Down

0 comments on commit 6799e19

Please sign in to comment.