Skip to content

Commit

Permalink
Fixes #32 (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
josh146 committed Dec 24, 2019
1 parent 47ce525 commit 75c0dcb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pennylane_forest/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ class ForestDevice(Device):
author = "Josh Izaac"

_operation_map = pyquil_operation_map
_capabilities = {"model": "qubit"}

def __init__(self, wires, shots=1000, analytic=False, **kwargs):
super().__init__(wires, shots)
Expand Down Expand Up @@ -225,7 +226,7 @@ def program(self):

def apply(self, operation, wires, par):
# pylint: disable=attribute-defined-outside-init
self.prog += self._operation_map[operation](*par, *wires)
self.prog += self._operation_map[operation](*par, *[int(w) for w in wires])

# keep track of the active wires. This is required, as the
# pyQuil wavefunction simulator creates qubits dynamically.
Expand Down

0 comments on commit 75c0dcb

Please sign in to comment.