-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
mod: transpilerIssues and PRs related to TranspilerIssues and PRs related to Transpilerpriority: mediumtype: epicA theme of work that contain sub-tasksA theme of work that contain sub-taskstype: feature requestNew feature or requestNew feature or request
Milestone
Description
What should we add?
Right now we have a mix of the legacy approach to modeling a backend in the transpiler (basis_gates
, CouplingMap
, etc) and the new approach, the Target
class. This causes friction when adding new passes or maintaining existing ones because we have to support dual paths for everything. We unify all of the internals on the new model because in almost every case we can convert from the legacy model to the target without issue.
- Add support for
Target
to all transpiler passes that need backend constraints (even if it's just to get a legacy view, like aCouplingMap
from the target) - Document that moving forward all new passes only will get a
Target
(both contributor guidelines along with preset pass managers) - Update preset pass manager construction to only pass a
Target
to passes- Stage plugins initialization will need to fill out all the fields in the
PassManagerConfig
from theTarget
for backwards compatibility. We can stop doing this as we deprecate non-target constraint fields inPassManagerConfig
- Stage plugins initialization will need to fill out all the fields in the
- Update
transpile()
to convertBackendV1
inputs toBackendV2
withBackendV2Converter
:- Standardize behavior of
transpile
withBackendV2
: Fix custom constraints intranspile
withBackendV2
#12042 - Update
transpile()
to convertBackendV1
inputs toBackendV2
withBackendV2Converter
#11996
- Standardize behavior of
- Update
transpile()
to convert loose input of constraints to aTarget
withTarget.from_configuration()
- Deprecate anything we previously could represent that is lost in conversion to
Target
(or alternatively augmentTarget
's data model to support these edge cases). The cases currently known where we're unable to convert from the legacy model to theTarget
are:coupling_map
withoutbasis_gates
(represent solely a connectivity constraint).
After the above is done and released then we can start the deprecation process for the legacy inputs to the transpiler passes along with the PassManager
config.
Metadata
Metadata
Labels
mod: transpilerIssues and PRs related to TranspilerIssues and PRs related to Transpilerpriority: mediumtype: epicA theme of work that contain sub-tasksA theme of work that contain sub-taskstype: feature requestNew feature or requestNew feature or request
Type
Projects
Status
done