## Caso I: Os 2 qubits não estão enredados.

Você pode escrever os estados dos dois qubits (digamos e B ) como | ψ A ⟩ = um | 0 ⟩ + b | 1 ⟩ e | ψ B ⟩ = c | 0 ⟩ + d | 1 ⟩ onde um , b , c , d ∈ C .A$\mathrm{A}$B$\mathrm{B}$|ψA⟩=a|0⟩+b|1⟩$|{\psi}_{\mathrm{A}}\u27e9=a|0\u27e9+b|1\u27e9$|ψB⟩=c|0⟩+d|1⟩$|{\psi}_{\mathrm{B}}\u27e9=c|0\u27e9+d|1\u27e9$a,b,c,d∈C$a,b,c,d\in \mathbb{C}$

Os qubits individuais residem em dois espaços vetoriais complexos dimensionais (ao longo de um C de campo). Mas o estado do sistema é um *vector* (ou *ponto* ) residente em quatro dimensional complexo espaço vetorial C 4 (mais de um C de campo).C2${\mathbb{C}}^{2}$C$\mathbb{C}$C4${\mathbb{C}}^{4}$C$\mathbb{C}$

O estado do sistema pode ser escrito como um produto tensorial ou seja, um c | 00 ⟩ + um d | 01 ⟩ + b c | 10 ⟩ + b d | 11 ⟩ .|ψA⟩⊗|ψB⟩$|{\psi}_{\mathrm{A}}\u27e9\otimes |{\psi}_{\mathrm{B}}\u27e9$ac|00⟩+ad|01⟩+bc|10⟩+bd|11⟩$ac|00\u27e9+ad|01\u27e9+bc|10\u27e9+bd|11\u27e9$

Naturalmente pois o vetor de estado deve ser normalizado. A razão pela qual o quadrado da amplitude de um estado base dá a probabilidade desse estado base ocorrer quando medido na base correspondente, está na regra de Born da mecânica quântica (alguns físicos consideram esse um postulado básico da mecânica quântica) . Agora, probabilidade de | 0 ⟩ que ocorre quando o primeiro qbit é medido é|ac|2+|ad|2+|bc|2+|bd|2=1$|ac{|}^{2}+|ad{|}^{2}+|bc{|}^{2}+|bd{|}^{2}=1$|0⟩$|0\u27e9$ . Da mesma forma, probabilidade de | 1 ⟩ que ocorre quando o primeiro qubit é medido é | b c | 2 + | b d | 2 .|ac|2+|ad|2$|ac{|}^{2}+|ad{|}^{2}$|1⟩$|1\u27e9$|bc|2+|bd|2$|bc{|}^{2}+|bd{|}^{2}$

Now, what happens if we apply a quantum gate without performing any measurement on the previous state of the system? Quantum gates are unitary gates. Their action can be written as action of an unitary operator U$U$ on the initial state of the system i.e. ac|00⟩+ad|01⟩+bc|10⟩+bd|11⟩$ac|00\u27e9+ad|01\u27e9+bc|10\u27e9+bd|11\u27e9$ to produce a new state A|00⟩+B|01⟩+C|10⟩+D|11⟩$A|00\u27e9+B|01\u27e9+C|10\u27e9+D|11\u27e9$A,B,C,D∈C$A,B,C,D\in \mathbb{C}$). The magnitude of this new state vector: |A|2+|B|2+|C|2+|D|2$|A{|}^{2}+|B{|}^{2}+|C{|}^{2}+|D{|}^{2}$ again equates to 1$1$, since the applied gate was *unitary*. When the first qubit is measured, probability of |0⟩$|0\u27e9$ occurring is |A|2+|B|2$|A{|}^{2}+|B{|}^{2}$ and similarly you can find it for occurrence of |1⟩$|1\u27e9$.

But if we did perform a measurement, before the action of the unitary gate the result would be different. For example of you had measured the first qubit and it turned out to be in |0⟩$|0\u27e9$ state the intermediate state of the system would have *collapsed* to ac|00⟩+ad|01⟩(ac)2+(ad)2√$\frac{ac|00\u27e9+ad|01\u27e9}{\sqrt{(ac{)}^{2}+(ad{)}^{2}}}$ (according to the Copenhagen interpretation). So you can understand that applying the same quantum gate on *this* state would have given a different final result.

## Case II: The 2 qubits are entangled.

In case the state of the system is something like 12√|00⟩+12√|11⟩$\frac{1}{\sqrt{2}}|00\u27e9+\frac{1}{\sqrt{2}}|11\u27e9$ , you cannot represent it as a tensor product of states of two individual qubits (try!). There are plenty more such examples. The qubits are said to entangled in such a case.

Anyway, the basic logic still remains same. The probability of |0⟩$|0\u27e9$ occuring when the first qubit is measured is |1/2–√|2=12$|1/\sqrt{2}{|}^{2}=\frac{1}{2}$ and |1⟩$|1\u27e9$ occuring is 12$\frac{1}{2}$ too. Similarly you can find out the probabilities for measurement of the second qubit.

Again if you apply a unitary quantum gate on this state, you'd end up with something like A|00⟩+B|01⟩+C|10⟩+D|11⟩$A|00\u27e9+B|01\u27e9+C|10\u27e9+D|11\u27e9$, as before. I hope you can now yourself find out the probabilities of the different possibilities when the first and second qubits are measured.

|00⟩,|01⟩,|10⟩,|11⟩$|00\u27e9,|01\u27e9,|10\u27e9,|11\u27e9$4×1$4\times 1$⎡⎣⎢⎢⎢1000⎤⎦⎥⎥⎥$\left[\begin{array}{c}1\\ 0\\ 0\\ 0\end{array}\right]$, ⎡⎣⎢⎢⎢0100⎤⎦⎥⎥⎥$\left[\begin{array}{c}0\\ 1\\ 0\\ 0\end{array}\right]$, etc. by mapping the four basis vectors to the standard basis of R4${\mathbb{R}}^{4}$. And, the unitary transformations U$U$ can be written as 4×4$4\times 4$ matrices which satisfy the property UU†=U†U=I$U{U}^{\u2020}={U}^{\u2020}U=I$.