This PR adds a new option to QCEC that allows to backpropagate the output permutation derived from the measurements of a circuit to the initial layout based on the optimization pass added in cda-tum/mqt-core#512.
This is especially helpful for verifying dynamic quantum circuits because it is rather hard (if not impossible) to define a proper initial layout for the circuit after it has been transformed to a regular quantum circuit by substituting resets and deferring measurements without an educated guess.
The new option is opt-in for now and can be activated by passing backpropagate_output_permutation=True as a keyword argument to the verify methods or by setting config.optimizations.backpropagate_output_permutation=True on a respective Configuration object.
Fixes #343
Checklist:
[x] The pull request only contains commits that are related to it.
[x] I have added appropriate tests and documentation.
[x] I have made sure that all CI jobs on GitHub pass.
[x] The pull request introduces no new warnings and follows the project's style guidelines.
Description
This PR adds a new option to QCEC that allows to backpropagate the output permutation derived from the measurements of a circuit to the initial layout based on the optimization pass added in cda-tum/mqt-core#512.
This is especially helpful for verifying dynamic quantum circuits because it is rather hard (if not impossible) to define a proper initial layout for the circuit after it has been transformed to a regular quantum circuit by substituting resets and deferring measurements without an educated guess.
The new option is opt-in for now and can be activated by passing
backpropagate_output_permutation=True
as a keyword argument to theverify
methods or by settingconfig.optimizations.backpropagate_output_permutation=True
on a respectiveConfiguration
object.Fixes #343
Checklist: