Qiskit parameter vector support

Hi,

I am trying to convert a qiskit circuit with parameter vector only to get an error ValueError: can only convert an array of size 1 to a Python scalar I assume it is because the code does not yet support the vector format of parameter vector ?

from qiskit import QuantumCircuit
from qiskit.circuit import ParameterVector

import numpy as np
dev = qml.device('default.qubit', wires=2)

theta = ParameterVector('t',2)
qc = QuantumCircuit(2)
qc.rz(theta[0], [0])
qc.rx(theta[1], [0])
qc.cx(0, 1)

@qml.qnode(dev)
def quantum_circuit_with_loaded_subcircuit(x):
    qml.from_qiskit(qc)({theta: x})
return qml.expval(qml.PauliZ(0))

angle = [np.pi/2,0]
result = quantum_circuit_with_loaded_subcircuit(angle)

I assume it is because the code does not yet support the vector format of parameter vector ?

Hi @santosh – yes, this is likely the case! If you would like to create an issue on the PennyLane-Qiskit GitHub repo, the team will be able to look into adding support for Qiskit parameter vectors.