Skip to content

Commit

Permalink
✨ Support for Qiskit's final_layout cda-tum#439
Browse files Browse the repository at this point in the history
  • Loading branch information
TeWas authored and burgholzer committed Apr 20, 2024
1 parent 4d6f788 commit a2daeaf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mqt/core/plugins/qiskit.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,11 @@ def _import_layouts(qc: QuantumComputation, circ: QuantumCircuit) -> None:
if final_layout is None:
return

# final_index_layout creates a list of final positions for input circuit qubits
final_index_layout = layout.final_index_layout(filter_ancillas=False)
for idx, value in enumerate(final_index_layout):
qc.output_permutation[value] = idx


def _import_definition(
qc: QuantumComputation | CompoundOperation,
Expand Down

0 comments on commit a2daeaf

Please sign in to comment.