Tensor
Extends:
Wrapper class allowing to apply a (single-qubit) gate to every qubit in a quantum register. Allowed syntax is to supply either a qureg or a tuple which contains only one qureg.
Example:
Tensor(H) | x # applies H to every qubit in the list of qubits x
Tensor(H) | (x,) # alternative to be consistent with other syntax
Constructor Summary
| Public Constructor | ||
| public |
constructor(gate: BasicGate) |
|
Member Summary
| Public Members | ||
| public |
gate: * |
|
Method Summary
| Public Methods | ||
| public |
getInverse(): * |
|
| public |
or(qubits: *) |
|
| 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() |
|
Public Constructors
public constructor(gate: BasicGate) source
Override:
BasicGate#constructorParams:
| Name | Type | Attribute | Description |
| gate | BasicGate |
Public Members
public gate: * source
Public Methods
public or(qubits: *) source
Operator| overload which enables the syntax Gate | qubits.
Override:
BasicGate#orParams:
| Name | Type | Attribute | Description |
| qubits | * |