Skip to content
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

Remove (mistakenly added) newlines in docstring #1647

Merged
merged 1 commit into from Sep 13, 2021

Conversation

thisac
Copy link
Contributor

@thisac thisac commented Sep 13, 2021

Context:
I managed to accidentally add newlines via my code review suggestions in #1591.

Description of the Change:
Removes all the mistakenly added newlines in the docstring.

Benefits:
Things look like they should, and the docstring will render correctly.

Possible Drawbacks:
None

Related GitHub Issues:
None

@thisac thisac requested a review from josh146 September 13, 2021 14:16
@thisac thisac self-assigned this Sep 13, 2021
@github-actions
Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit .github/CHANGELOG.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

@codecov
Copy link

codecov bot commented Sep 13, 2021

Codecov Report

Merging #1647 (27b18e7) into v0.18.0-rc0 (1bb2bf1) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##           v0.18.0-rc0    #1647   +/-   ##
============================================
  Coverage        99.14%   99.14%           
============================================
  Files              196      196           
  Lines            14248    14248           
============================================
  Hits             14126    14126           
  Misses             122      122           
Impacted Files Coverage Δ
pennylane/qnode.py 98.69% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1bb2bf1...27b18e7. Read the comment docs.

Copy link
Member

@josh146 josh146 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Theo!

@thisac thisac merged commit c3d59e4 into v0.18.0-rc0 Sep 13, 2021
@thisac thisac deleted the remove-GH-newlines branch September 13, 2021 15:25
antalszava added a commit that referenced this pull request Sep 15, 2021
* remove newlines in docstring (#1647)

* Use numpy.

* Fix bug in single-qubit decomposition edge case. (#1643)

* Fix bug in zyz decomposition and tidy tests.

* Update CHANGELOG.

* Tweak comments.

* Raise an error for `qml.sample` and `shots=None` in `default.qubit.jax` (#1629)

* deprecate qml.sample and shots=None for default.qubit.jax

* changelog

* formatting

* move shot adaptive test

* Streamline implementation and add matrix equivalence checks to tests.

* Update single qubit op tests.

Co-authored-by: Olivia Di Matteo <dimatteo.olivia@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>

* Separate torch case.

* Update pennylane/devices/default_qubit.py

* Fix bug when using Jax jit and `QubitStateVector` (#1649)

* Use numpy.

* Separate torch case.

* Update pennylane/devices/default_qubit.py

Co-authored-by: antalszava <antalszava@gmail.com>

Co-authored-by: Theodor <theodor@xanadu.ai>
Co-authored-by: Romain Moyard <rmoyard@gmail.com>
Co-authored-by: Olivia Di Matteo <2068515+glassnotes@users.noreply.github.com>
Co-authored-by: Olivia Di Matteo <dimatteo.olivia@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>
josh146 added a commit that referenced this pull request Sep 20, 2021
* remove newlines in docstring (#1647)

* Fix bug in single-qubit decomposition edge case. (#1643)

* Fix bug in zyz decomposition and tidy tests.

* Update CHANGELOG.

* Tweak comments.

* Raise an error for `qml.sample` and `shots=None` in `default.qubit.jax` (#1629)

* deprecate qml.sample and shots=None for default.qubit.jax

* changelog

* formatting

* move shot adaptive test

* Streamline implementation and add matrix equivalence checks to tests.

* Update single qubit op tests.

Co-authored-by: Olivia Di Matteo <dimatteo.olivia@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>

* Fix bug when using Jax jit and `QubitStateVector` (#1649)

* Use numpy.

* Separate torch case.

* Update pennylane/devices/default_qubit.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Matplotlib circuit drawing (#1484)

* Raise a `UserWarning` for a list of shots in `Device.execute` (#1659)

* add warning for shot list in pure Device based devices; test for default.gaussian

* changelog

* PR number

* formatting

* comment

* Update pennylane/_device.py

Co-authored-by: Theodor <theodor@xanadu.ai>

* test message

Co-authored-by: Theodor <theodor@xanadu.ai>

* bugfix: raise mpl import error inside class initialization (#1667)

* mpldrawer when mpl not installed

* black

* bugfix for device shot list processing (#1666)

* fix process shots bug

* add tests and changelog

* docstrings and black

* add frob to list (#1664)

* Small change example. (#1669)

* Adds PennyLane-Lightning as a dependency (#1663)

* Add pl-lightning to requirements.txt and setup.py

* Add to requirements-ci.txt

* Temporarily add pybind11

* Update setup.py

* Add setup.py

* Add to changelog

* update changelog

* Update changelog

* Remove from requirements

* Does this fix?

* Revert

* New version

* Add diff method

* Add pennylane lightning pypi dep

* Update changelog

* Add simple test

* Remove adjoint

* Pin minimum version of lightning

* Emphasize as lightning.qubit

* Link to PL-Lightning release notes

* Update .github/CHANGELOG.md

* Update changelog

Co-authored-by: Lee J. O'Riordan <loriordan@gmail.com>

* tests/transforms/test_optimization/utils.py from rc

* tests/transforms/test_decompositions.py from rc

* Add shorter drawer example for the notes

* Add Hamiltonian expval(H) plot

* transforms test files

* updated example image

Co-authored-by: Theodor <theodor@xanadu.ai>
Co-authored-by: Olivia Di Matteo <2068515+glassnotes@users.noreply.github.com>
Co-authored-by: Olivia Di Matteo <dimatteo.olivia@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain <rmoyard@gmail.com>
Co-authored-by: Christina Lee <christina@xanadu.ai>
Co-authored-by: Tom Bromley <49409390+trbromley@users.noreply.github.com>
Co-authored-by: Lee J. O'Riordan <loriordan@gmail.com>
antalszava added a commit that referenced this pull request Sep 21, 2021
* remove newlines in docstring (#1647)

* Fix bug in single-qubit decomposition edge case. (#1643)

* Fix bug in zyz decomposition and tidy tests.

* Update CHANGELOG.

* Tweak comments.

* Raise an error for `qml.sample` and `shots=None` in `default.qubit.jax` (#1629)

* deprecate qml.sample and shots=None for default.qubit.jax

* changelog

* formatting

* move shot adaptive test

* Streamline implementation and add matrix equivalence checks to tests.

* Update single qubit op tests.

Co-authored-by: Olivia Di Matteo <dimatteo.olivia@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>

* Fix bug when using Jax jit and `QubitStateVector` (#1649)

* Use numpy.

* Separate torch case.

* Update pennylane/devices/default_qubit.py

Co-authored-by: antalszava <antalszava@gmail.com>

* Matplotlib circuit drawing (#1484)

* Raise a `UserWarning` for a list of shots in `Device.execute` (#1659)

* add warning for shot list in pure Device based devices; test for default.gaussian

* changelog

* PR number

* formatting

* comment

* Update pennylane/_device.py

Co-authored-by: Theodor <theodor@xanadu.ai>

* test message

Co-authored-by: Theodor <theodor@xanadu.ai>

* bugfix: raise mpl import error inside class initialization (#1667)

* mpldrawer when mpl not installed

* black

* bugfix for device shot list processing (#1666)

* fix process shots bug

* add tests and changelog

* docstrings and black

* add frob to list (#1664)

* Small change example. (#1669)

* Adds PennyLane-Lightning as a dependency (#1663)

* Add pl-lightning to requirements.txt and setup.py

* Add to requirements-ci.txt

* Temporarily add pybind11

* Update setup.py

* Add setup.py

* Add to changelog

* update changelog

* Update changelog

* Remove from requirements

* Does this fix?

* Revert

* New version

* Add diff method

* Add pennylane lightning pypi dep

* Update changelog

* Add simple test

* Remove adjoint

* Pin minimum version of lightning

* Emphasize as lightning.qubit

* Link to PL-Lightning release notes

* Update .github/CHANGELOG.md

* Update changelog

Co-authored-by: Lee J. O'Riordan <loriordan@gmail.com>

* Adjust Torch and TF backprop docstrings (#1662)

* error

* adjust TF docstring

* Diff option backprop check rc (#1658)

* update the condition for backprop diff

* add test and readjust the other test

* formatting

* diff_method='parameter-shift' for default.tensor.tf

* format tests

* Update pennylane/qnode.py

Co-authored-by: Romain <rmoyard@gmail.com>

Co-authored-by: Romain <rmoyard@gmail.com>

* V0.18.0 release notes (#1656)

* version bump

* group entries

* update the descriptions

* torch example

* contributors

* Update .github/CHANGELOG.md

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update .github/CHANGELOG.md

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update .github/CHANGELOG.md

* Update .github/CHANGELOG.md

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update .github/CHANGELOG.md

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update .github/CHANGELOG.md

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update .github/CHANGELOG.md

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update .github/CHANGELOG.md

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update .github/CHANGELOG.md

Co-authored-by: Josh Izaac <josh146@gmail.com>

* format lines

* num

* Update .github/CHANGELOG.md

Co-authored-by: Josh Izaac <josh146@gmail.com>

* move q transforms

* trainable coeffs

* SISWAP adjust

* Add link to changelog

* Fix merge

* SISWAP move to improvements

* drawer example

* remove item on separate requirements file

* Update .github/CHANGELOG.md

Co-authored-by: Josh Izaac <josh146@gmail.com>

* QFT move

* further suggestions

* NumPy

* draw example

* no grad call for finite_diff qml.gradients

* no grad call for param_shift

* lightning

* Update .github/CHANGELOG.md

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Hamiltonian + its plot

* Hamiltonian param shift move

* bug fix phrasing

* contributors list

* Lightning adjoint plot & description

* Hamiltonian plot width

* align mid

* Revert "align mid"

This reverts commit 9b8d354.

Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Tom Bromley <49409390+trbromley@users.noreply.github.com>

Co-authored-by: Theodor <theodor@xanadu.ai>
Co-authored-by: Olivia Di Matteo <2068515+glassnotes@users.noreply.github.com>
Co-authored-by: Olivia Di Matteo <dimatteo.olivia@gmail.com>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: Romain <rmoyard@gmail.com>
Co-authored-by: Christina Lee <christina@xanadu.ai>
Co-authored-by: Tom Bromley <49409390+trbromley@users.noreply.github.com>
Co-authored-by: Lee J. O'Riordan <loriordan@gmail.com>
rmoyard added a commit that referenced this pull request Sep 28, 2021
* remove newlines in docstring (#1647)

* Differentiate jit jax and jax

* Update

* Add tests.

* Black

* avoid import jax

* Update comments and tests.

* Add changelog.

* jnp to np

* jnp.array for jnp.allclose

* jnp.array

* Differentiate the case more explicitly.

Co-authored-by: Theodor <theodor@xanadu.ai>
rmoyard added a commit that referenced this pull request Oct 7, 2021
* remove newlines in docstring (#1647)

* Add obs return type to hash

* Test different return type with cache.

* Black.

* Update changelog.

* Update doc/releases/changelog-dev.md

Co-authored-by: antalszava <antalszava@gmail.com>

* Update test.

* Add tests.

* Black test.

* Change names

Co-authored-by: Theodor <theodor@xanadu.ai>
Co-authored-by: antalszava <antalszava@gmail.com>
antalszava pushed a commit that referenced this pull request Oct 8, 2021
* remove newlines in docstring (#1647)

* Replace dead link.

Co-authored-by: Theodor <theodor@xanadu.ai>
rmoyard added a commit that referenced this pull request Oct 12, 2021
* remove newlines in docstring (#1647)

* Change Jax doc.

* Typo.

Co-authored-by: Theodor <theodor@xanadu.ai>
Co-authored-by: antalszava <antalszava@gmail.com>
rmoyard added a commit that referenced this pull request Oct 22, 2021
* remove newlines in docstring (#1647)

* Template top level.

* Changelog.

* QFT in defautl qubit and default mixed

* Black and qaoaembedding

* Typos layers.

* Update documentation template.

* Typo.

* Update index.rst

* Change references for templates.

* Typo rst.

* Template doc.

* Move templates.

* Typo

* Typo.

* Change documentation from review.

Co-authored-by: Theodor <theodor@xanadu.ai>
Co-authored-by: antalszava <antalszava@gmail.com>
rmoyard added a commit that referenced this pull request Mar 1, 2022
* remove newlines in docstring (#1647)

* First version.

* Working version.

* DAG successors.

* Update documentation and code quality.

* Black

* More black

* Protected access.

* Import order.

* Target_wires to tar_wires.

* Typo.

* Typo.

* More black.

* Add observable attribute and tests.

* Black.

* More black.

* Add more tests.

* Add more tests.

* Sort pred succ

* Add support SWAP.

* More coverage.

* Black.

* Update from review.

* Black.

* Update pennylane/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Changes from review.

* Random codefactor

* Remove some changes.

* Black.

* Change target qpe, qmc

* More doc.

* Update param gates

* Param Ops

* Update parameters

* More ops

* Add templates.

* Update

* More tests.

* More tests.

* Update from refractor.

* Update

* black

* Update.

* Update.

* Better integration with future control update

* Black.

* Typo

* Adapt for pattern matching.

* Update coverage

* More coverage

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update from review.

* Test simplify

* Test simplify

* Remove

* Simplify docstring

* Update doc/releases/changelog-dev.md

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update doc/releases/changelog-dev.md

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* black

* Update from review

* Update doc/releases/changelog-dev.md

* Update doc/releases/changelog-dev.md

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update doc/releases/changelog-dev.md

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* More

* Doc

Co-authored-by: Theodor <theodor@xanadu.ai>
Co-authored-by: Josh Izaac <josh146@gmail.com>
rmoyard added a commit that referenced this pull request Mar 25, 2022
* remove newlines in docstring (#1647)

* First version.

* Working version.

* DAG successors.

* Update documentation and code quality.

* Black

* More black

* Protected access.

* Import order.

* Target_wires to tar_wires.

* Typo.

* Typo.

* More black.

* Add observable attribute and tests.

* Black.

* More black.

* Add more tests.

* Add more tests.

* Sort pred succ

* Add support SWAP.

* More coverage.

* Black.

* Update from review.

* Black.

* Update pennylane/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Changes from review.

* Random codefactor

* Remove some changes.

* Black.

* Change target qpe, qmc

* More doc.

* First structure.

* Compare operations.

* Update

* Qubit conf.

* Update.

* Working pattern matching

* Maximal matches

* Black

* Working for non param operations.

* Transform.

* Update param gates

* Param Ops

* Update parameters

* More ops

* Add templates.

* Update

* More tests.

* More tests.

* Update from refractor.

* Update

* black

* Black

* Update.

* Update.

* Better integration with future control update

* Black.

* commutation_dag

* Typo

* Adapt for pattern matching.

* Update doc.

* More test.

* Black.

* Update coverage

* More coverage

* Add vbe

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update pennylane/transforms/commutation_dag.py

Co-authored-by: Josh Izaac <josh146@gmail.com>

* Update docstrings

* Update from review.

* Test simplify

* Test simplify

* Remove

* Simplify docstring

* Update

* Update measurements.

* Update pennylane/transforms/commutation_dag.py

* Update qubit order

* Update test with unitary comparison.

* Moree tests

* Add paper example

* Codefactor

* Black.

* Update.

* Black

* More tests.

* More tests.

* Remove unecessary files.

* Small change.

* Update documentation.

* Update from review.

* Black

* Codefactor

* Docstring indent.

* Trigger CI

* Update example

* Update example

* Trigger CI

* indent

* Trigger CI

* Add changelog

* Update doc/releases/changelog-dev.md

Co-authored-by: Christina Lee <christina@xanadu.ai>

* Update doc/releases/changelog-dev.md

Co-authored-by: Christina Lee <christina@xanadu.ai>

* Update changelog

Co-authored-by: Theodor <theodor@xanadu.ai>
Co-authored-by: Josh Izaac <josh146@gmail.com>
Co-authored-by: antalszava <antalszava@gmail.com>
Co-authored-by: Christina Lee <christina@xanadu.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants