 As I was reading Qiskit textbook and there is this problem ... How can I swap a $$|+\rangle$$ to a $$|-\rangle$$

Qiskit textbook --> Basic Circuit Identities

• Just prepare a qubit (let ie be $q_0)$in the state $|+\rangle$, another qubit (let it be $q_1$) in the state $|-\rangle$ and swap them ($SWAP(q_0, q_1)$). If you are looking for something else provide more detailed explanantion please.
Oct 2, 2022 at 12:19
• what if I don't want to use SWAP gate instead I want to use only CNOT gate to swap these state? Oct 2, 2022 at 12:47
• $SWAP(0,1) = CNOT(0,1) \circ CNOT(1,0) \circ CNOT(0,1)$. See algassert.com/post/1717
• It is unclear to me if you are talking about "swap" in the sense of swapping two qubits or just "swap" in the sense transform a single qubit state from $|+\rangle$ to $|-\rangle$. in the latter case, just apply a $Z$ gate. Oct 2, 2022 at 14:19
There are many equivalent circuits that will swap two qubit registers simply because two equal CNOTs in sequence act as an identity map. Therefore one possibility might be simply to increase the given examples before in the textbook $$CNOT_{01}CNOT_{10}CNOT_{01}$$ and $$CNOT_{10}CNOT_{01}CNOT_{10}$$ to virtually anything such as $$CNOT_{01}CNOT_{10}CNOT_{10}CNOT_{10}CNOT_{01}CNOT_{01}CNOT_{01}.$$