QUILC Man Page¶
quilc - an optimizing, architecture-independent Quil compiler
The Rigetti Quil compiler,
quilc, is an optimizing compiler for Quil. It
takes a general Quil program along with a qubit architecture, called an
ISA, and produces another Quil program that is executable on that
architecture. The compiler will also attempt to optimize the program by
producing fewer gates and shorter gate depths. The compiler may either
be run as a server which takes requests (as is used with PyQuil), or it
may be run as a batch program reading from standard input.
Server Mode runs the compiler as an HTTP server, taking simple POST requests with JSON payloads which are known to the companion library pyQuil.
- (Server Mode) Run the compiler in Server Mode. This starts an HTTP server.
-?, -h, --help
- Show the help message.
- Show the version.
- Print what the compiler is thinking. (Warning: It thinks a lot.)
- Compile for the qubit architecture defined by <string>, which can be either 8Q, 20Q, 16QMUX, or a path to a QPU description file.
- Prescribe that the input and output must be ProtoQuil, which is Quil that is comprised of gates and measurements, with no control flow.
- (Server Mode) Run quilc in server mode on port <port>.
- Print a calculated gate depth for the provided circuit as an appended Quil comment. (Requires -p.)
- Print a calculated multiqubit gate depth for the provided circuit as an appended Quil comment. (Requires -p. Ignores the blacklist and whitelist.)
- Print a calculated gate volume for the provided circuit as an appended Quil comment. (Requires -p.)
- Print a calculated estimated runtime for the provided circuit as an appended Quil comment. (Requires -p.)
- Print a calculated estimated compiled circuit fidelity for the provided circuit as an appended Quil comment. (Requires -p.)
- Print a list of unused qubits as an appended Quil comment. (Requires -p.)
- Print the number of SWAP gates incurred for topological reasons for the provided circuit as an appended Quil comment. (Requires -p.)
- When calculating statistics, ignore the gates present in the comma-separated list of names of <gate-list>.
- When calculating statistics, consider only the gates present in the comma-separated list of names of <gate-list>.
- (Server Mode) Limit the amount of time for a single request to approximately <limit-ms> milliseconds. By default, this value is 0, which indicates an unlimited amount of time is allowed.
- Disable pretty printing of numerical quantities (e.g., multiples of pi) in compiled output.
- Use gate ladders, instead of the SWAP gate, to implement long-ranged gates, when possible.
- Serialize the output of compilation as a JSON object.
- Include the logically parallelized schedule in JSON output. (Requires -p.)
- Print the matrix representation of a compiled ProtoQuil program. Additionally, verify that this matrix matches the matrix representation of the input program. (Requires -p. Note that this is a very expensive operation.)
- Perform program optimizations by assuming that the quantum state starts in the zero state.
quilc --isa "8Q" < file.quil
- Compile a Quil file (printing the result to stdout) for an eight qubit ring.
Copyright (c) 2018 Rigetti Computing