Skip to content
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

Native Quil to Executable Freezes #1583

Closed
2 tasks done
erichulburd opened this issue May 28, 2023 · 2 comments
Closed
2 tasks done

Native Quil to Executable Freezes #1583

erichulburd opened this issue May 28, 2023 · 2 comments
Labels
bug 🐛 An issue that needs fixing.

Comments

@erichulburd
Copy link
Contributor

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

Running qc.compiler.quil_to_native_quil hangs indefinitely. Ctrl + C does not abort the script. This same script works on pyQuil v3.

How to Reproduce

Here are some useful environment settings:

% poetry run python -c 'from pyquil import __version__; print(__version__)'
4.0.0rc12
% echo $QCS_SETTINGS_APPLICATIONS_PYQUIL_QUILC_URL

% echo $QCS_SETTINGS_APPLICATIONS_QUILC_URL

Quilc is confirmed running and the below code snippet runs to completion in pyQuil v3 in various environments.

Code Snippet

The following script reproduces this issue as originally encountered, but you can reproduce the issue with simpler Quil programs as well.

from pyquil.api import get_qc
from pyquil.quil import Program


quil = """
DECLARE params REAL[12]
RZ(params[0]) 0
RZ(params[1]) 1
RX(pi/2) 0
RX(pi/2) 1
RZ(params[2]) 0
RZ(params[3]) 1
RX(pi/2) 0
RX(pi/2) 1
RZ(params[4]) 0
RZ(params[5]) 1
CZ 0 1
RZ(params[6]) 0
RZ(params[7]) 1
RX(pi/2) 0
RX(pi/2) 1
RZ(params[8]) 0
RZ(params[9]) 1
RX(pi/2) 0
RX(pi/2) 1
RZ(params[10]) 0
RZ(params[11]) 1
DECLARE ro BIT[2]
MEASURE 0 ro[0]
MEASURE 1 ro[1]
"""

def main():
    qpu = get_qc('Aspen-M-3')
    program = Program(quil)
    qpu.compiler.native_quil_to_executable(program)
    

if __name__ == '__main__':
    main()

Error Output

There is no output. The script hangs indefinitely.

Environment Context

Environment 1

Operating System:

$ uname -a
Linux jupyter-***** 5.4.196-108.356.amzn2.x86_64 #1 SMP Thu May 26 12:49:47 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
$ python --version
Python 3.9.7

Quilc Version (quilc --version):

$ quilc --version
1.26.0 [cfd8748]

QVM Version (qvm --version):

$ qvm --version
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
1.17.2 [266c11e]

Environment 2

Operating System:

% uname -a
Darwin BK-LOSX-****** 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar  6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 arm64
% python --version
Python 3.10.1

Quilc version:

% docker run rigetti/quilc --version
1.26.0 [7aef642]

QVM version:

% docker run rigetti/qvm --version
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
1.17.2 [266c11e]
@erichulburd erichulburd added the bug 🐛 An issue that needs fixing. label May 28, 2023
@erichulburd
Copy link
Contributor Author

Separately, since this wraps the QCS Rust SDK, it'd be great to have a simple way (i.e. environment variables) to get the QCS Rust SDK to print out the Rust traces, so we can see when and where things are getting stuck.

@MarquessV
Copy link
Contributor

fixed by #1585

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue that needs fixing.
Projects
None yet
Development

No branches or pull requests

2 participants