Skip to content

Commit

Permalink
Wavefunction API updated now in fake_QVM for test
Browse files Browse the repository at this point in the history
fake_qvm constructed for testing now returns a tuple when wavefunction is
called.
  • Loading branch information
ncrubin committed Jan 15, 2017
1 parent 9c52354 commit 41cb33e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grove/pyvqe/tests/test_algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def rotation_wavefunction(phi):
minimizer.return_value = fake_result

fake_qvm = Mock(spec=['wavefunction', 'expectation', 'run'])
fake_qvm.wavefunction.return_value = rotation_wavefunction(-2.5)
fake_qvm.wavefunction.return_value = (rotation_wavefunction(-2.5), [0])
fake_qvm.expectation.return_value = [0.28366219]
# for testing expectation
fake_qvm.run.return_value = [[0], [0]]
Expand Down

0 comments on commit 41cb33e

Please sign in to comment.