Skip to content

Commit

Permalink
Expand calibrations on client side (#1271)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
notmgsk committed Nov 23, 2020
1 parent ee210c9 commit a3943a6
Show file tree
Hide file tree
Showing 5 changed files with 413 additions and 244 deletions.
Loading

0 comments on commit a3943a6

Please sign in to comment.