Anonymousket
1 min readOct 25, 2021

--

Hi Lonikar, Thanks for reading the post. I hope you enjoyed. Regarding your queries: 1. “1 XOR x = NOT(x)” that an interesting one but since we are using 3rd qubit initialize to |0⟩. Here we are using 0 XOR x = x. As mentioned in the post Qiskit initializes the qubits default to |0⟩ this differentiation can be visualize with the barrier created in the circuit. Regarding to your 2nd query: “I would like to know whats the effect of using qc.x(c) after using qc.ccx(a, b, c). Is it same as your current code?”… Yes we can use after toffoli gate as well in this particular case, since we have mentioned “NOT AND gate”, the circuit starts with NOT and then the AND gate simulation. As you mentioned in your query we can try “AND NOT” which gives the exact same result. I hope this answers your queries. Please continue reading and please do share your queries. Happy Learning :)

--

--

No responses yet