Closed HuangJunye closed 2 years ago
Thanks for raising this question @HuangJunye. I propose adding the following to the explanatory material. Does it provide sufficient information to answer your question?
In general, the statevector simulator is useful for simulating ideal circuits, while the QASM simulator is useful for simulating circuits with noise to mimic a real noisy quantum computer. When running the entanglement forging module either on the QASM simulator or on real quantum hardware, several additional options are available:
shots
,bootstratp_trials
,copysample_job_size
,meas_error_mit
,meas_error_shots
,meas_error_refresh_period_minutes
,zero_noise_extrap
. These options can be specified in theEntanglementForgedConfig
class (for more info, see the reference guide). Users can use the QASM simulator to test out these options before running them on real quantum hardware.
Thanks for working on this. What's the difference between the two simulators when we use QASM simulator without noise? I know that QASM is shot based so it will still have sampling noise while statevector obtain probabilities from the amplitudes of the statevector. But practically when you do quantum chemistry simulation, when should a user use statevector simulator?
@HuangJunye How about this?
Statevector simulation is useful when we want to:
- get the exact values of energies (e.g. for chemistry problems) without any error bars (assuming there are no other sources of randomness)
- test the performance of an algorithm in the absence of shot noise (for VQE, there could be a difference between the trajectory of the parameters in the presence and absence of shot noise; in this case the statevector simulator can concretely provide an answer regarding the expressivity of a given ansatz without any uncertainty coming from shot noise)
QASM simulation is useful when:
- the system sizes are larger because the statevector simulator scales exponentially in system size and will not be useful beyond small systems
- simulating circuits with noise to mimic a real noisy quantum computer
When running the entanglement forging module either on the QASM simulator or on real quantum hardware, several additional options are available:
shots
,bootstrap_trials
,copysample_job_size
,meas_error_mit
,meas_error_shots
,meas_error_refresh_period_minutes
,zero_noise_extrap
. These options can be specified in theEntanglementForgedConfig
class (for more info, see the reference guide). Users can use the QASM simulator to test out these options before running them on real quantum hardware.Notes:
- In the limit of infinite shots, the mean value of the QASM simulator will be equal to the value of the statevector simulator.
- The QASM simulator also has a method that mimics the statevector simulator without shot noise as an alternative to statevector simulator.
Is your feature request related to a problem? Please describe.
Tutorial 4 uses QASM simulator instead of Statevector simulator. It's unclear to me the difference of the two kinds of simulators and when a user should choose one or the other.
Describe the solution you'd like I think it would be a good idea to add a section in the Explanatory Material to explain the difference of the two simulators and discuss when a user should choose one or the other and add a link to the section in Tutorial 4.
Additional context None.