quilc
quilc copied to clipboard
Feature/expose options in rpc
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.
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)
@bramathon do the tests pass locally for you just fine?
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.
@bramathon I fixed the package naming issue on master. As such, I'll go ahead and merge this.
$ 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 ]