- How can we say this is true of all quantum states and gates – "Whatever state our quantum system is in, there is always a measurement that has a deterministic outcome.” Can someone explain this with more concrete examples?
If by "how can we say this is true" you mean "how do we know that systems behave this way in the real world", I will defer to someone with a stronger background in experimental physics. But if you're willing to take for granted the mathematical model which says that our qubits are unit vectors in $\mathbb C^2$ or some other finite dimensional Hilbert space $\mathcal H$, and that a "measurement" is represented by a Hermitian matrix $A$ whose possible outcomes are given by the distinct eigenvalues of $A$ and such that the probability of each outcome when measuring a state $\lvert\psi\rangle$ is equal to the square of the magnitude of the component of $\lvert\psi\rangle$ in the respective eigenspace - then we can explicitly come up with a nontrivial measurement that produces deterministic outcomes on $\lvert\psi\rangle$.
To construct such a measurement given $\lvert\psi\rangle$, construct an orthonormal basis $\{\lvert u_1\rangle, \cdots, \lvert u_d\rangle\}$ of the Hilbert space $\mathcal H$ whose first element is $\lvert u_1\rangle = \lvert\psi\rangle$. Create a matrix $U$ with these vectors as its columns - this will be a unitary matrix. Then define $A= UDU^\ast$, where $D$ is the diagonal matrix with $+1$ as its first diagonal entry and $-1$ for all remaining diagonal entries. Then the eigenvectors of $A$ are the $\lvert u_i\rangle$, and there are precisely two eigenspaces: the eigenspace corresponding to $\lambda=+1$, which is spanned by $\lvert\psi\rangle$, and the eigenspace corresponding to $\lambda = -1$, which is the orthogonal complement of this space. Because of how a measurement is defined in this mathematical model, the probability of observing the result $\lambda = +1$ when performing this measurement on $\lvert\psi\rangle$ is equal to $1$, meaning that it is deterministic.
- When would an outcome be deterministic versus random?
In this model, the probability of observing $\lambda_i$ when measuring the observable $A$ on the quantum state $\lvert\psi\rangle$ is equal to the squared magnitude of the component of $\lvert\psi\rangle$ in the eigenspace of $A$ corresponding to $\lambda_i$. This is deterministic if and only if one of these probabilities equals $1$ and all the others equal $0$, and this happens if and only if $\lvert\psi\rangle$ belongs to one of the eigenspaces of $A$.
- And if we know that the deterministic outcome in a particular basis is let’s say ‘G’, then why can’t it be just transformed into another basis mathematically (on paper) to find what the answer is in that other basis – meaning how will it be random in that other basis, since it is just a mathematical transformation of the deterministic answer in the original basis??
Knowing the result of a measurement in one basis does not necessarily tell us much about the result of a measurement in a different basis. That is, as measurements are defined in the mathematical model I've described above, the results of measurements can't really be "carried over" as you're describing.
Let me give you an example that I think demonstrates this idea really well - at least, it really helped me understand this tricky point when I was still struggling with the idea. Consider $\mathcal H = \mathbb C^2$, so just the space of qubits. We have the computational basis $\{\lvert 0\rangle, \lvert 1\rangle\}$, and we also have the Hadamard basis $\{\lvert +\rangle, \lvert -\rangle\}$, where $$\begin{align}\lvert +\rangle &= \frac{\lvert 0\rangle + \lvert 1\rangle}{\sqrt 2} \\ \lvert -\rangle &= \frac{\lvert 0\rangle - \lvert 1\rangle}{\sqrt 2}\end{align}$$ The vectors of the computational basis are eigenvectors of the $Z$ matrix: $$Z = \begin{bmatrix}1 & 0 \\ 0 & -1\end{bmatrix}$$ and the vectors of the Hadamard basis are eigenvectors of the $X$ matrix: $$X = \begin{bmatrix}0 & 1 \\ 1 & 0\end{bmatrix}$$ Each of $Z$ and $X$ describes an observable. According to the way performing a measurement is described in this model, we have the following:
- Measuring $Z$ on the state $\lvert 0\rangle$ gives $+1$ with certainty
- Measuring $Z$ on the state $\lvert 1\rangle$ gives $-1$ with certainty
- Measuring $Z$ on the state $\lvert +\rangle$ gives $+1$ with probability $0.5$ and $-1$ with probability $0.5$
- Measuring $Z$ on the state $\lvert -\rangle$ gives $+1$ with probability $0.5$ and $-1$ with probability $0.5$
- Measuring $X$ on the state $\lvert 0\rangle$ gives $+1$ with probability $0.5$ and $-1$ with probability $0.5$
- Measuring $X$ on the state $\lvert 1\rangle$ gives $+1$ with probability $0.5$ and $-1$ with probability $0.5$
- Measuring $X$ on the state $\lvert +\rangle$ gives $+1$ with certainty
- Measuring $X$ on the state $\lvert -\rangle$ gives $-1$ with certainty
There are a couple of interesting things to notice here:
- $\lvert 0\rangle,\lvert 1\rangle$ give deterministic results when measured with respect to the observable $Z$, and nondeterministic results when measured with respect to $X$.
- $\lvert + \rangle, \lvert -\rangle$ are not only nondeterministic when measured with respect to $Z$, but they are statistically indistinguishable when it comes to this observable. That is, they both behave like fair coin flips when measured in the $Z$ basis.
- Even though $\lvert + \rangle, \lvert -\rangle$ are indistinguishable when measured with respect to $Z$ (both acting as fair coin flips), measuring with respect to $X$ discriminates between them with certainty.
This means that:
- It's possible for a fixed measurement to have probabilistic results when applied to one state, but deterministic results when applied to another state.
- It's possible for a fixed state to give probabilistic results when measured w.r.t one observable, but deterministic ones when measured w.r.t a different observable.
- It's possible for two states to (statistically) give the same results when measured in one basis, but have opposite behavior when measured in another basis.
Hopefully this example helps illuminate why the results of measuring one observable on a state cannot just be "carried over" to deduce the results of another observable on that same state.