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.39.0 #2555

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 6, 2024

Updates the requirements on pennylane to permit the latest version.

Release notes

Sourced from pennylane's releases.

Release 0.39.0

  • Functionality for creating custom Hamiltonians on arbitrary lattices has been added. [(#6226)](PennyLaneAI/pennylane#6226) [(#6237)](PennyLaneAI/pennylane#6237)

    Hamiltonians beyond the available boiler-plate ones in the qml.spin module can be created with the addition of three new functions:

    • qml.spin.Lattice: a new object for instantiating customized lattices via primitive translation vectors and unit cell parameters,
    • qml.spin.generate_lattice: a utility function for creating standard Lattice objects, including 'chain', 'square', 'rectangle', 'triangle', 'honeycomb', 'kagome', 'lieb', 'cubic', 'bcc', 'fcc', and 'diamond',
    • qml.spin.spin_hamiltonian: generates a spin Hamiltonian object given a Lattice object with custom edges/nodes.

    An example is shown below for a $3 \times 3$ triangular lattice with open boundary conditions.

    lattice = qml.spin.Lattice(
        n_cells=[3, 3],
        vectors=[[1, 0], [np.cos(np.pi/3), np.sin(np.pi/3)]],
        positions=[[0, 0]],
        boundary_condition=False
    )

    We can validate this lattice against qml.spin.generate_lattice('triangle', ...) by checking the lattice_points (the $(x, y)$ coordinates of all sites in the lattice):

    >>> lp = lattice.lattice_points
    >>> triangular_lattice = qml.spin.generate_lattice('triangle', n_cells=[3, 3])
    >>> np.allclose(lp, triangular_lattice.lattice_points)
    True

    The edges of the Lattice object are nearest-neighbour by default, where we can add edges by using its add_edge method.

    Optionally, a Lattice object can have interactions and fields endowed to it by specifying values for its custom_edges and custom_nodes keyword arguments. The Hamiltonian can then be extracted with the qml.spin.spin_hamiltonian function. An example is shown below for the transverse-field Ising model Hamiltonian on a $3 \times 3$ triangular lattice. Note that the custom_edges and custom_nodes keyword arguments only need to be defined for one unit cell repetition.

    edges = [
        (0, 1), (0, 3), (1, 3)
    ]
    lattice = qml.spin.Lattice(
    n_cells=[3, 3],
    vectors=[[1, 0], [np.cos(np.pi/3), np.sin(np.pi/3)]],
    positions=[[0, 0]],
    boundary_condition=False,
    custom_edges=[[edge, ("ZZ", -1.0)] for edge in edges],
    custom_nodes=[[i, ("X", -0.5)] for i in range(3*3)],
    )

... (truncated)

Commits
  • 51797f7 Bump minimum Lightning and Catalyst versions (#6512)
  • 72bdaa2 Small fixes (#6513)
  • 6890211 Update typing_extensions pinning in requirements.txt (#6508)
  • 32e1d90 Update Iterable import package in decompose transform (#6507)
  • fb3892f Final documentation fixes for 0.39 feature freeze (#6469)
  • cf0cbe2 update neighbour_order error in Lattice (#6497)
  • 3ac1957 Revert "Adding string representation for some operators" (#6501)
  • b851ce3 Fix bug where unexpected queuing occurs in qml.ctrl among other functions (#6...
  • cd9fac9 Adding string representation for some operators (#6493)
  • d5d3c2b Fix snapshot wire order when simulation indices different than device wires (...
  • Additional commits viewable in compare view

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

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

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the infrastructure For issues related to building, packaging, and continuous integration. label Nov 6, 2024
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