"For most cases letting VQE create a suitable instance is sufficient. However the Qiskit Aer qasm_simulator supports a snapshot instruction that can be used in conjunction with the operator expectation computation. If used then the outcome is ideal, i.e. like the statevector simulator, and has no shot noise. Since people normally choose the qasm_simulator to have shot noise (sampling noise), and be more like a real-device outcome, VQE has an `include_custom` flag that is passed on to the ExpectationFactory. When using Aer qasm simulator, and this is set `True`, the factory will return `AerPauliExpectation` which uses the snapshot instruction, when `False`, default, then the regular `PauliExpectation` is returned.\n",
0 commit comments