question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

qc.run() on Aspen-7-28Q-A gives rpcq._utils.RPCError: 'q0_ro_rx/filter'

See original GitHub issue

Pre-Report Checklist

  • I am running the latest versions of pyQuil and the Forest SDK
  • I checked to make sure that this bug has not already been reported

Issue Description

The main error message I get is rpcq._utils.RPCError: ‘q0_ro_rx/filter’ after calling qc.run(exec) where qc is a QPU lattice and exec is a compiled binary executable.

How to Reproduce

Unfortunately the exact quil program is confidential data; the following steps were taken

  1. qc = get_qc('Aspen-7-28Q-A')
  2. non-parametric gates, native quil program compiled to BinaryExecutable without any issues. The program only uses 16 out of the 28 qubits on the reserved QPU-lattice but the lattice used is the smallest-yet-large-enough to support 16 available currently. (more exactly: upon inspection of the BinaryExecutable that was compiled, its ro_sources revealed the following: exec.ro_sources=[(36, 0), (35, 0), (17, 0), (10, 0), (14, 0), (15, 0), (13, 0), (25, 0), (24, 0), (23, 0), (16, 0), (1, 0), (37, 0), (22, 0), (12, 0), (11, 0)])
  3. qc.run(executable)

gives an error and results in

Error Output

qc.run(self.pyquil_executable)
  File "/home/forest/miniconda3/envs/qucotesting/lib/python3.6/site-packages/pyquil/api/_error_reporting.py", line 251, in wrapper
    val = func(*args, **kwargs)
  File "/home/forest/miniconda3/envs/qucotesting/lib/python3.6/site-packages/pyquil/api/_quantum_computer.py", line 137, in run
    return self.qam.run().wait().read_memory(region_name="ro")
  File "/home/forest/miniconda3/envs/qucotesting/lib/python3.6/site-packages/pyquil/api/_error_reporting.py", line 251, in wrapper
    val = func(*args, **kwargs)
  File "/home/forest/miniconda3/envs/qucotesting/lib/python3.6/site-packages/pyquil/api/_qpu.py", line 224, in run
    results = self._get_buffers(job_id)
  File "/home/forest/miniconda3/envs/qucotesting/lib/python3.6/site-packages/pyquil/api/_qpu.py", line 252, in _get_buffers
    buffers = self.client.call("get_buffers", job_id, wait=True)
  File "/home/forest/miniconda3/envs/qucotesting/lib/python3.6/site-packages/rpcq/_client.py", line 199, in call
    raise utils.RPCError(reply.error)
rpcq._utils.RPCError: 'q0_ro_rx/filter'

Environment Context

Operating System: CentOS (QMI at QCS)

Python Version (python -V): 3.6.10

Quilc Version (quilc --version): QMI updated to latest forest sdk 2.17.0

QVM Version (qvm --version): QMI updated to latest forest sdk 2.17.0

Python Environment Details (pip freeze or conda list):

(The pyquil.api._compiler.py was modified to increase the timeout of QPUCompiler beyond 10 seconds)

# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
antlr-python-runtime      4.7.2                 py36_1001    conda-forge
attrs                     19.3.0                     py_0  
bayesian-optimization     1.0.1                      py_0    conda-forge
blas                      2.14                   openblas    conda-forge
ca-certificates           2020.1.1                      0  
certifi                   2019.11.28               py36_0  
cffi                      1.13.2           py36h8022711_0    conda-forge
chardet                   3.0.4                 py36_1003  
coverage                  5.0              py36h7b6447c_0  
cryptography              2.8              py36h72c5cf5_1    conda-forge
cvxopt                    1.2.0            py36h75fe3a5_0  
cycler                    0.10.0                   py36_0  
dbus                      1.13.12              h746ee38_0  
decorator                 4.4.1                      py_0  
expat                     2.2.6                he6710b0_0  
fftw                      3.3.8                h7b6447c_3  
fontconfig                2.13.0               h9420a91_0  
freetype                  2.9.1                h8a8886c_1  
future                    0.18.2                   py36_0  
glib                      2.63.1               h5a9c865_0  
glpk                      4.65                 h3ceedfd_2  
gmp                       6.1.2                h6c8ec71_1  
gsl                       2.4                  h14c3975_4  
gst-plugins-base          1.14.0               hbbd80ab_1  
gstreamer                 1.14.0               hb453b48_1  
h5py                      2.8.0            py36h989c5e5_3  
hdf5                      1.10.2               hba1933b_1  
icu                       58.2                 h9c2bf20_1  
idna                      2.9                        py_1    conda-forge
immutables                0.6             py36h14c3975_1000    conda-forge
importlib_metadata        1.5.0                    py36_0  
jinja2                    2.11.1                   pypi_0    pypi
joblib                    0.14.1                     py_0  
jpeg                      9b                   h024ee3a_2  
kiwisolver                1.1.0            py36he6710b0_0  
ld_impl_linux-64          2.33.1               h53a641e_7  
libblas                   3.8.0               14_openblas    conda-forge
libcblas                  3.8.0               14_openblas    conda-forge
libedit                   3.1.20181209         hc058e9b_0  
libffi                    3.2.1                hd88cf55_4  
libgcc-ng                 9.1.0                hdf63c60_0  
libgfortran-ng            7.3.0                hdf63c60_5    conda-forge
liblapack                 3.8.0               14_openblas    conda-forge
liblapacke                3.8.0               14_openblas    conda-forge
libopenblas               0.3.7                h5ec1e0e_6    conda-forge
libpng                    1.6.37               hbc83047_0  
libsodium                 1.0.17               h516909a_0    conda-forge
libstdcxx-ng              9.1.0                hdf63c60_0  
libuuid                   1.0.3                h1bed415_2  
libxcb                    1.13                 h1bed415_1  
libxml2                   2.9.9                hea5a465_1  
markupsafe                1.1.1                    pypi_0    pypi
matplotlib                3.1.3                    py36_0  
matplotlib-base           3.1.3            py36hef1b27d_0  
metis                     5.1.0                hf484d3e_4  
more-itertools            8.2.0                      py_0  
msgpack-python            1.0.0            py36hc9558a2_0    conda-forge
ncurses                   6.1                  he6710b0_1  
networkx                  2.4                        py_0  
noisyopt                  0.2.2                    pypi_0    pypi
numpy                     1.18.1           py36h95a1406_0    conda-forge
openfermion               0.9              py36hd763080_1    psi4
openssl                   1.1.1d               h7b6447c_4  
packaging                 20.1                       py_0  
pandas                    1.0.1            py36h0573a6f_0  
pcre                      8.43                 he6710b0_0  
pip                       20.0.2                   py36_1  
pluggy                    0.13.1                   py36_0  
py                        1.8.1                      py_0  
py-bobyqa                 1.1.1                    pypi_0    pypi
pyaml                     19.4.1                     py_0  
pycparser                 2.19                       py_2    conda-forge
pyopenssl                 19.1.0                     py_1    conda-forge
pyparsing                 2.4.6                      py_0  
pyqt                      5.9.2            py36h05f1152_2  
pyquil                    2.17.0                     py_0    conda-forge
pysocks                   1.7.1                    py36_0  
pytest                    5.3.5                    py36_0  
pytest-cov                2.8.1                      py_0  
python                    3.6.10               h0371630_0  
python-dateutil           2.8.1                      py_0  
python-rapidjson          0.9.1            py36he1b5a44_0    conda-forge
pytz                      2019.3                     py_0  
pyyaml                    5.3              py36h7b6447c_0  
pyzmq                     18.1.1           py36h1768529_0    conda-forge
qt                        5.9.7                h5867ecd_1  
readline                  7.0                  h7b6447c_5  
requests                  2.23.0                   py36_0    conda-forge
rpcq                      3.0.0                      py_0    rigetti
rpy2                      3.2.6                    pypi_0    pypi
ruamel.yaml               0.16.6           py36h516909a_0    conda-forge
ruamel.yaml.clib          0.2.0            py36h516909a_0    conda-forge
scikit-learn              0.22.1           py36h22eb022_0  
scikit-optimize           0.7.1                      py_1    conda-forge
scikit-quant              0.5.0                    pypi_0    pypi
scipy                     1.4.1            py36habc2bb6_0  
setuptools                45.2.0                   py36_0  
simplegeneric             0.8.1                    pypi_0    pypi
sip                       4.19.8           py36hf484d3e_0  
six                       1.14.0                   py36_0  
sqcommon                  0.3                      pypi_0    pypi
sqimfil                   0.3.3                    pypi_0    pypi
sqlite                    3.31.1               h7b6447c_0  
sqsnobfit                 0.4.0                    pypi_0    pypi
suitesparse               5.2.0                h2ffa06c_0  
tbb                       2020.0               hfd86e86_0  
tk                        8.6.8                hbc83047_0  
tornado                   6.0.3            py36h7b6447c_3  
typing                    3.6.4                    py36_0  
tzlocal                   2.0.0                    pypi_0    pypi
urllib3                   1.25.7                   py36_0  
wcwidth                   0.1.8                      py_0  
wheel                     0.34.2                   py36_0  
xz                        5.2.4                h14c3975_4  
yaml                      0.1.7                had09818_2  
zeromq                    4.3.2                he1b5a44_2    conda-forge
zipp                      2.2.0                      py_0  
zlib                      1.2.11               h7b6447c_3 

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
braised-babbagecommented, Feb 24, 2020

In some places, RPCError is sort of a default wrapper around some underlying error message. The likely culprit here is that q0_ro_rx/filter is a missing key in a dictionary, and the default string reprepresentation of a KeyError is the error itself e.g.

In [1]: try:
   ...:     {}['q0_ro_rx/filter']
   ...: except Exception as e:
   ...:     print(e)
   ...:
'q0_ro_rx/filter'

@appleby correctly notes that this is unusual to see here, as the program does not involve readout on qubit 0.

@vincentelfving would you be willing to share the source of the Quil program which produced this?

1reaction
applebycommented, Feb 24, 2020

@vincentelfving thanks for the update.

Indeed, that error is most likely coming from the remote QPU endpoint, not pyquil. The code that likely produces the error is not open sourced, so it will be difficult for you to debug.

I tried search for the error myself, but the error message is sufficiently cryptic that it’s hard to track down exactly where it might be coming from. It’s certainly possible that it is related to msgpack 1.0 changes / incompatibility, but that is only a guess.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found