My knowledge of quantum mechanics is very limited, but I will try to ask a purely mathematical question here. If there is a text or resource that explains this, I would definitely appreciate any pointers! I have been unable to find any explanations online (most quantum mechanical resources seem too focused on the physics to ask such questions...).
I am coming at this from a computer science angle, so I will talk about qubits. To make things very simple and concrete, suppose I have two qubits in some quantum state: $$ a_{00} \left|00\right\rangle + a_{01} \left|01\right\rangle + a_{10} \left|10\right\rangle + a_{11} \left|11\right\rangle $$ where $a_{ij} \in \mathbb{C}$, $\sum_{ij} |a_{ij}|^2 = 1$.
Suppose I now measure the first bit. Given that I measure $0$, what is the quantum state of my system? Given that I measure $1$, what is the quantum state of my system?
A naive extension of Baye's rule leads me to conjecture that, for instance, if I measure zero for the first bit, then the quantum state is $$ \sqrt{\frac{|a_{00}|^2}{|a_{00}|^2 + |a_{01}|^2}} \left|00\right\rangle + \sqrt{\frac{|a_{01}|^2}{|a_{00}|^2 + |a_{01}|^2}} \left|01\right\rangle .$$
But is this really correct?
The general question would be that if I have a quantum state $\sum_i a_i \left|\phi_i\right\rangle$, and I "partially observe" $\phi_i$ (so I guess one would say I "partially" collapse the wave function?), how is the new quantum state mathematically determined?