Commit Graph

1597 Commits

Author SHA1 Message Date
Hiroshi Horii ef90c8889e
Remove `PulseSimulator` (#1884)
Since 0.12, Qiskit-Aer notices deprecation warnings to use of PulseSimulato. Because 0.13 will be released after +3 months since 0.12 was released, Qiskit-Aer will stop supports of pulse simulation.

* first pass at removing pulse simulator
* autoformat with black
* remove ref to aer pulse in docs
* fix lint issues
* remove pulse rst
* remove pulse tests
* add release note
* remove open pulse from CMakeLists.txt
* remove pulse tests
* remove remaining pulse codes

---------

Co-authored-by: AngeloDanducci <angelo.danducci.ii@ibm.com>
2023-08-02 11:52:21 +09:00
Jun Doi 77a101bff7
Fix required_memory_mb (#1881)
* Fix required_memory_mb

* add release note

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2023-07-27 09:07:39 +00:00
Ryo Wakizaka 18ad01dbe6
Support u3 gate application in Aer runtime API (#1876)
* Support u3 gate application

* Apply clang-format

* Revert clang-format for aer_runtime_api.h

* Add release note

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-07-27 06:54:29 +00:00
Jun Doi dfb7a4e4ad
Fix OpenMP nested parallel (#1880)
* Fix OpenMP nested parallel

* add comment in release note

* fix true and false

* fix format

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2023-07-27 05:27:01 +00:00
Jun Doi 6f77a898e2
Fix missing dynamic link path for CUDA runtime and cuQuantum libraries (#1877)
Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2023-07-27 04:02:28 +00:00
Tung Bui (Leo) 0fb4bc16b7
Remove Python 3.7 from Github actions (#1819)
Since 0.13.0, Aer does not support Python 3.7.
This commit removes github actions for CI.

* Removing python 3.7 from test workflow
* Removing python 3.7 from build workflow
* Removing python 3.7 from deploy workflow
* Removing python 3.7 from tox
* revert
* Remove python 3.7 from pyproject.toml
* Remove python 3.7 from pyproject.toml - tool
---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2023-07-27 11:57:12 +09:00
Hiroshi Horii b4e393c57a
set numpy version constraint only in dev (#1871)
* add numpy version constraint only in dev

* set numpy version constraint in contraints.txt
2023-07-12 13:05:04 +09:00
Hiroshi Horii e153d63497
bump up python version from 3.7 to 3.8 to run cibuildwheel (#1867)
* bump up python version from 3.7 to 3.8 to run cibuildwheel

* bump up all python version in deploy workflow
2023-07-11 17:17:30 +00:00
Jun Doi 3024b24bcb
New GPU binaries with cuQuantum support (#1854)
* New GPU binaries with cuQuantum support

* format setup.py

* remove testpipy settings

* Update setup.py to use numpy with version lower than 1.25

* changed package names, qiskit-aer-gpu for CUDA12, and qiskit-aer-gpu-cu11 for 11

* format setup.py

* Update README.md

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update releasenotes/notes/renew_gpu_binaries-2cf3eba0853b8407.yaml

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* update release note

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
2023-07-12 00:57:17 +09:00
Hiroshi Horii 6802355b7f
Support save_statevector for QuantumCircuit from QASM3 string (#1846)
* Support save_statevector for QuantumCircuit from QASM3 string

* add qiskit_qasm3_import to requirements-dev.txt

* simplify default_qubits()

* fix lint error

* skip qasm3 circuit test in 3.7
2023-07-10 06:00:43 +00:00
Hiroshi Horii de6c489358
Fix param positions for circuits with conditionals (#1851)
* fix parameter indexing issues.

* fix issues in parameterization of global phase

* add reno

* fix lint

* fix release note

* fix a bug to call _convert_circuit_binds

* add test
2023-07-06 21:45:00 +09:00
Hiroshi Horii 04a6cab632
Fix a bug in `aer_apply_measure` in libaer and enable libaer build in Mac (#1860)
* support all platform for libaer. fix a bug in aer_apply_measure in libaer

* build libaer only in Linux and Darwin
2023-07-06 00:59:12 +00:00
Hiroshi Horii a052ccf461
pin numpy version lower than 1.25 (#1859) 2023-07-05 13:26:54 +09:00
Hiroshi Horii a59807576f
Remove `AerCircuit` from result of `backend.run()` (#1845)
* take AerCircuit from _metadata in experiment result

* add reno

* Fix rST formatting

---------

Co-authored-by: Jake Lishman <jake@binhbar.com>
2023-06-13 12:03:42 +00:00
Hiroshi Horii 27e3ec9f0b
*Support initialize with int (#1841)
Previously `QuantumCircuit.initialize` was not correctly preocessed
if initial state is specified with single `int` value. This commit
fixes this issue by decomposing initialize instructions.
2023-06-12 23:12:42 +09:00
Ikko Hamamura 2e09f38378
Batch QuantumCircuit with multiple parameter_binds (#1840)
`Estimator` in Aer did not use parameter bindings appropriately. Backend is called multiple times 
to simulate a circuit with multiple parameter-sets. This commit is to call backend once for multiple
parameter-sets for a circuit.

* WIP
* refactor
* lint
* add reno
2023-06-12 15:57:30 +09:00
Hiroshi Horii 52f0e98336
fix MPI build break (#1842) 2023-06-09 17:07:12 +09:00
Hiroshi Horii c052d07f71
Do not use circuit metadata to internally manage simulation results (#1772)
* Stop using circuit metadata to internaly manage simulation results

This fixes `AerSimulator` to use circuit metadata to maintain mapping
from input and output of an executor call. This fixes an issue
https://github.com/Qiskit/qiskit-aer/issues/1723.

* add index of AER::Circuit and ExperimentResult

* add a link to an input circuit in each experiment result
2023-06-07 14:12:12 +09:00
Hiroshi Horii 747bf6da94
Validate parameters of each gate in a circuit (#1834)
This commit adds checks of arguments (A number of qubits, clbits,
and parameters) for each gate to prevent from unexpected memory access
when a user defines wrong custom gate with a number of a standard gate.

* validate parameters of each gate in a circuit
* fix lint error
* fix lint error
2023-06-06 20:47:16 +09:00
Ikko Hamamura 91a60b7e39
Fix the grouping index bug in Estimator (#1839)
* Fix the bug

* lint
2023-06-06 04:48:03 +00:00
Ikko Hamamura 9ee3997f27
Warn if approximation=False and shots=None in Estimator (#1823)
* fix 1820

* rm unnecessary comment

* update docs

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2023-06-06 00:30:03 +00:00
Eric Arellano 11c2c6c5b7
Upgrade to qiskit_sphinx_theme 1.12 (#1822) 2023-06-05 17:17:27 +00:00
David Liu b6cc4a24a6
Fix Renew example codes in README #1806: qiskit.providers.ibmq is deprecated; ibmq_athens is not available (#1831)
* Fix REAM #1896 qiskit.providers.ibmq is deprecated;

* In README example, simplify code to get aersim_backend

* Update README.md remove shots=1000

* use FakeManilaV2

* Update README.md import Fake backend in the beginning

* Update README.md remove unneeded IBM_Providers import.

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2023-06-05 15:32:41 +00:00
Oleksii Borodenko d954a88765
Fix typos in aer_simulator, qasm_simulator docs (#1833)
* Fix typos.

* Add missing aer_simulator options.

* Update reference to SaveProbabilities according comment to PR.
2023-06-05 13:46:35 +00:00
Davide Gessa 78adea5e4f
Use transpile and run instead of execute in docstring (#1830)
* use transpile and run instead of execute in docstring

* use backend.run instead of execute in README

* use fake_provider for noise_model example

* Revert edits on README.md

* Update examples in docstring for qiskit_aer.noise

* Fix depolarizing noise model example

* Remove incorrect markup in noise/__init__.py

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2023-06-05 10:22:37 +09:00
INNAN Nouhaila 309c009aa2
Fixing some typos (#1827)
* Update aer_densitymatrix.py

* Update aer_statevector.py

* Update README.md

* Update CONTRIBUTING.md

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2023-06-01 06:52:04 +00:00
Hitomi Takahashi 0fc19fd185
Set the number of qubits with the coupling map (#1825)
* Set n_qubits from coupling map

* Add a test and release notes

* Fix lint

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2023-05-31 18:14:42 +00:00
Hiroshi Horii 3954278265
check parameter_binds arguments for parameterized circuits (#1817)
Aer raises an error if `parameter_binds` is not specified though circuits have parameters.
This resolves the following issue:
https://github.com/Qiskit/qiskit-aer/issues/1773
2023-05-31 14:16:13 +00:00
Hiroshi Horii 8331cda27e
Support parameterized global phase (#1814)
* Support parameterized global phase

Though `ParameterExpression` can be set to `QuantumCircuit.global_phase`,
Aer does not bind parameter values to it in simulation phase. This commit fixes
this problem by resolving values of `global_phase` with specified `parameter_binds`
in `AerSimulator.run`.

* define AER::CONFIG::GLOBAL_PHASE_POS and its pybind
* fix lint issues
---------
Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2023-05-31 13:26:53 +09:00
Hiroshi Horii 9734f16741
fix fail of qobj run without run_options (#1792)
* fix fail of qobj run without run_options

* fix lint error

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-05-30 19:38:03 +00:00
Hiroshi Horii 6094006f5d
avoid kernel crash from blas call errors (#1791)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-05-30 18:12:03 +00:00
Hitomi Takahashi 4c722683fa
Add Getting Started page (#1780)
This commit adds documentation "Getting Started" page.

* Add Get Started page
* Remove unused class

---------
Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2023-05-30 16:19:34 +09:00
Toshinari Itoko eeec1af4b8
Fix handling of None in noise model construction from BackendV2 (#1818)
Fixes `NoiseModel.from_backend` not to fail when calling it with a V2 backend having
faulty qubits such that T1 and T2 are `None` in the `target.qubit_properties`. 

* fix handling of None in noise model construction from BackendV2
* add reno
* simplify a bit
* update docs
2023-05-22 11:06:36 +09:00
Hiroshi Horii e3a968f0a7
Add implicit cast of argument types (#1770)
* Add implicit cast of argument types

Since 0.12.0, AerConfig is used to configure simulation, which
is directly bound to a AER::Config object through pybind.
This change requires application to specify strictly correct types
of configuration options. This commit allows implicit casting
to arguments if application specifies them with wrong types.
This commit resolves https://github.com/Qiskit/qiskit-aer/issues/1754.

* does not warning in cast of numpy classes if they are compatible with expected type
* fix lint issue
* simplify class checking
2023-05-17 19:01:11 +09:00
Deji Oyerinde 7ac677e385
Update standard_errors.py (#1799)
There was a typo in the rendering of the mathematical text on Depolarizing Error Page (https://qiskit.org/ecosystem/aer/stubs/qiskit_aer.noise.depolarizing_error.html)

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-05-16 15:47:23 +00:00
Jun Doi b3022094d5
fix cuQuantum static linking (#1812)
Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2023-05-16 04:57:26 +00:00
Hiroshi Horii 11b6f4454d
Support `SwitchCaseOp` that will be released in qiskit-terra 0.24.0 (#1778)
* Add support of `SwitchCaseOp`

Qiskit-Terra added a new instruction of control-flow `SwitchCaseOp`.
This commit enables Aer to simulate `SwitchCaseOp` by converting
its conditions and bodies with `AerMark` and `AerJump`.

* add switch_case temporarily until qiskit-terra 0.24.0 is released.
* simplify switch compilation
* use SwitchCaseOp of terra
* fix lint errors
2023-05-16 12:23:56 +09:00
Eric Arellano 334c894de9
Activate jQuery in docs (#1802)
Sphinx 6 no longer activates jQuery by default but `qiskit_sphinx_theme` still uses it.
This commits enables jQuery by adding the theme to extensions in conf.py.

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2023-05-12 11:39:13 +09:00
Jun Doi d40f735bc2
Fix library path to cuQuantum and cuTENSOR (#1801)
Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2023-05-10 13:20:56 +00:00
Jun Doi d23210d88d
Fix setting MPI processes and ranks (#1808)
0.12.0 accidentally removed MPI support if application does not use qobj. This commit reverts the change.
2023-05-10 18:21:20 +09:00
Ikko Hamamura da1623ea0c
Remove Sampler.close, assert DeprecationWarning of opflow, and update dependency (#1804)
Since qiskit-terra 0.24, `Sampler` does not have `close()` but Aer's `Sampler` still have the method. This commit takes the method as well as upgrade of Python versions in tutorial tests from 3.7 to 3.8.

* rm close
* assert DeprecationWarning
* update dependency
2023-05-10 13:41:13 +09:00
Hiroshi Horii 529e20ea61
Remove REQUIRED to find PythonLibs in FindPybind11 (#1786)
* pin the version of scikit-build to 0.17.2

* Pin scikit-build version by 0.17.2

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* remove REQUIRED to find PythonLibs in FindPybind11

---------

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
2023-05-01 12:30:26 +00:00
Hiroshi Horii c3070fbecd
Resolve regression from introduction of AER::Config (#1747)
This commit reduces redundant copy in `AER::Transpile::CircuitOptimization`.
Since 0.12.0, configuration is `AER::Config` instead of `json_t`. This new class
has many fields and then its copy overheads become high. Reduction of
redundant copy improves performance especially for low-qubit simulation.
2023-04-20 10:26:21 +09:00
Hitomi Takahashi d0afd00e70
Add API docs for QuantumCircuit methods (#1753)
* Add new doc for circuit method apis

* Remove QuantumCircuit description

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2023-04-18 15:05:25 +01:00
Hiroshi Horii 269fbce8ef
Fix wrong set of parameters in circuits with barriers (#1775)
* Fix wrong set of parameters in circuits with barriers

`AerCircuit` is created from a circuit by iterating its instrucitons
while skpping barrier. This leads inconsistency with positions of
parameter bindings. This commit adds barrier instruction to the class
and keeps positions of parameter bindings.

* fix lint error in test

* remove unused variable in test
2023-04-12 11:39:14 +01:00
Jonathan Coates bfc0dbcd39
Defer gathering backends until they are needed (#1760)
* Defer gathering backends until they are needed

* Disable the not-an-iterable warning

Pylint infers _get_backends to always return None, even if we add type
annotations. Suppress the warning.

* Add @staticmethod to AerProvider._get_backends

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2023-04-06 23:11:50 +00:00
Hitomi Takahashi fd8ada5d82
Add Tutorials to Documentation Page (#1768)
* Add tutorials

* Add pandoc installation

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2023-04-05 03:29:22 +00:00
Ikko Hamamura 1b866c6ad0
Correct a type of variance from complex to real (#1767)
Previously Aer Estimator wrongly returned a complex value as variance of estimation values.
This commit fixes this behavior to return a real value.
2023-03-30 00:03:48 +09:00
Ian Hincks bdd49de52a
Ensure QuantumCircuit.metadata is always a dict (#1761)
* Ensure QuantumCircuit.metadata is always a dict

This is for compatibility with https://github.com/Qiskit/qiskit-terra/pull/9849

* fix order

* fix typo :(

* revert object->object() change

* make backportable
2023-03-27 16:36:31 +00:00
Hiroshi Horii f0d02e4e5a
use `omp_set_max_active_levels` instead of `omp_set_nested` (#1752)
omp_set_nested was deprecated since OpenMP 3.0 and this commit
replaces it with omp_set_max_active_levels.

* use omp_set_max_active_levels instead of omp_set_nested
* use omp_set_nested in WIN
* Update releasenotes/notes/use_omp_set_max_active_levels-7e6c1d301c4434a6.yaml
* use _OPENMP to select omp_set_max_active_levels or omp_set_nested
---------

Co-authored-by: Jake Lishman <jake@binhbar.com>
2023-03-23 10:20:51 +09:00