Description Usage Arguments Value Examples
View source: R/compareQuantumState.R
Generates a matrix (quantum oracle) which will flip the last qubit in a quantum state if the qubits at indices in vectors a and b are the same
1 | compareQuantumState(nQubits,a,b)
|
nQubits |
Number of qubits in a target ket. Should contain at least enough for states a and b and an additional last qubit. |
a |
Vector of indices of first state to compare in a target ket |
b |
Vector of indices of second state to compare in a target ket |
Matrix of the compareQuantumState oracle
1 | compareQuantumState(5,0:1,2:3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.