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.36.0 to ~=0.38.0 #2492

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Sep 4, 2024

Updates the requirements on pennylane to permit the latest version.

Release notes

Sourced from pennylane's releases.

Release 0.38.0

  • A new function called qml.registers has been added that lets you seamlessly create registers of wires. [(#5957)](PennyLaneAI/pennylane#5957) [(#6102)](PennyLaneAI/pennylane#6102)

    Using registers, it is easier to build large algorithms and circuits by applying gates and operations to predefined collections of wires. With qml.registers, you can create registers of wires by providing a dictionary whose keys are register names and whose values are the number of wires in each register.

    >>> wire_reg = qml.registers({"alice": 4, "bob": 3})
    >>> wire_reg
    {'alice': Wires([0, 1, 2, 3]), 'bob': Wires([4, 5, 6])}

    The resulting data structure of qml.registers is a dictionary with the same register names as keys, but the values are qml.wires.Wires instances.

    Nesting registers within other registers can be done by providing a nested dictionary, where the ordering of wire labels is based on the order of appearance and nestedness.

    >>> wire_reg = qml.registers({"alice": {"alice1": 1, "alice2": 2}, "bob": {"bob1": 2, "bob2": 1}})
    >>> wire_reg
    {'alice1': Wires([0]), 'alice2': Wires([1, 2]), 'alice': Wires([0, 1, 2]), 'bob1': Wires([3, 4]), 'bob2': Wires([5]), 'bob': Wires([3, 4, 5])}

    Since the values of the dictionary are Wires instances, their use within quantum circuits is very similar to that of a list of integers.

    dev = qml.device("default.qubit")
    @​qml.qnode(dev)
    def circuit():
    for w in wire_reg["alice"]:
    qml.Hadamard(w)
    for w in wire_reg["bob1"]:
        qml.RX(0.1967, wires=w)
    qml.CNOT(wires=[wire_reg["alice1"][0], wire_reg["bob2"][0]])
    return [qml.expval(qml.Y(w)) for w in wire_reg["bob1"]]
    
    print(qml.draw(circuit)())

    0: ──H────────╭●─┤     
    1: ──H────────│──┤     
    2: ──H────────│──┤     
    3: ──RX(0.20)─│──┤  <Y>

... (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)

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.36.0...v0.38.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the infrastructure For issues related to building, packaging, and continuous integration. label Sep 4, 2024
Copy link
Contributor Author

dependabot bot commented on behalf of github Sep 13, 2024

Superseded by #2502.

@dependabot dependabot bot closed this Sep 13, 2024
@dependabot dependabot bot deleted the dependabot/pip/pennylane-approx-eq-0.38.0 branch September 13, 2024 04:27
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.

0 participants