Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename BasicAer as a test provider #4443

Closed
ajavadia opened this issue May 13, 2020 · 11 comments · Fixed by #11422
Closed

Rename BasicAer as a test provider #4443

ajavadia opened this issue May 13, 2020 · 11 comments · Fixed by #11422
Assignees
Labels
type: enhancement It's working, but needs polishing
Milestone

Comments

@ajavadia
Copy link
Member

ajavadia commented May 13, 2020

BasicAer is not needed anymore now that the quantum_info module can be used to simulate circuits. quantum_info has a more flexible workflow as you are not tied to the job/result interface and is nice for small circuit calculations. It is also faster as it bypasses serialization.

Operator(qc) (unitary) or zero.evolve(qc) (statevector) or zero.evolve(qc).probabilities_dict() (counts)

The only thing that BasicAer supports in addition to quantum_info is conditional operations I think, but I think that can be added too?

@ajavadia ajavadia added the type: enhancement It's working, but needs polishing label May 13, 2020
@1ucian0
Copy link
Member

1ucian0 commented May 14, 2020

I think there is some value in keeping BasicAer API as a backend included in terra, using the quantum_info module under. It makes terra battery-included and allow us to test quantum_info as yet another backend.

I dont feel super strong about this, but just my two cents.

@chriseclectic
Copy link
Member

chriseclectic commented May 15, 2020

I agree with removing for a separate reason: I think the main reason for it existing was due to C++ build issues with early version of Qiskit Aer, which are a lot better now.

If we do decide to keep BasicAer, we should only keep the QasmSimulator and remove the Unitary and Statevector simulators since as mentioned they provide nothing over the Operator and Statevector classes other than a less convenient interface.

The QasmSimulator has functionality not in the qi classes such as intermediate measurements and conditionals. I don't think these should be added to those classes because to do so you are basically rebuilding the qasm simulator (by adding classical registers and logic and notion of shots and results). I think it would be better to keep a specialized simulator class for this but have that simulator work directly with circuit and gate objects and not require going through the provider/qobj/job/result execution model.

@jaygambetta
Copy link
Member

I agree it is time for basis aer to go as aer works and the quant-info should replace it

@Cryoris
Copy link
Contributor

Cryoris commented May 25, 2020

If we do decide to keep BasicAer, we should only keep the QasmSimulator and remove the Unitary and Statevector simulators since as mentioned they provide nothing over the Operator and Statevector classes other than a less convenient interface.

The one advantage BasicAer has, is that you can run circuits containing Barrier/Measure/Reset instructions. If we'll run algorithms from Aqua on quantum_info, we'll have to work around some of these (mostly to replace BasicAer's QASM simulator).

Alternatively, we could require Aer to be installed for any QASM simulations, but "Terra, batteries included" for both statevector and QASM seems nicer to me too.

@mtreinish
Copy link
Member

mtreinish commented May 28, 2020

I think it still provides value. Primarily it lets us exercise the entire execution path inside of terra itself. Personally it's been very useful for me as I've been implementing the v2 provider interface to be able to test using it directly in terra itself. It also serves as a decent example for implementing local simulator based providers because Aer is much more complicated.

There are also platforms where Aer still doesn't run that it is actively used (thinking mainly about ibm i per: #3362 and #3183 and my subsequent conversations with them).

I think we should promote the use of quantum_info instead of BasicAer for most use cases, but having basicaer still provides value. We could probably refactor the basicaer simulators to just use quantum_info inside, that would probably make it pretty small

@chriseclectic
Copy link
Member

Going back to this old issue: I suggest renaming the BasicAer provider to TestProvider and moving it from qiskit.providers to qiskit.test, like with the mock backends. Then it is not in the main import path, and not called Aer, but can still be imported and used for running unit tests or by anyone else who wants a python only simulator.

@kdk
Copy link
Member

kdk commented Feb 15, 2022

Following up on an offline discussion with the team, the consensus was that BasicAer is still useful in some cases (chiefly test/CI environments), and doesn't require much in terms of ongoing maintenance or development, so the best outcome would be relocating and/or renaming it to something like TestProvider to indicate that it's not intended as a high-performance simulator, and has no relation to Aer.

@uchoi91
Copy link
Contributor

uchoi91 commented Jun 7, 2023

Hello. If this is still needed where BasicAer relocating/renaming it to something like TestProvider. if so, I would love to be assigned to this to take this on.

Thanks!

@kdk kdk added this to the 0.46.0 milestone Jul 19, 2023
@1ucian0
Copy link
Member

1ucian0 commented Jul 31, 2023

Hi @uchoi91
Indeed, this is still a thing we are trying to move forward with. However, it might be trickier that what it looks like (I'm removing short project label from this one). Thanks for you interest anyway. Feel free to take any of the good first issues (from https://qisk.it/good-first-issues )

@uchoi91
Copy link
Contributor

uchoi91 commented Jul 31, 2023

sounds good. thanks @1ucian0

@1ucian0
Copy link
Member

1ucian0 commented Oct 2, 2023

After talking with @blakejohnson, we agreed to rename it BasicSimulator. This removes the reference to Aer while hints that performance is not a priority for it.

@jakelishman jakelishman modified the milestones: 0.45.0, 0.46.0 Oct 10, 2023
@kdk kdk removed this from the 0.46.0 milestone Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement It's working, but needs polishing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants