CQCL / pytket-pennylane

Apache License 2.0
4 stars 1 forks source link

Update to pennylane 0.28 #35

Closed cqc-alec closed 1 year ago

erinaldiq commented 1 year ago

This would be a welcomed addition. In fact, with pennylane-0.27.0 I can not use the qiskit devices (like qiskit.aer or qiskit.ibm due to breaking changes in the pennylane.

A circuit like this

def circuit(inputs, weights_ent):
    for i in range(n_blocks):
        qml.AngleEmbedding(inputs, wires=range(n_qubits), rotation="X")
        qml.BasicEntanglerLayers(
            weights_ent[i], wires=range(n_qubits), rotation=qml.RY
        )
    return [qml.expval(qml.PauliZ(wires=i)) for i in range(n_qubits)]

would not run because of missing return_type in the X rotation gates. See screenshot for the error, which disappears in pennylane-0.28.0 (See Breaking Changes in the release notes )

Screenshot 2023-01-12 at 13 23 12