Home Reference Source
import {ControlEngine} from 'projectq/src/meta/control.js'
public class | source

ControlEngine

Extends:

BasicEngine → ControlEngine

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

qubits: *

Method Summary

Public Methods
public

handleCommand(cmd: *)

public

Return true if command cmd has a compute/uncompute tag.

public

receive(commandList: *)

Inherited Summary

From class BasicEngine
public
public

Return a new qubit as a list containing 1 qubit object (quantum register of size 1).

public

Allocate n qubits and return them as a quantum register, which is a list of qubit objects.

public

Deallocate a qubit (and sends the deallocation command down the pipeline).

public

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

Check if there is a compiler engine handling the meta tag

public
public

send(commandList: Command[])

Forward the list of commands to the next engine in the pipeline.

Public Constructors

public constructor(qubits: Array<BasicQubit>) source

Override:

BasicEngine#constructor

Params:

NameTypeAttributeDescription
qubits Array<BasicQubit>

qubits conditional on which the following operations are executed.

Public Members

public qubits: * source

Public Methods

public handleCommand(cmd: *) source

Params:

NameTypeAttributeDescription
cmd *

public hasComputeUnComputeTag(cmd: Command): * source

Return true if command cmd has a compute/uncompute tag.

Params:

NameTypeAttributeDescription
cmd Command

Return:

*

public receive(commandList: *) source

Override:

BasicEngine#receive

Params:

NameTypeAttributeDescription
commandList *