CQCL / pytket-pennylane

Apache License 2.0
4 stars 1 forks source link

Bump the python-packages group with 1 update #103

Closed dependabot[bot] closed 8 months ago

dependabot[bot] commented 8 months ago

Updates the requirements on pennylane to permit the latest version. Updates pennylane to 0.35.0

Release notes

Sourced from pennylane's releases.

Release 0.35.0

  • This version of PennyLane makes it easier to import circuits from Qiskit. [(#5218)](PennyLaneAI/pennylane#5218) [(#5168)](PennyLaneAI/pennylane#5168)

    The qml.from_qiskit function converts a Qiskit QuantumCircuit into a PennyLane quantum function. Although qml.from_qiskit already exists in PennyLane, we have made a number of improvements to make importing from Qiskit easier. And yes — qml.from_qiskit functionality is compatible with both Qiskit 1.0 and earlier versions! Here's a comprehensive list of the improvements:

    • You can now append PennyLane measurements onto the quantum function returned by qml.from_qiskit. Consider this simple Qiskit circuit:

      import pennylane as qml 
      from qiskit import QuantumCircuit
      

      qc = QuantumCircuit(2) qc.rx(0.785, 0) qc.ry(1.57, 1)

      We can convert it into a PennyLane QNode in just a few lines, with PennyLane measurements easily included:

      >>> dev = qml.device("default.qubit") 
      >>> measurements = qml.expval(qml.Z(0) @ qml.Z(1)) 
      >>> qfunc = qml.from_qiskit(qc, measurements=measurements) 
      >>> qnode = qml.QNode(qfunc, dev) 
      >>> qnode() 
      tensor(0.00056331, requires_grad=True) 
      
    • Quantum circuits that already contain Qiskit-side measurements can be faithfully converted with qml.from_qiskit. Consider this example Qiskit circuit:

      qc = QuantumCircuit(3, 2) # Teleportation
      

      qc.rx(0.9, 0) # Prepare input state on qubit 0

      qc.h(1) # Prepare Bell state on qubits 1 and 2 qc.cx(1, 2)

      qc.cx(0, 1) # Perform teleportation qc.h(0) qc.measure(0, 0) qc.measure(1, 1)

      with qc.if_test((1, 1)): # Perform first conditional qc.x(2)

      This circuit can be converted into PennyLane with the Qiskit measurements still accessible. For example, we can use those results as inputs to a mid-circuit measurement in PennyLane:

... (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 will merge this PR once CI passes on it, as requested by @cqc-melf.


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 ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
dependabot[bot] commented 8 months ago

This pull request was built based on a group rule. Closing it will not ignore any of these versions in future pull requests.

cqc-melf commented 8 months ago

@dependabot squash and merge

dependabot[bot] commented 8 months ago

Looks like pennylane is updatable in another way, so this is no longer needed.