Skip to content

Commit

Permalink
Using device wires analytic_probability method (#57)
Browse files Browse the repository at this point in the history
* Using device wires instead of ascending scalar indices

* Increasing the number of shots
  • Loading branch information
antalszava committed Aug 10, 2020
1 parent c1efdad commit 48c150a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pennylane_forest/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def analytic_probability(self, wires=None):
if self._state is None:
return None

wires = wires or range(self.num_wires)
wires = wires or self.wires
wires = Wires(wires)
prob = self.marginal_prob(np.abs(self._state) ** 2, wires)
return prob
4 changes: 2 additions & 2 deletions tests/test_qpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ def test_tensor_expval_operator_estimation(self, obs):
dev = qml.device(
"forest.qpu",
device=device,
shots=1000,
shots=2000,
load_qc=False,
parametric_compilation=False,
)
dev_1 = qml.device(
"forest.qpu",
device=device,
shots=1000,
shots=2000,
load_qc=False,
parametric_compilation=False,
)
Expand Down

0 comments on commit 48c150a

Please sign in to comment.