-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Part 12 of https://tinyurl.com/cirq-feedforward Allow for classically controlled subcircuits to be controlled by measurements done prior to that subcircuit. Such behavior "already worked" for subcircuits without repetitions. But for subcircuits with repetitions, all measurement/control keys were "lifted" to the repetition id. i.e. in a subcircuit containing control key "A", that would be lifted to "0:A" and "1:A" to distinguish them. However if the measurement 'A' is outside of the subcircuit, then that lifting would cause the control keys to no longer match the measurement key. This PR fixes the above problem by passing context data through subcircuit decomposition. The behavior is that if a control key matches a measurement key from the same subcircuit, then both are lifted to the corresponding repetition. Otherwise the control key matches to the nearest-scoped measurement key outside of the subcircuit.
- Loading branch information
Showing
19 changed files
with
559 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.