2
$\begingroup$

For a three qubits system to be in an entanglement(GHZ) state, the circuit can be built as per Qiskit,

GHZ state way 1

Here, the control bit of the second X gate is on q0. what if the control bit is shifted to q1. This also leads to entanglement. what is the difference between the two different ways?

Further to my question, I did the same for 5 qubits, I get different results: image1_samecontrol_bit image_different_control_bits

which one is correct?

$\endgroup$
3
$\begingroup$

The two circuits are equivalent.

import qiskit.quantum_info as qi
from qiskit.circuit import QuantumCircuit
qc1 = QuantumCircuit(3)
qc1.h(0)
qc1.cx(0,1)
qc1.cx(0,2)
op1 = qi.Operator(qc1)
print(qc1)
     ┌───┐          
q_0: ┤ H ├──■────■──
     └───┘┌─┴─┐  │  
q_1: ─────┤ X ├──┼──
          └───┘┌─┴─┐
q_2: ──────────┤ X ├
               └───┘


qc2 = QuantumCircuit(3)
qc2.h(0)
qc2.cx(0,1)
qc2.cx(1,2)
op2 = qi.Operator(qc1)
print(qc2)

     ┌───┐          
q_0: ┤ H ├──■───────
     └───┘┌─┴─┐     
q_1: ─────┤ X ├──■──
          └───┘┌─┴─┐
q_2: ──────────┤ X ├
               └───┘


print(op1 == op2)
True

To see this more explicitly, note the following idenity

enter image description here

Thus you have

enter image description here

Note that $CNOT*CNOT = I$, and when the control qubit is $|0\rangle$ nothing happened so you can remove it.

$\endgroup$
5
  • 1
    $\begingroup$ I am reading all your answers to gain more insights and here you are! answering my question. Thank you!! $\endgroup$
    – Kittu A
    Nov 25 at 6:52
  • 1
    $\begingroup$ No problem! :) I hope they are helpful. $\endgroup$
    – KAJ226
    Nov 25 at 7:38
  • $\begingroup$ I tried 5 qubits entanglement and I used these two differing ways(above two) and I see that I see that the results are totally different. AM I doing something wrong? $\endgroup$
    – Kittu A
    Nov 25 at 14:10
  • $\begingroup$ It should be the same. You might have created the circuit wrong. But they should be the same to any number of qubits. $\endgroup$
    – KAJ226
    Nov 26 at 4:33
  • $\begingroup$ I have the two circuits as a follow-up question. COuld you look at it. Thank you. $\endgroup$
    – Kittu A
    Nov 26 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.