Explain how to infer a density matrix from the statistics of quantum measurements This question follows the "Probabilistic Simulation of Quantum Circuits with the Transformer" paper by Carrasquilla et al. In the Formalism section on page 2 the authors state that probability of getting a measurement vector $a$, the $P(a) = Tr[M^{(a)}\varrho]$ is equal to the product of probabilities $P(a_1)P(a_2)...P(a_N)$ if $|\psi\rangle = \prod_{i}\otimes|\psi_i\rangle$  . Here, $N$ is the number of subsystems and $a$ is a measurement result (for qubits, $a_i \in \{0,1\}$, if I understand it correctly) and $P(a_i)=Tr[M^ {(a_i)}|\psi_i\rangle\langle\psi_i|]$. From these considerations, the authors proceed to the equation (1), showing how to estimate $\varrho$ from the measurement statistics:
$$
\varrho = \sum_{a,a^\prime} P(a^\prime)T^{−1}_{a,a\prime}M^{(a)}
$$
where
$$
T_{a,a\prime} = Tr[M^{(a)}M^{(a\prime)}]
$$
My questions are the following:

*

*Could you please explain the math behind the $\varrho$ formula? What do authors call Trace in the $T$ formula? Is it a partial trace? What space do we trace-out?

*Is it still valid if $|\psi\rangle$ is not a product, i.e. $\neq \prod_{i}\otimes|\psi_i\rangle$ ? How do authors expect to deal with entangled states?

*A question regarding the measurement operator $M$. Does it make sense to talk about "entangled" multi-qubit measurements which are not tensor products of single-qubit measurements $M^{(a)}$ ?

 A: To build intuition for the reconstruction formula of the density matrix (known as quantum state tomography), it helps to consider the case that the operators $M^{(a)}$ are projection operators, $M^{(a)}=|\Psi^{(a)}\rangle\langle\Psi^{(a)}|$. Here $a=(a_1,a_2,\ldots a_N)$ is a string of single-qubit measurement outcomes, and $\Psi^{(a)}=\psi_{a_1}\otimes\psi_{a_2}\otimes\cdots\otimes\psi_{a_N}$ is the corresponding product state. We assume that the $\Psi^{(a)}$'s form an orthonormal set spanning the Hilbert space.
In this case the overlap matrix $T$ is the unit matrix and the formula for $\rho$ is the usual representation of a mixed state as a convex combination of pure states,
$$\rho=\sum_{a}P(a)M^{(a)}=\sum_aP(a)|\Psi^{(a)}\rangle\langle\Psi^{(a)}|.$$
In the more general case the overlap matrix $T$ accounts for non-orthogonal $M^{(a)}$'s.
Turning now to the specific questions:

*

*The trace in the definition of the overlap matrix is a full trace over the Hilbert space.

*The formula for $\rho$ applies to any state, pure or mixed, entangled or not. The choice for a product state $\Psi^{(a)}$ is only the choice for a particular basis.

*The set of measurement operators $M^{(a)}$ need not be constructed as a product of single-qubit measurements. The formula holds for any set of positive semi-definite operators that sum to the identity.

