Skip to content

Add AerSimulator backend#1194

Merged
chriseclectic merged 14 commits into
Qiskit:masterfrom
chriseclectic:aersim
Mar 31, 2021
Merged

Add AerSimulator backend#1194
chriseclectic merged 14 commits into
Qiskit:masterfrom
chriseclectic:aersim

Conversation

@chriseclectic
Copy link
Copy Markdown
Member

@chriseclectic chriseclectic commented Mar 24, 2021

Summary

Adds AerSimulator backend that in the future will replace the QasmSimulator, StatevectorSimulator and UnitarySimulator backends.

The AerProvider has been updated to include AerSimulator backends for all available methods and devices.

Details and comments

C++ Controller

In the C++ code this adds a new aer_controller class which is a combination of the previous base controller and qasm controller. The idea is in the future we do not need subclasses as all methods go through the same controller and the qasm_controller, unitary_controller and statevector_controller can be deprecated.

New Backend

The main differences between the new AerSimulator backend and the QasmSimulator include:

  • GPU simulation is enabled by using device='GPU' option for supported methods. eg AerSimulator(method='statevector', device='GPU')
  • "unitary" and "superop" are added as simulation methods for simulating circuits without measurements.
  • Getting the final state of the simulator must be done using the save_state or another save instruction, no final statevector or unitary will be returned automatically without the save instruction.

Tests

Started refactoring tests to improve running common tests on all supported methods and devices.

Currently some of these tests are failing

  • Unitary method with cache blocking on multi-controlled gates and save unitary / save state

Copy link
Copy Markdown
Contributor

@vvilpas vvilpas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Found a typo that can be dangerous.

Comment thread qiskit/providers/aer/backends/aer_simulator.py Outdated
@chriseclectic chriseclectic changed the title [WIP] Add AerSimulator backend Add AerSimulator backend Mar 30, 2021
chriseclectic and others added 6 commits March 30, 2021 22:59
After trying the heuristic for stabilizer or density matrix simulation the remaining simulation methods are selected between based on supported instructions with ordering statevector > density matrix > matrix product state > unitary > superop.
There is a segfault happening somewhere so this disables the method until we can investigate further
@chriseclectic chriseclectic merged commit c4b88f5 into Qiskit:master Mar 31, 2021
@mtreinish mtreinish added the Changelog: New Feature Include in the Added section of the changelog label Apr 1, 2021
@chriseclectic chriseclectic added the Changelog: API Change Include in the Changed section of the changelog label Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog: API Change Include in the Changed section of the changelog Changelog: New Feature Include in the Added section of the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants