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

Update pennylane requirement from ~=0.35.1 to ~=0.36.0 #2349

Merged
merged 1 commit into from
May 7, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 7, 2024

Updates the requirements on pennylane to permit the latest version.

Release notes

Sourced from pennylane's releases.

Release 0.36.0

Two new user-facing classes enable calculating and propagating gate errors in PennyLane:

  • qml.resource.SpectralNormError: the spectral norm error is defined as the distance, in spectral norm, between the true unitary we intend to apply and the approximate unitary that is actually applied.

  • qml.resource.ErrorOperation: a base class that inherits from qml.operation.Operation and represents quantum operations which carry some form of algorithmic error.

    SpectralNormError can be used for back-of-the-envelope type calculations like obtaining the spectral norm error between two unitaries via get_error:

    import pennylane as qml 
    from pennylane.resource import ErrorOperation, SpectralNormError
    intended_op = qml.RY(0.40, 0)
    actual_op = qml.RY(0.41, 0) # angle of rotation is slightly off

    >>> SpectralNormError.get_error(intended_op, actual_op) 
    0.004999994791668309 

    SpectralNormError is also a key tool to specify errors in larger quantum circuits:

  • For operations representing a major building block of an algorithm, we can create a custom operation that inherits from ErrorOperation. This child class must override the error method and should return a SpectralNormError instance:

    class MyErrorOperation(ErrorOperation):
    def init(self, error_val, wires):
    self.error_val = error_val
    super().init(wires=wires)
    def error(self):
    return SpectralNormError(self.error_val)

    In this toy example, MyErrorOperation introduces an arbitrary SpectralNormError when called in a QNode. It does not require a decomposition or matrix representation when used with null.qubit (suggested for use with resource and error estimation since circuit executions are not required to calculate resources or errors).

    dev = qml.device("null.qubit")
    @​qml.qnode(dev)
    def circuit():

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added the infrastructure For issues related to building, packaging, and continuous integration. label May 7, 2024
Copy link

codecov bot commented May 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.22%. Comparing base (3a11517) to head (98b4984).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2349   +/-   ##
=======================================
  Coverage   98.22%   98.22%           
=======================================
  Files          87       87           
  Lines        4056     4056           
=======================================
  Hits         3984     3984           
  Misses         72       72           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Updates the requirements on [pennylane](https://github.com/PennyLaneAI/pennylane) to permit the latest version.
- [Release notes](https://github.com/PennyLaneAI/pennylane/releases)
- [Commits](PennyLaneAI/pennylane@v0.35.1...v0.36.0)

---
updated-dependencies:
- dependency-name: pennylane
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/pip/pennylane-approx-eq-0.36.0 branch from 6f4b53b to 98b4984 Compare May 7, 2024 12:25
@cosenal cosenal merged commit 8b9ba75 into main May 7, 2024
17 checks passed
@cosenal cosenal deleted the dependabot/pip/pennylane-approx-eq-0.36.0 branch May 7, 2024 13:06
cosenal pushed a commit that referenced this pull request Jun 26, 2024
Updates the requirements on [pennylane](https://github.com/PennyLaneAI/pennylane) to permit the latest version.
- [Release notes](https://github.com/PennyLaneAI/pennylane/releases)
- [Commits](PennyLaneAI/pennylane@v0.35.1...v0.36.0)

---
updated-dependencies:
- dependency-name: pennylane
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure For issues related to building, packaging, and continuous integration.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant