-
Notifications
You must be signed in to change notification settings - Fork 586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V0.23.0 notes #2474
Merged
Merged
V0.23.0 notes #2474
Changes from all commits
Commits
Show all changes
75 commits
Select commit
Hold shift + click to select a range
4cd2baf
notes + version
antalszava 007e7ae
merge rc
antalszava cf33991
sections
antalszava 7d38412
update examples
antalszava e8a8054
remove empty sections
antalszava 638c7ed
has_matrix bug fix
antalszava 64c4820
Adding more PRs to the changelog
antalszava f0eda54
PR, extend contributors
antalszava cc9ed09
Extend list of contributors
antalszava 9b93989
Update the order of entries
antalszava 8842be7
Merge branch 'v0.23.0-rc0' into v0.23.0-notes
antalszava a87109d
Add auto cutting example; reorg QChem
antalszava 91aceea
Merge branch 'v0.23.0-notes' of github.com:PennyLaneAI/pennylane into…
antalszava 6a4e2dc
remove curr release from 0.22.2 header
antalszava 248496e
formatting
antalszava 31d55c5
resolve
antalszava 9ce1761
fix link
antalszava 9898272
Update
rmoyard 4639909
Trigger CI
antalszava aa3943d
Change code blooc
rmoyard 9d9ee3c
Merge branch 'update_doc_pattern' of https://github.com/PennyLaneAI/p…
rmoyard d021370
Typo
rmoyard a39350f
Update pennylane/transforms/optimization/pattern_matching.py
rmoyard 3596cb8
Update pennylane/transforms/optimization/pattern_matching.py
rmoyard 6666639
Update pennylane/transforms/optimization/pattern_matching.py
rmoyard 21c807c
Update pennylane/transforms/optimization/pattern_matching.py
rmoyard 13b61f8
Addd seealso
rmoyard bde2f26
Merge branch 'update_doc_pattern' of https://github.com/PennyLaneAI/p…
rmoyard c70c1c5
modify the qchem section
soranjh f21764e
Merge branch 'v0.23.0-notes' of github.com:PennyLaneAI/pennylane into…
antalszava 392f784
Update doc/releases/changelog-0.23.0.md
antalszava 8b55f5a
Update doc/releases/changelog-0.23.0.md
antalszava 6a15d57
Update doc/releases/changelog-0.23.0.md
antalszava 0ca9b46
Update doc/releases/changelog-0.23.0.md
antalszava a2481ec
code review
antalszava cbd2290
code review
antalszava 3d2ba90
code review (remove empty lines & add pattern matching opt docstring …
antalszava bb3566d
Update doc/releases/changelog-0.23.0.md
antalszava 1c3bfb2
Update doc/releases/changelog-0.23.0.md
antalszava 18646fc
shape and numeric type example
antalszava 7017e6a
MP description update
antalszava be14d5a
rephrase expand_strategy for qml.specs improvement
antalszava f5889df
update
antalszava c43a9e9
caching phrasing
antalszava 75e9c61
removed
antalszava 6d72273
phrasing
antalszava b58ac5c
updates
antalszava 7035c87
bug phrasing, reorder
antalszava 0c83669
update link placement and use pycon
antalszava 87356dd
Merge branch 'v0.23.0-rc0' into v0.23.0-notes
antalszava 363513c
include swap test output in example
antalszava ae21243
More info on HS template
antalszava bac5c75
rephrase QCut
antalszava 59ab134
move example to UsageDetails
antalszava 5bff6a9
auto QCut rephrase
antalszava 2412f45
More powerful circuit cutting
antalszava 9b96d78
Trigger CI
antalszava 79877d2
Upddate
rmoyard 7a6c7a5
add qchem code example
soranjh 1e23d8f
correct typo in qchem text
soranjh a8c5101
no backticks
antalszava 00a417b
Merge branch 'v0.23.0-notes' of github.com:PennyLaneAI/pennylane into…
antalszava 0708cff
fix the case when obs=None for a MeasurementProcess for interface sel…
antalszava 2b95767
update
rmoyard 12f7355
changelog
antalszava b756de3
docstring
antalszava 8e7f120
Update doc/releases/changelog-0.23.0.md
antalszava 04dfe32
update links as per code review
antalszava fa34936
typo
rmoyard acdc128
pycon syntax
antalszava b530e95
double backticks
antalszava c24873a
Merge branch 'update_doc_pattern' into v0.23.0-notes
antalszava defc512
Merge branch 'v0.23.0-rc0' into v0.23.0-notes
antalszava d4cee10
no dev in release header
antalszava 596c7ef
Lightning v0.23.0 required in setup.py
antalszava File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
:orphan: | ||
|
||
# Release 0.22.2 (current release) | ||
# Release 0.22.2 | ||
|
||
<h3>Bug fixes</h3> | ||
|
||
|
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,4 @@ | |
Version number (major.minor.patch[-label]) | ||
""" | ||
|
||
__version__ = "0.23.0-dev" | ||
__version__ = "0.23.0" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,6 +161,8 @@ def circuit(): | |
3: ─├C─│───H─╰X─╰C─┤ | ||
4: ─╰C─╰X──────────┤ | ||
|
||
.. seealso:: :func:`~.pattern_matching` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note: changes from #2489 have been directly incorporated in this PR. |
||
|
||
**Reference:** | ||
|
||
[1] Iten, R., Moyard, R., Metger, T., Sutter, D. and Woerner, S., 2022. | ||
|
@@ -273,6 +275,63 @@ def pattern_matching(circuit_dag, pattern_dag): | |
|
||
Returns: | ||
list(Match): the list of maximal matches. | ||
|
||
**Example** | ||
|
||
First let's consider the following circuit | ||
|
||
.. code-block:: python | ||
|
||
def circuit(): | ||
qml.S(wires=0) | ||
qml.PauliZ(wires=0) | ||
qml.S(wires=1) | ||
qml.CZ(wires=[0, 1]) | ||
qml.S(wires=1) | ||
qml.S(wires=2) | ||
qml.CZ(wires=[1, 2]) | ||
qml.S(wires=2) | ||
return qml.expval(qml.PauliX(wires=0)) | ||
|
||
Assume that we want to find all maximal matches of a pattern containing a sequence of two :class:`~.S` gates and | ||
a :class:`~.PauliZ` gate: | ||
|
||
.. code-block:: python | ||
|
||
def pattern(): | ||
qml.S(wires=0) | ||
qml.S(wires=0) | ||
qml.PauliZ(wires=0) | ||
|
||
|
||
>>> circuit_dag = qml.commutation_dag(circuit)() | ||
>>> pattern_dag = qml.commutation_dag(pattern)() | ||
>>> all_max_matches = qml.pattern_matching(circuit_dag, pattern_dag) | ||
|
||
The matches are accessible by looping through the list outputted by ``qml.pattern_matching``. This output is a list | ||
of lists containing indices. Each list represents a match between a gate in the pattern with a gate in the circuit. | ||
The first indices represent the gates in the pattern and the second indices provides indices for the gates in the | ||
circuit (by order of appearance). | ||
|
||
>>> for match_conf in all_max_matches: | ||
... print(match_conf.match) | ||
[[0, 0], [2, 1]] | ||
[[0, 2], [1, 4]] | ||
[[0, 4], [1, 2]] | ||
[[0, 5], [1, 7]] | ||
[[0, 7], [1, 5]] | ||
|
||
The first match of this list corresponds to match the first gate (:class:`~.S`) in the pattern with the first gate | ||
in the circuit and also the third gate in the pattern (:class:`~.PauliZ`) with the second circuit gate. | ||
|
||
.. seealso:: :func:`~.pattern_matching_optimization` | ||
|
||
**Reference:** | ||
|
||
[1] Iten, R., Moyard, R., Metger, T., Sutter, D. and Woerner, S., 2022. | ||
Exact and practical pattern matching for quantum circuit optimization. | ||
`doi.org/10.1145/3498325 <https://dl.acm.org/doi/abs/10.1145/3498325>`_ | ||
|
||
""" | ||
# Match list | ||
match_list = [] | ||
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was getting linting issues in the QCut file.