Suppose we have a circuit with two qubits, A and B. Both are initialized to $|0\rangle$. Over qubit A we apply a single rotation gate (e.g. $R_y$) with an angle given by $x_0$, and then we entangle the two qubits by an arbitrary unitary operator $U$. Then we measure qubit A while B is never measured. Qubit A is reset to $|0\rangle$.We repeat iteratively this process, only changing the initial rotation angle over qubit A, $x_1,...x_n$. $U$ is always the same. The full circuit is represented in the figure.
Qiskit, by default, performs the simulation by making the intermediate measurements and returns the distribution of all the possible bit strings given by the classical register in which we store all the intermediate measurements. After that, we can recover the probability of getting 0 or 1 in each individual measurement. But there seems not to exist a method for computing the probability in each individual measurement in exact form (like e.g. computing the modulus of the statevector amplitudes when the measurement is only at the end).
Is there any form of getting the exact individual probabilities $p_0,p_1,...p_n$ with Qiskit? It is also not possible when using another method on AerSimulator, like density_matrix
.
Does there exist any other open source kit different from qiskit that solves this?