Is it possible to write a code to separate $\left|01\right> $ as $\left|0\right> ,\left|1\right> $ or are there any circuits i can use to get output like that?

  • 1
    $\begingroup$ $\left|01\right> $ is a register of 2 qubits. There is no circuit to separate them. You have to redefine your registers. One register for $\left|0\right>$ and another for $\left|1\right> $ . $\endgroup$ Jun 6, 2022 at 19:48
  • $\begingroup$ How can I assign a register to two qubits? $\endgroup$
    – User1086
    Jun 6, 2022 at 20:24
  • $\begingroup$ qiskit.QuantumCircuit(2) defines a register of 2 qubits. $\endgroup$ Jun 6, 2022 at 22:53
  • $\begingroup$ you can use qiskit.visualization.plot_bloch_multivector to visualize it $\endgroup$
    – poig
    Jun 10, 2022 at 16:24

2 Answers 2


Maybe it should be useful tu use qutip to better understand what you desire (if you are familiar with python) by visualizing exactly the 2 qubits and its state vectors (which I believe is what you seek to visualize).

I recently made a post on my personal blog that can help with that start; if you are interested, you can check it here for more details

Hope it is useful somehow!


I found a similar answer, might be something you are looking for

counts = job.result().get_counts(qc)
# New dictionary to store out results in.
new_counts = {'0': 0,
              '1': 0}

# The qubit we want the probability for
show_qubit = 1

for count in counts:
    count_idx = (len(count) - 1) - show_qubit
    new_counts[count[count_idx]] = new_counts[count[count_idx]] + counts[count]

  • $\begingroup$ Now if I want to split that into two qubits how can I assign I measure that quantum register and have state ex:$\left|01\right> $ as $\left|0\right> ,\left|1\right> $ $\endgroup$
    – User1086
    Jun 7, 2022 at 3:24
  • $\begingroup$ @User1086 may be you are talking about statevector. $\endgroup$
    – poig
    Jun 7, 2022 at 4:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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