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?
2 Answers
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)
-
$\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$– User1086Jun 7 at 3:24
-
qiskit.QuantumCircuit(2)
defines a register of 2 qubits. $\endgroup$