Description Usage Arguments Value Examples
Creates a matrix representing a controlled gate on a system of qubits. The target and control qubits can be located at arbitrarying positions.
1 |
gate |
single qubit gate to create controlled version of |
n |
Number of qubits in the ket, including target, control, and all other qubits |
... |
List of qubits. The last qubit in the list is the target. Any others listed before it are control qubits. Can be any number between 1 and n-1 control qubits, where n is the number of qubits in the ket. Qubits are indexed from 0, starting at the most significant qubit |
A matrix representing the operation of a controlled qubit gate on any subset of the input ket
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.