Hi @josh
Below are the details and also a sample code snippet.
Please take a look. If upgrading fixes the error please let me know.
Many thanks,
Avinash
PennyLane Version: 0.6.0
PennyLane-Forest Version: 0.6.0
$ qvm -S
and $ quilc -S
commands executed successfully in two terminals.
Sample Code:
import pennylane as qml
from pennylane.templates.embeddings import AmplitudeEmbedding
from pennylane import numpy as np
dev = qml.device("forest.qvm", device="{}q-pyqvm".format(11))
vals = np.random.randint(10, size=(1,2048))
f = vals.tolist()
@qml.qnode(dev)
def circuit(features=None):
AmplitudeEmbedding(features, wires = [0,1,2,3,4,5,6,7,8,9,10], pad=True, normalize=True)
return qml.expval(qml.PauliZ(0))
result = circuit(features=f)
print(result)
Error Trace:
/usr/local/lib/python3.6/dist-packages/pyquil/numpy_simulator.py:29: FutureWarning: The code in pyquil.numpy_simulator has been moved to pyquil.simulation, please update your import statements.
FutureWarning,
Traceback (most recent call last):
File "sample_forest_sdk.py", line 42, in <module>
result = circuit(features=f)
File "/home/avinash/.local/lib/python3.6/site-packages/pennylane/decorator.py", line 64, in wrapper
return qnode(*args, **kwargs)
File "/home/avinash/.local/lib/python3.6/site-packages/pennylane/qnode.py", line 510, in __call__
return self.evaluate(args, **kwargs) # args as one tuple
File "/home/avinash/.local/lib/python3.6/site-packages/autograd/tracer.py", line 48, in f_wrapped
return f_raw(*args, **kwargs)
File "/home/avinash/.local/lib/python3.6/site-packages/pennylane/qnode.py", line 583, in evaluate
ret = self.device.execute(self.circuit.operations, self.circuit.observables, self.variable_deps)
File "/home/avinash/.local/lib/python3.6/site-packages/pennylane/_device.py", line 155, in execute
self.check_validity(queue, observables)
File "/home/avinash/.local/lib/python3.6/site-packages/pennylane/_device.py", line 328, in check_validity
raise DeviceError("Gate {} not supported on device {}".format(o.name, self.short_name))
pennylane._device.DeviceError: Gate QubitStateVector not supported on device forest.qvm