-
Notifications
You must be signed in to change notification settings - Fork 616
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Default preprocessing transforms handles diagonalization of measureme…
…nts (#6653) The original intention was to include it in #6632 but we decided to exclude it for now due to the following complications (and potential solutions): - The diagonalize_measurements transform assumes that split_non_commuting has been applied (wouldn't make sense otherwise). What if the device requires diagonalization of some observables but supports commuting measurements? - We consider this enough of an edge case that a device like that should just implement its own preprocessing transform program. - The diagonalize_measurements transform raises an error when it sees anything that is not one of PauliX, PauliY, PauliZ, Hadamard, or a linear combination of the four. For example, if a device supports Hermitian but not Hadamard, it would expect that Hermitian is allowed but Hadamard is diagonalized. - We might consider changing diagonalize_measurements to simply leave unrecognized observables as is instead of raising an error. The unsupported observables that are not diagonalized will remain in the circuit past the diagonalize_measurements transform but caught later in the transform program by validate_observables. - Diagonalization produces additional gates that the device may not support. - decompose should be applied after diagonalization. Hopefully with restructured decompositions, diagonalizing gates can always be mapped to the device native gate set. [sc-79422] --------- Co-authored-by: Christina Lee <[email protected]>
- Loading branch information
Showing
6 changed files
with
148 additions
and
42 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