qiskit/test/python/dagcircuit
Jake Lishman f69461bca3
Add `DAGCircuit.make_physical` (#14587)
* Add `DAGCircuit.make_physical`

This method replaces the qubits on the `DAGCircuit` with the "canonical"
physical register.  This does a similar job to running `TrivialLayout`,
ancilla-allocation/expansion and `ApplyLayout`, and in fact this method
can be used as one half of action of `ApplyLayout` in general.

This commit is a stepping stone to having `ApplyLayout` in pure Rust
space.  The `TrivialLayout` pass could also, in a follow-up, be upgraded
to be similar to `SabreLayout` and perform its layout action inline too.
That can follow in a separate patch, however, since it has additional
API considerations, as it would change the behaviour of the pass.

* Reword description of method from 'cheap'

* Use `num_qubits` in Rust-space `make_physical`

* Update crates/circuit/src/dag_circuit.rs

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

---------

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
2025-06-17 22:04:46 +00:00
..
__init__.py Remove coding: utf-8 per PEP 3120 (#4914) 2020-08-12 08:29:16 -04:00
test_collect_blocks.py Remove condition/c_if, duration, and unit from instructions (#13506) 2025-02-24 15:33:45 +00:00
test_compose.py Remove calibrations APIs and related functionality (#13861) 2025-03-02 16:40:07 +00:00
test_dagcircuit.py Add `DAGCircuit.make_physical` (#14587) 2025-06-17 22:04:46 +00:00
test_dagdependency.py Remove `qiskit.test` (#10998) 2024-01-31 14:11:41 +00:00
test_dagdependency_v2.py Add DAGDependencyV2 and Converters (#11705) 2024-04-16 13:41:34 +00:00