# Quantum Computing Superposition

Disclaimer:
By asking this question i'm assuming that "memory" on a quantum computer works similarly compared to a regular computer in the sense that you can store information deterministically and when needed, retrieve it in the same way.
I'm also assuming that n qubit has 2^n "states" that can be set/read independently/concurrently

Question:

Let's suppose that in a 3 qubits quantum machine, at a certain point in time, after a bunch of other operations, I have set my 3 qBit to "111". In another words, those 3 qubits have a state that says "111" and other 7 states of irrelevant information.
At a later moment, given the superposition effect, how does one guarantee that reading those 3 men addrs will yield me my "111"s? In another words, how can I be sure that I'm reading the state that i set previously?

The state of $n$ qubits can be described by $2^n$ complex numbers $\varphi_x$ whose squared magnitudes sum to 1. You can think of these $2^n$ complex numbers as indexed by $\{0,1\}^n$. When you "read" the $i$th qubit (the technical term is "measure"), what happens is that with probability $p_b := \sum_{x\colon x_i=b} |\varphi_x|^2$ you see the value $b$. Moreover, from now on the value of this qubit will always be $b$ (unless you apply quantum operations to it). The rest of the state is updated accordingly: $\varphi_x := 0$ if $x_i \neq b$ and $\varphi_x := \varphi_x/\sqrt{p_b}$ if $x_i = b$.