Home Reference Source
import {MeasureGate} from 'projectq/src/ops/gates.js'
public class | source

MeasureGate

You can directly use an instance of this class. Measure

Extends:

BasicGateClassicalInstructionGateFastForwardingGate → MeasureGate

Measurement gate class (for single qubits).

Method Summary

Public Methods
public

or(qubits: *)

Previously (ProjectQ <= v0.3.6) MeasureGate/Measure was allowed to be applied to any number of quantum registers.

public

Inherited Summary

From class BasicGate
public static

makeTupleOfQureg(qubits: Qubit | Qubit[] | Qureg | Qureg[]): Qureg[]

Convert quantum input of "gate | quantum input" to internal formatting.

public
public
public

equal(other: BasicGate | Object): boolean

public

generateCommand(qubits: *): Command

Helper function to generate a command consisting of the gate and the qubits being acted upon.

public
public
public
public

or(qubits: *)

Operator| overload which enables the syntax Gate | qubits.

public

Public Methods

public or(qubits: *) source

Previously (ProjectQ <= v0.3.6) MeasureGate/Measure was allowed to be applied to any number of quantum registers. Now the MeasureGate/Measure is strictly a single qubit gate. In the coming releases the backward compatibility will be removed!

Override:

BasicGate#or

Params:

NameTypeAttributeDescription
qubits *

public toString(): string source

Override:

BasicGate#toString

Return:

string