powered by
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
compareQuantumState(nQubits,a,b)
Number of qubits in a target ket. Should contain at least enough for states a and b and an additional last qubit.
Vector of indices of first state to compare in a target ket
Vector of indices of second state to compare in a target ket
Matrix of the compareQuantumState oracle
# NOT RUN { compareQuantumState(5,0:1,2:3) # }
Run the code above in your browser using DataLab