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)}$ ?