Click or drag to resize
Circuit Methods

The Circuit type exposes the following members.

Methods
  NameDescription
Public methodStatic memberCompile
Compiles a function implemented as a sequence of gate function calls into a Circuit.
Public methodDump
Dumps this circuit recursively to the console and/or log.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodFindIds
Find Ids below this point and the time needed to execute the circuit (internal)
Public methodFold
Rewrites this circuit by identifying opportunities for parallelism and turning Seq elements into Par elements where possible. This makes for a better rendering.
Public methodGateCount
Gets the count of gates in circuit. Note that pure label gates -- that is, gates of type String -- are never counted.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGrow
Creates an optimized "grown" version of this Circuit. The type and limits of the conversion are specified in the grow parameter.
Public methodGrowGates
Creates an equivalent circuit to this circuit by aggregating existing unitary gates into larger unitary gates. The new circuit will execute faster because it has fewer matrix applications required.
Public methodGrowSingle
Converts this circuit into a single unitary gate, implemented by a single matrix. This allows maximum optimization of circuit execution.

This circuit must be completely unitary to be converted into a single matrix. If it is not, an exception will be raised by this method.

Public methodRemoveRedund
Creates a new circuit logically equivalent to this circuit, but with redundant gates removed. For instance, if this routine found a sequence of two X gates in succession on the same qubit, it would remove both of them from the result.
Public methodRender
Renders this circuit to a file.
Public methodRenderHT
Renders a circuit to both svg, for HTML, and tikz, for TeX.
Public methodReverse
Reverses this circuit, which must contain only unitary gates. In addition, bottom-level gates are replaced by their adjoints. This method will raise an exception if this circuit contains a non-unitary gate.
Public methodRun
Runs this Circuit. The state of the Ket containing the passed-in qubits will be modified.
Public methodToString
Returns a string representing the current circuit element.
(Overrides ObjectToString.)
Public methodWires
Gets the list of wires (qubit IDs) touched by this circuit.
Top
See Also