Description Usage Arguments Value Examples
If no argument is supplied, returns the matrix of TOFFOLI gate. If ket given as input, applies a TOFFOLI gate to the input ket and returns the resulting ket. If byCycle is TRUE, it generates the cycles which implement the TOFFOLI gate with standard gates.
1 |
... |
No argument, or an 8 dimensional (3 qubit) ket (column vector) that is input to the gate |
byCycle |
Boolean specifying if the circuit should be generated. If TRUE, rather than returning a matrix or performing a TOFFOLI gate, it returns a list of cycles of standard gates which implements the TOFFOLI gate. |
n |
Number of qubits in the system. |
cQubits |
Vector of control qubit indices. Indexed from 0. |
tQubit |
Index of target qubit. Indexed from 0. |
Matix of the TOFFOLI gate or ket after a TOFFOLI gate is applied. If byCycle is TRUE, a list of cycles implementing the TOFFOLI.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.