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

STORE instruction should accept constant value for source argument #425

Closed
appleby opened this issue Sep 18, 2019 · 0 comments · Fixed by #428
Closed

STORE instruction should accept constant value for source argument #425

appleby opened this issue Sep 18, 2019 · 0 comments · Fixed by #428

Comments

@appleby
Copy link
Contributor

appleby commented Sep 18, 2019

The Quil spec says the source argument to a STORE instruction can be an immediate int or real in addition to a memory reference, but quilc rejects it. For example:

$ echo "DECLARE rr REAL; DECLARE ri INTEGER; STORE rr ri 1.0" | ./quilc
! ! ! Error: At line 1: Expected an address, got :COMPLEX
$ echo "DECLARE ri INTEGER; STORE ri ri 1" | ./quilc
! ! ! Error: At line 1: Expected an address, got :INTEGER

There is a similar pyquil issue open here: rigetti/pyquil#815

And related PR discussion here and there.

And a tangentially-related issue regarding DEFCIRCUIT: #25

appleby added a commit that referenced this issue Sep 19, 2019
According to the Quil spec, STORE's second argument must be a
reference to an int, and it's third argument can be either a memory
reference or an immediate value.

Fixes #425
appleby added a commit that referenced this issue Sep 19, 2019
According to the Quil spec, STORE's second argument must be a
reference to an int, and its third argument can be either a memory
reference or an immediate value.

Fixes #425
appleby added a commit that referenced this issue Sep 19, 2019
According to the Quil spec, STORE's second argument must be a
reference to an int, and its third argument can be either a memory
reference or an immediate value.

Fixes #425
stylewarning pushed a commit that referenced this issue Sep 19, 2019
According to the Quil spec, STORE's second argument must be a
reference to an int, and its third argument can be either a memory
reference or an immediate value.

Fixes #425
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant