ForwarderEngine
Extends:
A ForwarderEngine is a trivial engine which forwards all commands to the next engine.
It is mainly used as a substitute for the MainEngine at lower levels such that meta operations still work (e.g., with Compute).
Constructor Summary
| Public Constructor | ||
| public | 
       constructor(engine: BasicEngine, cmdModFunc: function)  | 
    |
Member Summary
| Public Members | ||
| public | 
       cmdModFunc: *  | 
    |
| public | 
       main: *  | 
    |
| public | 
       next: *  | 
    |
Method Summary
| Public Methods | ||
| public | 
      
       internal usaged for deallocate qubits after   | 
    |
| public | 
       receive(commandList: *)  | 
    |
Inherited Summary
| From class BasicEngine | ||
| public | 
      
       | 
    |
| public | 
       allocateQubit(dirty: boolean): Qureg Return a new qubit as a list containing 1 qubit object (quantum register of size 1).  | 
    |
| public | 
       allocateQureg(n: number): Qureg Allocate n qubits and return them as a quantum register, which is a list of qubit objects.  | 
    |
| public | 
       deallocateQubit(qubit: BasicQubit) Deallocate a qubit (and sends the deallocation command down the pipeline).  | 
    |
| public | 
       isAvailable(cmd: Command): boolean Default implementation of isAvailable: Ask the next engine whether a command is available, i.e., whether it can be executed by the next engine(s).  | 
    |
| public | 
       isMetaTagSupported(metaTag: function): boolean Check if there is a compiler engine handling the meta tag  | 
    |
| public | 
       receive()  | 
    |
| public | 
      
       Forward the list of commands to the next engine in the pipeline.  | 
    |
Public Constructors
public constructor(engine: BasicEngine, cmdModFunc: function) source
Override:
BasicEngine#constructorParams:
| Name | Type | Attribute | Description | 
| engine | BasicEngine | Engine to forward all commands to.  | 
    |
| cmdModFunc | function | Function which is called before sending a command. Each command cmd is replaced by the command it returns when getting called with cmd.  | 
    
Public Methods
public receive(commandList: *) source
Override:
BasicEngine#receiveParams:
| Name | Type | Attribute | Description | 
| commandList | * |