CNOT
Overloads
| Name | Description |
|---|---|
CNOT(const List<integer> sites) -> OperatorNamed | Returns a spin-1/2 OperatorNamed for the CNOT (controlled-NOT) gate, taking a vector of site indices. |
CNOT(integer site0, integer site1) -> OperatorNamed | Returns a spin-1/2 OperatorNamed for the CNOT (controlled-NOT) gate, taking two individual site indices. |
CNOT(const List<integer> sites) -> OperatorNamed
Returns a spin-1/2 OperatorNamed for the CNOT (controlled-NOT) gate, taking a vector of site indices.
Parameters
- sites: Vector of two site indices: [control, target].
Example
var cnot2 = CNOT([1, 2])
CNOT(integer site0, integer site1) -> OperatorNamed
Returns a spin-1/2 OperatorNamed for the CNOT (controlled-NOT) gate, taking two individual site indices.
Parameters
- site0: The control qubit site index.
- site1: The target qubit site index.
Example
var cnot1 = CNOT(0, 1)