Quil (instruction set architecture)

Quil is a quantum instruction set architecture that first introduced a shared quantum/classical memory model. It was introduced by Robert Smith, Michael Curtis, and William Zeng in A Practical Quantum Instruction Set Architecture.[1] Many quantum algorithms (including quantum teleportation, quantum error correction, simulation,[2][3] and optimization algorithms[4]) require a shared memory architecture. Quil is being developed for the superconducting quantum processors developed by Rigetti Computing through the Forest quantum programming API.[5][6] A Python library called `pyQuil` was introduced to develop Quil programs with higher level constructs. A Quil backend is also supported by other quantum programming environments.[7][8]

## Contents

* 1 Underlying quantum abstract machine
* 2 Features
* 3 Rigetti QVM
* 4 Example
* 5 References
* 6 External links

## Underlying quantum abstract machine

In the paper presented by Smith, Curtis and Zeng, Quil specifies the instruction set for a Quantum Abstract Machine (QAM,) akin to a Turing machine, yet more practical for accomplishing "real-world" tasks.[1] The state of the QAM can be represented as a 6-tuple (|Ψ⟩,C,G,G′,P,κ) where:

* |Ψ⟩ is the (quantum) state of a fixed but arbitrary number of qubits Nq indexed using a 0-based indexing.
* C is a classical memory of a number Nc of classical bits indexed using a 0-based indexing.
* G a fixed but arbitrary list of static gates (quantum gates that do not depend on parameters, like the Hadamard gate.)
* G′ a fixed but arbitrary list of parametric gates (gates that depend on a number of complex parameters like the phase shift gate that requires an angle parameter to be completely defined.)
* P a sequence of Quil instructions to be executed, representing the program. The length of P is denoted by |P|.
* κ an integer program counter pointing to the next instruction to be executed. κ always starts at 0 (pointing to the 0th instruction) and ends at |P| indicating program halting (note that the last instruction has the index |P|−1.) The program counter is incremented after every instruction, except for special control flow instructions (conditional and unconditional jumps, and the special `HALT` instruction that halts the program by setting κ to |P|.

The semantics of the QAM are defined using tensor products of Hilbert spaces and the linear maps between them.[1]

## Features

Quil has support for defining possibly parametrized gates in matrix form (the language does not include a way to verify that the matrices are unitary, which is a necessary condition for the physical realizability of the defined gate) and their application on qubits. The language also supports macro-like definitions of possibly parametrized quantum circuits and their expansion, qubit measurement and recording of the outcome in classical memory, synchronization with classical computers with the `WAIT` instruction which pauses the execution of a Quil program until a classical program has ended its execution, conditional and unconditional branching, pragma support, as well as inclusion of files for use as libraries (a standard set of gates is provided as one of the libraries.)

## Rigetti QVM

Rigetti Computing developed a Quantum Virtual Machine in Common Lisp that simulates the defined Quantum Abstract Machine on a classical computer and is capable of the parsing and execution of Quil programs with possibly remote execution via HTTP.[9]

## Example

The following example demonstrates the classical control flow needed to do quantum teleportation of the qubit in register 2 to register 1:[10][11]

# Declare classical memory
DECLARE ro BIT[2]
# Create Bell Pair
H 0
CNOT 0 1
# Teleport
CNOT 2 0
H 2
MEASURE 2 ro[0]
MEASURE 0 ro[1]
# Classically communicate measurements
JUMP-UNLESS @SKIP ro[1]
X 1
LABEL @SKIP
JUMP-UNLESS @END ro[0]
Z 1
LABEL @END

Examples of the implementations of the quantum fourier transform and the variational quantum Eigensolver are given in the paper.

## References

1. ↑ 1.0 1.1 1.2 Smith, Robert S.; Curtis, Michael J.; Zeng, William J. (2016-08-10). "A Practical Quantum Instruction Set Architecture". arXiv:1608.03355 [quant-ph].
2. ↑ McClean, Jarrod R.; Romero, Jonathan; Babbush, Ryan; Aspuru-Guzik, Alán (2016-02-04). "The theory of variational hybrid quantum-classical algorithms". New Journal of Physics 18 (2): 023023. doi:10.1088/1367-2630/18/2/023023. ISSN 1367-2630. Bibcode: 2016NJPh...18b3023M.
3. ↑ Rubin, Nicholas C. (2016-10-21). "A Hybrid Classical/Quantum Approach for Large-Scale Studies of Quantum Systems with Density Matrix Embedding Theory". arXiv:1610.06910 [quant-ph].
4. ↑ Farhi, Edward; Goldstone, Jeffrey; Gutmann, Sam (2014-11-14). "A Quantum Approximate Optimization Algorithm". arXiv:1411.4028 [quant-ph].
5. ↑ "Rigetti Launches Full-Stack Quantum Computing Service and Quantum IC Fab" (in en). 26 June 2017. https://spectrum.ieee.org/tech-talk/computing/software/rigetti-launches-fullstack-quantum-computing-service-and-quantum-ic-fab.
6. ↑ "Rigetti Quietly Releases Beta of Forest Platform for Quantum Programming in the Cloud | Quantum Computing Report" (in en-US). 8 March 2017. https://quantumcomputingreport.com/news/rigetti-quietly-releases-beta-of-forest-platform-for-quantum-programming-in-the-cloud/.
7. ↑ "XACC Rigetti Accelerator". https://ornl-qci.github.io/xacc/accelerators/rigetti.
8. ↑ Doiron, Nick (2017-03-07), jsquil: Quantum computer instructions for JavaScript developers, https://github.com/mapmeld/jsquil, retrieved 2017-07-06
9. ↑ The @rigetti high-performance quantum virtual machine.: rigetti/qvm, Rigetti Computing, 2019-04-26, https://github.com/rigetti/qvm, retrieved 2019-04-28
10. ↑ Nielsen, Michael A.; Chuang, Isaac L. (2000). Quantum Computation and Quantum Information. Cambridge University Press. p. 27. ISBN 978-0-521-63503-5.
11. ↑ Computing, Rigetti (28 May 2019). "pyQuil Documentation". https://media.readthedocs.org/pdf/pyquil/latest/pyquil.pdf.

## External links

* on GitHub GitHub repository

* v
* t
* e

Quantum information science

General|

* Quantum computing
* Qubit
* physical vs. logical
* DiVincenzo's criteria
* Quantum information
* Quantum programming
* Quantum processors
* Cloud-based quantum computing
* Timeline of quantum computing

Theorems|

* Bell's theorem
* Gleason's theorem
* Gottesman–Knill theorem
* Holevo's theorem
* Margolus–Levitin theorem
* No-broadcast theorem
* No-cloning theorem
* No-communication theorem
* No-deleting theorem
* No-hiding theorem
* No-teleportation theorem
* PBR theorem
* Quantum threshold theorem

Quantum
communication|

* Quantum capacity
* Classical capacity
* Entanglement-assisted classical capacity
* Quantum channel
* Quantum network
* Quantum cryptography
* Quantum key distribution
* BB84
* SARG04
* Three-stage quantum cryptography protocol
* Quantum teleportation
* Superdense coding
* LOCC
* Entanglement distillation

Quantum algorithms|

* Universal quantum simulator
* Deutsch–Jozsa algorithm
* Grover's algorithm
* Quantum Fourier transform
* Shor's algorithm
* Simon's problem
* Quantum phase estimation algorithm
* Quantum counting algorithm
* Quantum annealing
* Quantum algorithm for linear systems of equations
* Amplitude amplification

Quantum
complexity theory|

* Quantum Turing machine
* EQP
* BQP
* QMA
* PostBQP
* QIP

Quantum
computing models|

* Quantum circuit
* Quantum logic gate
* One-way quantum computer
* cluster state
* Adiabatic quantum computation
* Topological quantum computer

Quantum
error correction|

* Stabilizer codes
* Entanglement-Assisted Quantum Error Correction
* Shor code
* Steane code
* CSS code
* Quantum convolutional codes
* Toric code

Physical
implementations|

| Quantum optics|

* Cavity QED
* Circuit QED
* Linear optical quantum computing
* KLM protocol
* Boson sampling

|

Ultracold atoms|

* Trapped ion quantum computer
* Optical lattice

Spin-based|

* Nuclear magnetic resonance QC
* Kane QC
* Loss–DiVincenzo QC
* Nitrogen-vacancy center

Superconducting
quantum computing|

* Charge qubit
* Flux qubit
* Phase qubit
* Transmon

Software|

* libquantum
* OpenQASM
* Q#
* Qiskit
* IBM Q Experience

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Quil (instruction set architecture). Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Quil_(instruction_set_architecture)&oldid=207371"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template