pennylane-qiskit icon indicating copy to clipboard operation
pennylane-qiskit copied to clipboard

Support Qiskit parametrized circuits

Open josh146 opened this issue 6 years ago • 2 comments

Qiskit now support building parametrized quantum circuits, see https://qiskit.org/documentation/terra/custom_gates.html#parameterized-gates.

The advantage of parametrized circuits is that Qiskit only needs to compile it once, and then can re-use the same parametrized circuit for different parameter values. This can lead to a significant speedup when working with variational quantum circuits.

Once XanaduAI/PennyLane#221 is implemented in core PennyLane, the plugin will be able to access the dictionary mapping parameters to operations. The Qiskit plugin will then be able to construct a parametrized circuit, and simply reuse this circuit for different parameter values (until the QNode requests a different circuit topology).

josh146 avatar Jul 24 '19 05:07 josh146

@josh146 this seems to be available by now, right?

antalszava avatar Jul 06 '21 14:07 antalszava

I don't believe so (unless I am mistaken) -- it looks like the plugin is still simply building a new numeric program every time:

https://github.com/PennyLaneAI/pennylane-qiskit/blob/1e152c7ecea78d2b51267d6a9f75393951449dcc/pennylane_qiskit/qiskit_device.py#L248

josh146 avatar Jul 06 '21 14:07 josh146