-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QVMEror #1515
Labels
bug 🐛
An issue that needs fixing.
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pre-Report Checklist
Issue Description
The cell executed well as at 3 weeks but stopped last week.
Thanks for helping us improve pyQuil! 🙂
How to Reproduce
If useful, provide a numbered list of the steps that result in the error.
Otherwise, just fill out the "Code Snippet" and "Error Output" sections below.
Code Snippet
qvm.expectation(ansatz(theta), [sX(qubits[0])], None)
Error Output
QVMError Traceback (most recent call last)
Input In [37], in <cell line: 10>()
5 k = qvm.expectation(ansatz(alpha), hamiltonian, None)
6 return abs(k)
---> 10 expval_statevec([3.92691588, 1.50477941, 2.71497889, 4.45019336, 2.79647542, 5.49778764])
Input In [37], in expval_statevec(alpha)
3 def expval_statevec(alpha):
4 # vec = qvm.wavefunction(ansatz(alpha))
----> 5 k = qvm.expectation(ansatz(alpha), hamiltonian, None)
6 return abs(k)
File ~/Library/Python/3.10/lib/python/site-packages/pyquil/api/_wavefunction_simulator.py:148, in WavefunctionSimulator.expectation(self, prep_prog, pauli_terms, memory_map)
145 if memory_map is not None:
146 prep_prog = self.augment_program_with_memory_values(prep_prog, memory_map)
--> 148 bare_results = self._expectation(prep_prog, progs)
149 results = coeffs * bare_results
150 if is_pauli_sum:
File ~/Library/Python/3.10/lib/python/site-packages/pyquil/api/_wavefunction_simulator.py:167, in WavefunctionSimulator._expectation(self, prep_prog, operator_programs)
156 warnings.warn(
157 "You have provided a Program rather than a list of Programs. The results "
158 "from expectation will be line-wise expectation values of the "
159 "operator_programs.",
160 SyntaxWarning,
161 )
163 request = self._expectation_request(
164 prep_prog=prep_prog,
165 operator_programs=operator_programs,
166 )
--> 167 response = self._qvm_client.measure_expectation(request)
168 return np.asarray(response.expectations)
File ~/Library/Python/3.10/lib/python/site-packages/pyquil/api/_qvm_client.py:235, in QVMClient.measure_expectation(self, request)
232 if request.seed is not None:
233 payload["rng-seed"] = request.seed
--> 235 return MeasureExpectationResponse(expectations=cast(List[float], self._post_json(payload).json()))
File ~/Library/Python/3.10/lib/python/site-packages/pyquil/api/_qvm_client.py:261, in QVMClient._post_json(self, json)
259 response = http.post("/", json=json)
260 if response.status_code >= 400:
--> 261 raise self._parse_error(response)
262 return response
QVMError: The value
356811923176489970264571492362373784095686656
is not of type
(OR (MOD 4611686018427387901) CONS NULL)
when binding SB-VM::DIMENSIONS
The QVM returned the above error. This could be due to a bug in the server or a
bug in your code. If you suspect this to be a bug in pyQuil or Rigetti Forest,
then please describe the problem in a GitHub issue at:
https://github.com/rigetti/pyquil/issues
Environment Context
Operating System:
Python Version (
python -V
): Python 3.10.5Quilc Version (
quilc --version
): 1.23.0 [e6c0939]QVM Version (
qvm --version
): 1.17.1 [cf3f91f]Python Environment Details (
pip freeze
orconda list
):The text was updated successfully, but these errors were encountered: