In the following piece of code:
cnx(qwc, q, q,q,q)
in what order control qubits and target qubit are? Which qubit is inverted for which values of which ones?
Quantum Computing Stack Exchange is a question and answer site for engineers, scientists, programmers, and computing professionals interested in quantum computing. It only takes a minute to sign up.Sign up to join this community
As explained here, if all of
q (the n-1 qubits) are 1, then
q (the n-th qubit) is inverted. That is,
q is the target qubit and the rest (
q) are controls.