You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "dotest_pyqvm.py", line 9, in <module>
qvm.execute(p)
File "/opt/miniconda3/envs/rigetti/lib/python3.7/site-packages/pyquil/pyqvm.py", line 502, in execute
return self._execute_program()
File "/opt/miniconda3/envs/rigetti/lib/python3.7/site-packages/pyquil/pyqvm.py", line 486, in _execute_program
halted = self.transition()
File "/opt/miniconda3/envs/rigetti/lib/python3.7/site-packages/pyquil/pyqvm.py", line 323, in transition
self.wf_simulator.do_gate(gate=instruction)
File "/opt/miniconda3/envs/rigetti/lib/python3.7/site-packages/pyquil/simulation/_numpy.py", line 266, in do_gate
gate_matrix, qubit_inds = _get_gate_tensor_and_qubits(gate=gate)
File "/opt/miniconda3/envs/rigetti/lib/python3.7/site-packages/pyquil/simulation/_numpy.py", line 160, in _get_gate_tensor_and_qubits
tensor = np.reshape(matrix, (2,) * len(qubit_inds) * 2)
File "<__array_function__ internals>", line 6, in reshape
File "/opt/miniconda3/envs/rigetti/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 299, in reshape
return _wrapfunc(a, 'reshape', newshape, order=order)
File "/opt/miniconda3/envs/rigetti/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 58, in _wrapfunc
return bound(*args, **kwds)
ValueError: cannot reshape array of size 4 into shape (2,2,2,2)
Environment Context
Operating System: MacOS Catalina 10.15.4
Python Version (python -V): Python 3.7.8
Quilc Version (quilc --version): 1.22.0 [cb8ba42]
QVM Version (qvm --version): 1.17.1 [cf3f91f]
Python Environment Details (pip freeze or conda list):
Pre-Report Checklist
Issue Description
I might be missing something, but when I try to implement a controlled H gate on a PyQVM and execute it, the system crashes.
Code Snippet
Error Output
Environment Context
Operating System: MacOS Catalina 10.15.4
Python Version (
python -V
): Python 3.7.8Quilc Version (
quilc --version
): 1.22.0 [cb8ba42]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: