Circuit Methods

Liquid Quantum Simulator

Circuit Methods

The Circuit type exposes the following members.

Methods
  Name Description
Public method Static member Compile
Compiles a function implemented as a sequence of gate function calls into a Circuit.
Public method Dump
Dumps this circuit recursively to the console and/or log.
Public method Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public method FindIds
Find Ids below this point and the time needed to execute the circuit (internal)
Public method Fold
Rewrites this circuit by identifying opportunities for parallelism and turning Seq elements into Par elements where possible. This makes for a better rendering.
Public method GateCount
Gets the count of gates in circuit. Note that pure label gates -- that is, gates of type String -- are never counted.
Public method GetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method Grow
Creates an optimized "grown" version of this Circuit. The type and limits of the conversion are specified in the grow parameter.
Public method GrowGates
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 method GrowSingle
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 method RemoveRedund
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 method Render
Renders this circuit to a file.
Public method RenderHT
Renders a circuit to both svg, for HTML, and tikz, for TeX.
Public method Reverse
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 method Run
Runs this Circuit. The state of the Ket containing the passed-in qubits will be modified.
Public method ToString
Returns a string representing the current circuit element.
(Overrides ObjectToString.)
Public method Wires
Gets the list of wires (qubit IDs) touched by this circuit.
Top
See Also