forked from quantumlib/Cirq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for deep=True to
cirq.expand_composite
transformer (qua…
…ntumlib#5119) - Adds support to recursively run `cirq.expand_composite` transformer on circuits wrapped inside a circuit operation by setting deep=True in transformer context. - Note that this does not rely on `preserve_structure` argument of `protocols.decompose` because the latter does not support handling nested circuit operations tagged with a no-compile tag (the added tests would fail if we rely on protocols.decompose(preserve_structure=True) instead transformer primitives). Hence, I would argue that we should deprecate the preserve_structure=True flag in protocols.decompose in-favour of this transformer. cc @95-martin-orion - Part of quantumlib#5039
- Loading branch information
1 parent
32c0e02
commit 32afaa0
Showing
2 changed files
with
84 additions
and
3 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