Gate.Build Method

Liquid Quantum Simulator

GateBuild Method
Gets the definition of a gate, using the cache. If the gate is already in the cache, the cached definition is returned. Otherwise, a new gate will be created, added to the cache, and returned.

Namespace: Microsoft.Research.Liquid
Assembly: Liquid1 (in Liquid1.dll) Version: 1.0.5981.24943 (1.0.*)
Syntax
F#
static member Build : 
        key : string * 
        gen : FSharpFunc<Unit, Gate> -> Gate 

Parameters

key
Type: SystemString
The uniqur key to use to identify this gate in the cache. This may be more than just the gate name; for instance, for a rotation gate, the cache key must include the rotation angle as well as just "Rz". If the key is null or "", the cache will be bypassed.
gen
Type: Microsoft.FSharp.CoreFSharpFuncUnit, Gate
A function that may be used to create a definition for the gate if it is not already in the cache.

Return Value

Type: Gate
The gate associated with the provided key
See Also