Qiskit / qiskit-aer

Aer is a high performance simulator for quantum circuits that includes noise models
https://qiskit.github.io/qiskit-aer/
Apache License 2.0
476 stars 355 forks source link

Remove qobj supports as an argument of `AerSimulator.run()` #1720

Open hhorii opened 1 year ago

hhorii commented 1 year ago

What is the expected behavior?

AerSimulator should not support QasmQobj and PulseQobj to run simulation.

They are deprecated in 0.9.0.

https://github.com/Qiskit/qiskit-aer/blob/b9f35590c51bcb1deb9f6021352507bea0b6a4b9/qiskit_aer/backends/aerbackend.py#L162-L168

hhorii commented 1 year ago

Even If we remove qobj supports in arguments, qobj will be still necessary to execute pulse simulation and DASK-based qasm simulation. That is, assemble() will be internally called in run(). To generate qobj for pulse, arguments for assemble() is necessary. For example, verify_wheel.py executes pulse simulation as follows

    qobj = assemble([schedule],
                    backend=backend_sim,
                    qubit_lo_freq=[5.0],
                    meas_level=1,
                    meas_return='avg',
                    shots=1)
    results = backend_sim.run(qobj, system_model=system_model).result()

Note that pulse simulation requires different arguments for assemble() and run(). If we remove qobj supports, the same arguments will be specified and unfortunately pulse simulation doesn't work correctly.

I think that qobj should be removed after unsupport of pulse simulation (https://github.com/Qiskit/qiskit-aer/issues/1722).