Open mhodson-rigetti opened 2 years ago
Note: While I'm not Lisp fluent, I did a Git diff between 1.23.0 and 1.25.0. The error emits from initial-rewiring.lisp
which was not modified between 1.23.0 and 1.25.0. However, some fixes for initial rewiring pragmas were made, including something that looks like a "slot bound" check in rpc-server.lisp
and calls prog-initial-rewiring
. The root cause may be lurking in here?
@mhodson-rigetti I'm not at a computer at the moment, but does adding this at the top of your Quil program change anything?
PRAGMA INITIAL_REWIRING "PARTIAL"
This is the commit but @notmgsk that @mhodson-rigetti is likely referring to: https://github.com/quil-lang/quilc/commit/acf9b16f4a4d7ac14844dcfd85ec28543d9f0d2f
@mhodson-rigetti I'm not at a computer at the moment, but does adding this at the top of your Quil program change anything?
PRAGMA INITIAL_REWIRING "PARTIAL"
@stylewarning - No, adding the pragma doesn't avoid the problem.
Thanks for the report, @mhodson-rigetti. I'll take a look today... the obvious/easy solution is to "compress" the logical qubits prior to compilation so that only physical qubits are used. But there might be cases where that breaks / isn't wanted. Also interesting that 1.23.0 doesn't fail so I'll have to diagnose that. Again thanks for the info!
If you come across some more pathological examples, could you attach them here? Cheers
The following code snippet generates a compilation error on
quilc
1.25.0 and 1.25.1 (as pulled from DockerHub) andpyquil
3.0.0:The error is:
This compilation works correctly on
quilc
1.23.0 and maps to available qubit indices of the Aspen-9 architecture as expected.I have observed other similar examples failing, though sometimes re-running them works. This case appears to fail reliably. The root cause may include a stateful behavior in the server.