-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename
BasicAer
to BasicProvider
and refactor interface to follow…
… `BackendV2` (#11422) * Rename `BasicAer` to `BasicProvider`, rename `QasmSimulatorPy` to `BasicSimulator`, remove statevector and unitary simulators. Replace uses of `BasicAer` with `BasicProvider`, `QasmSimulatorPy` with `BasicSimulator`, `UnitarySimulatorPy` with `quantum_info.Operator` and `StatevectorSimulatorPy` with `quantum_info.Statevector`. * Migrate `BasicSimulator` interface from `BackendV1` to `BackendV2` (with some extra methods for backward compat.). Refactor class, rename some internal methods to avoid non-qasm related use of "qasm", add typehints to module to improve clarity, update existing typehints. Update tests to expect `BackendV2`. * Update missing references in qiskit/examples and tests * Update missing docstrings * Add future import * Add type * Fix lint * Avoid rebuilding target/configuration when calling property * Update configuration * Return methods to original order * Restore template matching * Add support for target.num_qubits=None in transpiler pipeline. Set num_qubits in BasicSimulator to None to avoid circuits being transpiled to the simulator's max number of qubits, thus blowing up the size of the computed statevector. Apply suggestions from Julien's code review Co-authored-by: Julien Gacon <gaconju@gmail.com> * Small refactorings: apply Julien's suggestions, single out unitary gate basis gate, remove properties and status (but keep configuration, as it is required by assemble), change test case (it was based on backendV1). * Fix style * Add release note * Apply inline suggestions from Julien's code review Co-authored-by: Julien Gacon <gaconju@gmail.com> * Add suggestion from Julien's code review * Fix lint * Fix docs, test * (Desperate) attempt to fix docs * Third attempt to fix docs * Remove execute from basic simulator tests * Fix conflicts * Merge remove-execute, fix conflicts * Update example docstring * Apply suggestions from Matt's code review Co-authored-by: Matthew Treinish <mtreinish@kortar.org> * Remove BasicProvider global instance * Apply remaining review comments * Fix tests Fix forgotten examples * Update reno * Fix examples * Update np random generator * Use basic simulator instead of basicaer in GenericBackendV2 * Apply code review suggestions * Remove unused import * Update releasenotes/notes/refactor-basicaer-to-basicprovider-e27aff9c8e81d26e.yaml Co-authored-by: Matthew Treinish <mtreinish@kortar.org> * Update refactor-basicaer-to-basicprovider-e27aff9c8e81d26e.yaml * Update refactor-basicaer-to-basicprovider-e27aff9c8e81d26e.yaml --------- Co-authored-by: Julien Gacon <gaconju@gmail.com> Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
- Loading branch information
1 parent
738d3e4
commit 3773444
Showing
73 changed files
with
829 additions
and
1,627 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.. _qiskit-providers-basicprovider: | ||
|
||
.. automodule:: qiskit.providers.basic_provider | ||
:no-members: | ||
:no-inherited-members: | ||
:no-special-members: |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.