Skip to content

Commit

Permalink
Remove retired VQE runner (#313)
Browse files Browse the repository at this point in the history
* pre release version bump

* remove VQE runner now that it's retired

* change test to not fail with qiskit 0.43; put back requirement

---------

Co-authored-by: lillian542 <[email protected]>
  • Loading branch information
timmysilv and lillian542 authored Jun 22, 2023
1 parent 76be1e1 commit 577dc2f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 1,068 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
* Added a `RemoteDevice` (PennyLane device name: `qiskit.remote`) that accepts a backend
instance directly. [(#304)](https://github.com/PennyLaneAI/pennylane-qiskit/pull/304)

### Breaking changes

* The `vqe_runner` has been removed, as the Qiskit Runtime VQE program has been retired.
[(#313)](https://github.com/PennyLaneAI/pennylane-qiskit/pull/313)

### Bug fixes

* The list of supported gates is replaced with `pennylane.ops._qubit__ops__` so that the `CZ` gate is included.
Expand All @@ -14,6 +19,7 @@

This release contains contributions from (in alphabetical order):

Matthew Silverman,
Frederik Wilde,
Etienne Wodey (Alpine Quantum Technologies GmbH)

Expand Down
31 changes: 0 additions & 31 deletions doc/devices/runtime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,4 @@ You can use the ``circuit_runner`` and ``sampler`` devices by using their short
dev = qml.device('qiskit.ibmq.sampler', wires=2, backend='ibmq_qasm_simulator', shots=8000, **kwargs)
Custom Runtime Programs
~~~~~~~~~~~~~~~~~~~~~~~

Not all Qiskit runtime programs correspond to complete devices, some solve specific problems (VQE, QAOA, etc...).
We created a wrapper to use PennyLane objects while solving VQE problems on IBM backends.

.. code-block:: python
from pennylane_qiskit import vqe_runner
def vqe_circuit(params):
qml.RX(params[0], wires=0)
qml.RY(params[1], wires=0)
coeffs = [1, 1]
obs = [qml.PauliX(0), qml.PauliZ(0)]
hamiltonian = qml.Hamiltonian(coeffs, obs)
shots = 8000
job = vqe_runner(
backend="ibmq_qasm_simulator",
hamiltonian=hamiltonian,
ansatz=vqe_circuit,
x0=[3.97507603, 3.00854038],
shots=shots,
optimizer="SPSA",
optimizer_config={"maxiter": 40},
kwargs={"hub": "ibm-q", "group": "open", "project": "main"},
)
More details on Qiskit runtime programs in the `IBMQ runtime documentation <https://qiskit.org/documentation/partners/qiskit_ibm_runtime/index.html>`_.
1 change: 0 additions & 1 deletion pennylane_qiskit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@
from .converter import load, load_qasm, load_qasm_from_file
from .runtime_devices import IBMQCircuitRunnerDevice
from .runtime_devices import IBMQSamplerDevice
from .vqe_runtime_runner import vqe_runner
Loading

0 comments on commit 577dc2f

Please sign in to comment.