Home Reference Source
import {BasicQubit} from 'projectq/src/types/qubit.js'
public class | source

BasicQubit

Direct Subclass:

Qubit

Static Method Summary

Static Public Methods
public static

copyArray(array: *): *

Constructor Summary

Public Constructor
public

constructor(engine: BasicEngine, idx: number)

Member Summary

Public Members
public

engine: *

public

id: *

Method Summary

Public Methods
public

equal(other: *): boolean

Compare with other qubit (Returns true if equal id and engine).

public
public

Access the result of a previous measurement and return false / true (0 / 1)

public
public

Return string representation of this qubit.

public

weakCopy(): *

Static Public Methods

public static copyArray(array: *): * source

Params:

NameTypeAttributeDescription
array *

Return:

*

Public Constructors

public constructor(engine: BasicEngine, idx: number) source

Params:

NameTypeAttributeDescription
engine BasicEngine

Owning engine / engine that created the qubit

idx number

Unique index of the qubit referenced by this qubit

Public Members

public engine: * source

public id: * source

Public Methods

public equal(other: *): boolean source

Compare with other qubit (Returns true if equal id and engine).

Params:

NameTypeAttributeDescription
other *

{BasicQubit|Object} BasicQubit to which to compare this one

Return:

boolean

public inspect(): string source

Return:

string

public toBoolean(): boolean source

Access the result of a previous measurement and return false / true (0 / 1)

Return:

boolean

public toNumber(): number source

Return:

number

public toString(): string source

Return string representation of this qubit.

Return:

string

public weakCopy(): * source

Return:

*