Open kevinsung opened 10 months ago
There are two types of noise model simulations: trajectory and density matrix. In this case, the density matrix should be used. In the case of statevector, it is computed in trajectory, so the noise introduced is different for each run.
noisy_sampler = Sampler(backend_options={"noise_model": noise_model, "method": "density_matrix"})
The noise introduced by each run is different for statevector, but it is not wrong in that it returns an exact probability distribution for the final quantum state.
So for qubits < 10 it uses the density matrix and for qubits >= 10 it uses the trajectories. Is that right? Is this behavior documented somewhere? I did not see it at https://qiskit.org/ecosystem/aer/stubs/qiskit_aer.primitives.Sampler.html.
TBH, I'm not sure which method is chosen by the simulator method option automatic
https://qiskit.org/ecosystem/aer/stubs/qiskit_aer.AerSimulator.html.
It appears that when the number of qubits is 10 or more, running Sampler with shots=None doesn't actually calculate the exact probabilities. For example, the following raises AssertionError. The true behavior should be documented.