Download LIQUiD Users Manual
Transcript
C I R C U I T M O D E 6 Chapter Circuit Manipulation Optimization C ircuit mode has been touched on a few times earlier in this document. We will now go over the various options in detail and then move into optimizations and alternative simulation engines that can be used with circuits. Once an algorithm has been defined as a function, it may be converted to a Circuit by simply asking for a circuit compilation: let ket let circ = Ket(3) = Circuit.Compile teleport ket.Qubits Example 50: Compiling a Circuit A set of Qubits from a Ket vector must be provided so the Circuit has context of what qubits are needed and how they are used by the Gate functions (Operations). In this case we’ve taken the teleport function and converted it to a Circuit data structure. Elements of the Circuit data type include: Seq Sequence of Circuits Seq(Circuit list) represents an ordered list of Circuits to execute one after the other. Par Parallel set of Circuits Par(Circuit list) represents a parallel set of Circuits to execute at the same time. Optimizers generate this from Seq when there are no overlapping qubits touched between multiple operations (e.g., the Fold() command). Apply do a standard gate instructs the system to apply a Gate to a set of wires (wires = Qubit ids). Wires are mapped back to actual Qubits before the Gate is called. Apply(Gate,Wires) operation Ext extends the function of a Gate 50 Copyright © 2015 by Microsoft Corporation. All Rights Reserved.