Skip to content

Commit 8d0768b

Browse files
multiphaseCFDrniczhjoeycartermudit2812
authored
[Unified compiler] [FTQC] Add an outline state evolution pass (#8367)
### Before submitting Please complete the following checklist when submitting a PR: - [ ] All new features must include a unit test. If you've fixed a bug or added code that should be tested, add a test to the test directory! - [ ] All new functions and code must be clearly commented and documented. If you do make documentation changes, make sure that the docs build and render correctly by running `make docs`. - [ ] Ensure that the test suite passes, by running `make test`. - [x] Add a new entry to the `doc/releases/changelog-dev.md` file, summarizing the change, and including a link back to the PR. - [x] The PennyLane source code conforms to [PEP8 standards](https://www.python.org/dev/peps/pep-0008/). We check all of our code against [Pylint](https://www.pylint.org/). To lint modified files, simply `pip install pylint`, and then run `pylint pennylane/path/to/file.py`. When all the above are checked, delete everything above the dashed line and fill in the pull request template. ------------------------------------------------------------------------------------------------------------ **Context:** [sc-96060] This PR is a mirror of Catalyst [PR](PennyLaneAI/catalyst#2063) . **Description of the Change:** **Benefits:** **Possible Drawbacks:** **Related GitHub Issues:** --------- Co-authored-by: Hong-Sheng Zheng <[email protected]> Co-authored-by: Joey Carter <[email protected]> Co-authored-by: Mudit Pandey <[email protected]>
1 parent 593869a commit 8d0768b

File tree

5 files changed

+872
-0
lines changed

5 files changed

+872
-0
lines changed

doc/releases/changelog-dev.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@
167167
circuit. A clear error is now also raised when there are observables with overlapping wires.
168168
[(#8383)](https://github.com/PennyLaneAI/pennylane/pull/8383)
169169

170+
* Add an `outline_state_evolution_pass` pass to the MBQC xDSL transform, which moves all
171+
quantum gate operations to a private callable.
172+
[(#8367)](https://github.com/PennyLaneAI/pennylane/pull/8367)
173+
170174
* The experimental xDSL implementation of `measurements_from_samples_pass` has been updated to support `shots` defined by an `arith.constant` operation.
171175
[(#8460)](https://github.com/PennyLaneAI/pennylane/pull/8460)
172176

@@ -222,3 +226,4 @@ Mudit Pandey,
222226
Shuli Shu,
223227
Jay Soni,
224228
David Wierichs,
229+
Hongsheng Zheng

pennylane/compiler/python_compiler/transforms/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
ConvertToMBQCFormalismPass,
1919
decompose_graph_state_pass,
2020
DecomposeGraphStatePass,
21+
outline_state_evolution_pass,
22+
OutlineStateEvolutionPass,
2123
null_decompose_graph_state_pass,
2224
NullDecomposeGraphStatePass,
2325
)
@@ -53,6 +55,8 @@
5355
"ConvertToMBQCFormalismPass",
5456
"decompose_graph_state_pass",
5557
"DecomposeGraphStatePass",
58+
"OutlineStateEvolutionPass",
59+
"outline_state_evolution_pass",
5660
"null_decompose_graph_state_pass",
5761
"NullDecomposeGraphStatePass",
5862
]

pennylane/compiler/python_compiler/transforms/mbqc/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,16 @@
2929
generate_adj_matrix,
3030
)
3131

32+
from .outline_state_evolution import OutlineStateEvolutionPass, outline_state_evolution_pass
3233

3334
__all__ = [
3435
# Passes
3536
"ConvertToMBQCFormalismPass",
3637
"DecomposeGraphStatePass",
38+
"OutlineStateEvolutionPass",
3739
"NullDecomposeGraphStatePass",
3840
"null_decompose_graph_state_pass",
41+
"outline_state_evolution_pass",
3942
# Utils
4043
"get_num_aux_wires",
4144
"decompose_graph_state_pass",

0 commit comments

Comments
 (0)