I am trying to implement the Grover's search algorithm using Q# and I am not able to implement the oracle (black box) part for the search of state $|1010\rangle$. How to implement the controlled NOT gate using 5 qubits with 4 qubits (q[0]
... q[3]
) used as the control qubits and q[4]
as the target qubit in Q#?
Please correct me if this is wrong, I am trying to implement Grover's algorithm using 4 qubits where 3 qubits are for the states and the 4th qubit is the auxiliary qubit so the auxiliary bit should be the target qubit?