AddConstantModN
Extends:
Add a constant to a quantum number represented by a quantum register modulo N.
The number is stored from low- to high-bit, i.e., qunum[0] is the LSB.
Example:
qunum = eng.allocateQureg(5) # 5-qubit number
X | qunum[1] # qunum is now equal to 2
AddConstantModN(3, 4) | qunum # qunum is now equal to 1
Constructor Summary
Public Constructor | ||
public |
constructor(a: number, N: number) |
Method Summary
Public Methods | ||
public |
equal(other: *): * |
|
public |
getInverse(): * |
|
public |
|
Inherited Summary
From class BasicGate | ||
public static |
Convert quantum input of "gate | quantum input" to internal formatting. |
|
public |
|
|
public |
|
|
public |
|
|
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 |
toString() |
From class BasicMathGate | ||
public |
mathFunc: * |
|
public |
getMathFunction(qubits: Array<Qureg>): function Return the math function which corresponds to the action of this math gate, given the input to the gate (a tuple of quantum registers). |
|
public |
|
Public Constructors
public constructor(a: number, N: number) source
Override:
BasicMathGate#constructorPublic Methods
public equal(other: *): * source
Override:
BasicGate#equalParams:
Name | Type | Attribute | Description |
other | * |
Return:
* |