# How to write a code to separate two qubits?

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?

• $\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>$ . Jun 6 at 19:48
• How can I assign a register to two qubits? Jun 6 at 20:24
• qiskit.QuantumCircuit(2) defines a register of 2 qubits. Jun 6 at 22:53
• you can use qiskit.visualization.plot_bloch_multivector to visualize it
– poig
Jun 10 at 16:24

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
https://quantumcomputing.stackexchange.com/a/15514/20884

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]

print(new_counts)
plot_histogram(new_counts)

• 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>$ Jun 7 at 3:24
• @User1086 may be you are talking about statevector.
– poig
Jun 7 at 4:11