quilc icon indicating copy to clipboard operation
quilc copied to clipboard

Feature/expose options in rpc

Open bramathon opened this issue 2 years ago • 3 comments

Adds four options to the RPC entry-point.

  • enable-approximate-compilation
  • compressor-passes
  • rewriting-peephole-size
  • global-queue-tolerance-threshold

The options are modeled after the implementation of state-aware, setting the corresponding global variables using a let statement in process-program.

In addition, anonymous gate definitions are now printed with the program.

bramathon avatar Aug 08 '22 13:08 bramathon

i'm accepting these changes with the proviso that they're "internal" options and may change in the future (though there are no plans to)

stylewarning avatar Aug 11 '22 21:08 stylewarning

@bramathon do the tests pass locally for you just fine?

stylewarning avatar Aug 11 '22 21:08 stylewarning

Runner says:

; caught ERROR:
;   READ error during COMPILE-FILE:
;   
;     Package QUIL does not exist.
;   
;       Line: 5, Column: 46, File-Position: 184
;   
;       Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /home/runner/work/quilc/quilc/app/tests/utils.lisp" {1007F1B223}>

Looks like we need to add a package-local nickname (#:quil #:cl-quil) to QUILC-TESTS package, or change quil: to cl-quil: on qualified symbols.

stylewarning avatar Aug 11 '22 21:08 stylewarning

@bramathon I fixed the package naming issue on master. As such, I'll go ahead and merge this.

stylewarning avatar Sep 07 '22 01:09 stylewarning

$ make test-quilc
[... bunch of compiler output ...]
QUILC-TESTS (Suite)
  TEST-FAITHFULNESS
    Testing file CCNOTs
    Testing file CNOT-partial-rewiring
    Testing file johannes
    Testing file some-CZs
..........................................................................[ OK ]
  TEST-EASY-VERSION-CALL..................................................[ OK ]
  TEST-QUIL-TO-NATIVE-QUIL-ENDPOINT.......................................[ OK ]
  TEST-QUIL-TO-NATIVE-QUIL-OPTIONS........................................[ OK ]
  TEST-QUIL-TO-NATIVE-QUIL-PROTOQUIL-ENDPOINT.............................[ OK ]
  TEST-QUIL-TO-NATIVE-QUIL-ENDPOINT-OVERRIDES-SERVER......................[ OK ]
  TEST-NATIVE-QUIL-TO-BINARY-ENDPOINT.....................................[ OK ]
  TEST-GENERATE-RB-SEQUENCE-ENDPOINT......................................[ OK ]
  TEST-CONJUGATE-PAULI-BY-CLIFFORD-ENDPOINT...............................[ OK ]
  TEST-REWRITE-ARITHMETIC-ENDPOINT........................................[ OK ]
  TEST-QUIL-TO-NATIVE-QUIL-ON-NONTRIVIAL-FEATURES.........................[ OK ]
  TEST-QUIL-SAFELY-RESOLVE................................................[ OK ]
  TEST-UPDATE-AVAILABLE...................................................[ OK ]
  TEST-PROCESS-PROGRAM....................................................[ OK ]
  TEST-SPECIAL-BINDINGS-LET*..............................................[ OK ]
  TEST-STRIP-FINAL-HALT-RESPECTING-REWIRINGS..............................[ OK ]

stylewarning avatar Sep 07 '22 01:09 stylewarning