-
Notifications
You must be signed in to change notification settings - Fork 342
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
Quilt Extensions #1257
Quilt Extensions #1257
Conversation
Since this is quite a large PR, I have tried to categorize the changes below. Use this as a reference (but be wary, it's possible I missed something). DocsQuilt documentation has been added to the PyQuil docs. TODO: proofread docs See:
ParserThe parser has been extended to support Quilt keywords and constructs Changes to vanilla PyQuil:
See:
Syntax Objects And ManipulationThe Quil AST has been extended to include Quilt syntax objects. Most Changes to vanilla PyQuil:
See:
Arithmetic RewritingParametric compilation, even on vanilla PyQuil, requires some Changes to vanilla PyQuil:
TODO: check just how badly things could break due to not having backwards compatibility in See:
Memory Management and ReadoutQuil only supports one type of readout: a Changes to vanilla PyQuil:
TODO: check that TODO: deprecate See:
Other QAM, QPU, Compilation UpdatesChanges to vanilla PyQuil:
See:
As mentioned above, the new TODO: Explicitly handle Quil vs Quilt cases in appropriate RPCQ calls, Changes to vanilla PyQuil:
See:
|
29e6506
to
51b9e52
Compare
@kilimanjaro Over in the Some questions:
|
|
I went through this and think it looks fine. As I wrote it, wasn't sure exactly what to do with I also noticed that this comment is hanging Line 1061 in 500dd63
Yes, with the only bit of fiddling being related to the meaning of the units involved (e.g. in Quilt phases are radians, in RPCQ phases are in revolutions aka 'units of tau').
The issue is as you mentioned. I'm not happy about having the code duplication of those fields across all the individual waveform classes, but the alternative seemed to be jettisoning the use of dataclasses, which would require its own form of boilerplate.
|
Coolbeans. Are you happy with me merging that branch into this one? |
Ah, that actually does something: it evaluates arithmetic expressions. So what is syntactically as |
Yes, please do so. |
|
* raw-capture fixup * fixup handling of ro sources * Use quillang submodule * Pin quillang submodule to where quil.g4 was merged * Add Makefile target to generate parser Add symlink for Quil.g4 into the quillang submodule * fix * Add quil grammar submodule makefile target * Update parser readme Co-authored-by: Erik Davis <erik@rigetti.com>
- recursively expand defcals - allow formal qubits in top-level gates
* Expand calibrations on the client side This introduces a few things: * QPUCompiler#_calibrations is a calibrations cache * QPUCompiler#get_calibrations (formerly QPUCompiler#get_quilt_calibrations) makes an API call to pull the latest calibrations from the translation service. It cares not for any cache. * QPUCompiler#refresh_calibrations grabs the latest calibrations and caches them * QPUCompiler#calibrations is a property that provides access to the cache if it exists, or populates the cache if it doesn't exist. * QPUCompiler#expand_calibrations takes a program, and returns a program where all calibrations are expanded. Calibrations defined in the input program take preference (hopefully) over those in the aforementioned cache. * Store the calibrations Program rather than calibrations list get_quilt_calibrations() returns more than just the calibrations - it returns a bunch of frame defintions and waveform definitions. Bydoing self._calibrations = get_quilt_calibrations().calibrations we are throwing away the frames/waveforms. * fix style * refactor calibrations -> calibration_program and similar refactors * update notebooks * format
Rather than try to do some complicated/error-prone cycle detection, just let it hit Python's recursive limit. This means that either: (a) The calibrations were so deeply nested (but not cyclical); or (b) The calibrations were cyclical. The likelihood of (a) is so small that it should probably be zero, and so this method of detection ought to be sufficient.
Some are missed, e.g. RX(%theta) 0: RX(%theta + 1) 0
Version 20.11.1 introduced B015 "pointless comparison" which breaks some of our stuff.
Need to investigate why this is complaining about Travis. Perhaps it's looking for typical config files, finds .travis-ci.yml, and assumes we're trying to run there rather than gitlab?
Description
Tentative PR for adding Quilt features. Mostly setting this up to start discussions around the full set (breaking & backwards-compatible) of changes.
Checklist
The primary purpose is:
In addition, we have the usual items:
flake8
conventions.