Commit Graph

1553 Commits

Author SHA1 Message Date
Jun Doi ba9eb905ff
Add simulator_metadata in metadata of SamplerV2 (#2109)
Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2024-05-24 14:53:05 +09:00
Hiroshi Horii b706ee1c74
Always hook omp functions in Mac (#2128)
* always hook omp functions in Mac

* fix recent test failures with the latest qiskit

---------

Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2024-05-21 10:55:03 +09:00
Jun Doi 4d330e47d1
Disable test shot_branching on MacOS (#2143)
* remove test_shot_branching

* disable sho_branching tests on MacOS

* fix test

* fix test

* format

* fix test_shot_branching

* fix test_runtime_parameterization
2024-05-20 21:59:05 +09:00
Matthew Treinish c3c32b6bed
Remove qiskit aer translation stage (#2142)
This commit removes the qiskit aer translation plugin. This was added as
a workaround for a Qiskit/qiskit#11351. This has been fixed in Qiskit
since 0.45.2 and is no longer necessary. The mechanism by which the
workaround worked was unsound in practice as it was mutating the target
and also explicitly using private attributes of the Target. This is
causing real issues now as it only worked by assuming the target wasn't
shared between passmanagers which is never guaranteed. Similarly the
reliance on internal private attributes of the Target class will cause
issues in the future when the target internals change (see
Qiskit/qiskit#12292). This commit opts to remove the plugin in its
entirity as it's no longer necessary and actively causing issues with
Qiskit 1.1 and transpiling targeting aer backends with >1 circuit. As
it's private internal detail there isn't a release note.

Fixes Qiskit/qiskit#12425
Fixes #2141
2024-05-20 11:09:37 +09:00
Jun Doi 18987e0129
fix tests for the latest Qiskit (#2138) 2024-05-14 17:06:26 +09:00
Jun Doi 83c14459c7
Fix issue 2084 again (#2119)
* Fix issue 2084 again

* format

* fix test

* fix test
2024-05-08 12:31:28 +09:00
Jun Doi 7b9371914d
Replace example in README to using primitives (#2105)
* Replace example in README to using primitives

* upgrade python version to 3.10 for github actions

* fix 3.10

* fix 3.10

* upgrade python version to 3.10 for github actions

* skip 3.8 and 3.9 for MacOS arm64

* skip 3.8 and 3.9 for MacOS arm64

* skip 3.8 and 3.9 for MacOS arm64

* replace macos-latest with macos-13

* Revert "Replace example in README to using primitives"

This reverts commit b536563851.

* Revert "Revert "Replace example in README to using primitives""

This reverts commit 807ac6f81b.

* manually merge upstream

* add example using noise model

* remove print(result)
2024-04-26 11:19:32 +09:00
Jun Doi 6f04eb8a0a
Fix CI failures (#2106)
* upgrade github actions for macos_arm64 and windows

* skip pp38/39

* exclude pp

* fix doc

* test

* remove CIBW_TEST_SKIP for wheel
2024-04-25 16:00:41 +09:00
Jun Doi 2150983ebd
Fixes for dependency issues caused by 0.14 release (#2094)
* Fixes for dependency issues

* lint

* lint

* lint

* fix release note

* fix sampler

* fix sampler

* fix sampler

* fix sampler

* remove skip cp38

* hide primitives V2 for qiskit < 1.0

* lint

* add test case for sampling measure for large stabilizer circuit

* reduce warning

* replace test case for large stabilizer with GHZ circuit

* format

* format

* convert basis_gates from list to set

* fix assemble_circuits
2024-04-23 14:36:24 +09:00
Jun Doi f601733d43
Fix noise sampling on shot-branching (#2098)
* Fix noise sampling on shot-branching

* format

* fix runtime noise sampling

* remove copying branch

* fix batch GPU

* format

* set initial value to Op structure

* format

* format

* test

* test

* fix use of additional_ops.size()

* fix error

* fix remove_empty_branches

* test

* test

* test

* test
2024-04-22 16:59:43 +09:00
melechlapson 3b53bd0818
Update deprecated actions in workflows (#2102)
* updated GitHub actions

* attempted fix for breaking changes

* updated artifact name

* fixed typo

* switched to runs-on

* manually enter names

* switch to using github.job
2024-04-19 10:58:20 +09:00
melechlapson 2a448ba0ae
Use sphinx.ext.linkcode for more precise source code links (#2101)
* switched links to using sphinx.ext.linkcode

* added release note

* added check for qiskit methods

* remove whitespace

* removed regex subsitution

Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>

* Update tox.ini

Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>

* made updates following Eric's review

* made final line more readable

* cast filename to str

* re-added regex sub

---------

Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
2024-04-18 11:23:31 +09:00
Jun Doi cf510a2a45
Fix AerCompiler to use custom pass manager to decompose control flow ops (#2095)
* Fix AerCompiler to use basis_gates built from input circuit

* use custom pass manager to decompose dontrol flow ops

* remove unused import
2024-04-11 16:55:57 +09:00
Jun Doi c0420ea7b5
bump 0.15.0 (#2093) 2024-04-04 11:14:24 +09:00
Jun Doi e9c5737a94
Release Aer 0.14 (#2050)
* Aer 0.14

* add deprecation message standalone/qobj

* format

* added prelude

* correct release note

* merge upstream

* update deploy GPU
2024-04-01 18:01:55 +09:00
Jun Doi a29e7c9c9d
Implementing SamplerV2 (#2090)
* Implementing SamplerV2

* fix lint error

* fix test

* fix test

* fix test

* add options and function from_backend

* lint

* build test

* build test
2024-04-01 16:30:50 +09:00
Will Shanks bf34aef1d4
Remove unnecessary numpy build dependency (#2089)
numpy C bindings are handled through pybind11 which does not depend on
numpy. numpy is otherwise only a runtime dependency of qiskit-aer. This
change just saves a download during build.
2024-03-29 14:11:06 +09:00
Jun Doi 4609c28554
Add build test for GPU (#2081)
* Add build test for GPU

* decrease root size

* GPU test only run for Python 3.12

* update CUDA version to 12.4

* add release note

* fix test

* fix deploy
2024-03-28 20:00:35 +09:00
Ikko Hamamura 4f5495aa59
Add EstimatorV2 (#2088)
* add EstimatorV2

* lint

* stds

* add simulator_metadata

* improve rng

* backend_options and run_options

---------

Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2024-03-28 18:32:09 +09:00
Jun Doi b7e7dfa6b4
Adding ccz gate to statevector, unitary and tensor_network methods (#2087)
* Adding ccz gate to statevector, unitary and tensornetwork methods

* format

* Revert "format"

This reverts commit 789c5973b5.

* fix merge
2024-03-28 11:29:17 +09:00
Hiroshi Horii 1e01a47e73
Support `bit_not` for `Bool` type (#2076)
* support bit_not for Bool type

* add reno

* add test for bix_xor
2024-03-25 14:33:46 +09:00
Jun Doi 7ea1c1ab9d
Fix name of AerSimulator generated by AerProvider (#2038)
* fix name of AerSimulator

* add test for backend name

* fix format of test

* fix for device=Thrust case

* fix aerprovider

* Remove fake backend test

---------

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2024-03-21 11:26:46 +09:00
Jun Doi cb3a4ffb1f
Parallelize sampling measure (#2049)
* parallelize sampling measure

* replace BitVector to SampleVector is special class for sampling measure

* format

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2024-03-19 22:06:46 +09:00
Jun Doi 76b1042b1c
Fix fusion CostBasedFusion::aggregate_operations (#2075)
* Fix fusion CostBasedFusion::aggregate_operations

* format
2024-03-07 16:40:22 +09:00
Monit Sharma e3ef1c2b19
Updated First Tutorial (#2079) 2024-03-06 14:09:48 +09:00
Jun Doi 74e4397d57
Fix qiskit-aer/library/save-instructions/save_data.py (#2064)
* fix qiskit-aer/library/save-instructions/save_data.py

* Remove unsupported qiskit-ibmq-provider from docs job

The tox docs job definition was previously installing the
qiskit-ibmq-provider which is no longer supported and the project is
orphaned. This commit fixes this by removing the unnecessary dependency.

* change build wheel

* test

* test

* Revert "change build wheel"

This reverts commit 23cdf3cb08.

* add use-pep517 to symengine

* add use-pep517 to symengine on Windows

* skip build test for Windows

* test

* test

* test

* test-skip windows and i686

---------

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
2024-02-28 18:34:47 +09:00
Jun Doi 5991cf8ee3
Fix required memory estimation for MPS (#2059) 2024-02-20 23:22:33 +09:00
Eric Arellano 608eacbeb3
Remove qiskit.org links (#2057) 2024-02-13 09:52:25 +09:00
Matthew Treinish d0cb5d96e8
Only run sdist build after wheel builds are uploaded (#2054)
This commit changes the configuration of the deploy workflow to install
the sdist last. Publishing the sdist first causes disruption for
downstream projects that are using qiskit aer in CI as pip will eagerly
try to download the latest version even if only an sdist is present for
it. To avoid disruption for downstream users this updates the sdist job
to run only after we've uploaded the wheels for the tier 1 platforms to
pypi (which is what most people are running in CI).
2024-02-06 21:15:43 +00:00
Jake Lishman 03221acdaa
Prepare for Qiskit 1.0 (#2047)
* Resolve CI dependencies in a single step and add qiskit==1.0.0rc1 job

This modifies the dependency-resolution steps to do their job in a
single step; Aer should have no dependencies pinning Qiskit, so we can
use the preferable form more eagerly.

This also adds a test run to the PR CI for Qiskit 1.0.0rc1 (or rc2, etc)
that always runs, so Aer doesn't regress.

Co-authored-by: Luciano Bello <bel@zurich.ibm.com>

* Fix test suite to work with Qiskit<1.0 and >=1.0

This commit *does not* touch the primitives, which appear to be broken
at a relatively basic level with Qiskit 1.0 - hopefully the primitives
team can fix that separately.

This modifies the test suite to work with both Qiskit 0.46 and 1.0.0rc1
simultaneously.  Unfortunately, some of the new-style fake backends
aren't in 0.46, so I just put in some import switches for my ease here.
A few tests, particularly in the noise model sections, were asserting
specific things about the properties/calibrations of Terra's fake
backends, which was quite fragile already, so in those particular cases
I replaced them with a manually constructed `Target` with properties
entirely under Aer's control.

* Run black

---------

Co-authored-by: Luciano Bello <bel@zurich.ibm.com>
2024-02-02 16:31:05 -05:00
Ian Hincks 9f45068975
Add private primitive attributes removed by qiskit (#2048)
* Add private primitive attributes removed by qiskit

* wrong url

* call private submit method

* Make submission compatible with qiskit <=0.45

* Skip Operator test is qiskit >=1.0

* grr lint
2024-02-02 18:15:55 +00:00
Jun Doi 9a69eb4411
remove import execute (#2041) 2024-02-02 15:09:27 +09:00
Will Shanks f2e38947d9
Remove muparserx from cmake configuration (#2045) 2024-02-02 10:28:12 +09:00
Jun Doi 6f375e3418
Remove remaining diagonal, isometry and uc (#2040)
* Remove remaining diagonal

* remove unused import transpile, replace isometry, uc to Isometry, UCGate

* format
2024-01-29 20:58:07 +09:00
Jun Doi cd478c2077
Fix test cases for Qiskit 0.45.2 (#2035)
* fix test cases for Qiskit 0.45.2

* format

* revert  testtools.TestCase to unittest.TestCase
2024-01-23 13:23:57 +09:00
Matthew Treinish d7025decbd
Fix GPU wheel builds on release (#2034)
For the previous few releases the GPU wheel builds have failed to
upload. The root cause of this issue was that an earlier CI stage was
deleting on the locally cached docker images to free up space for
installing CUDA and all the GPU build requirements in the test VM.
Removing these docker images prevented the upstream action we run to
publish the wheels from working as it relied on having a docker image
available that couldn't be fetched from the default image repository.
This commit fixes this issue for future releases by ensuring we don't
delete the local docker cache in the GPU publish jobs. For the 0.13.2
releases this was manually applied and run to publish the wheels and
this PR is applying the fix for future releases.
2024-01-18 10:23:05 +09:00
Jun Doi 08b07ce461
Fixes of tests for the latest Qiskit (#2026)
* fix test_aer_statevector

* fix daily test

* remove test case test.terra.states.test_aer_statevector.TestAerStatevector.test_number_to_latex_terms because of deprecation

* add release note and remove temporal on push
2024-01-16 06:24:02 +00:00
Matthew Treinish ee519697b5
Add support for running with Python 3.12 (#2022)
* Add support for running with Python 3.12

Python 3.12.0 was released on 10-02-2023, this commit marks the start
of support for Python 3.12 in qiskit-aer. It adds the supported Python
version in the package metadata and updates the CI configuration to run
test jobs on Python 3.12 and build Python 3.12 wheels on release.

* Remove numpy constraints

* Uncap six

* Fix i686 build steps

* Use python 3.12.0 in tests to work around unittest breakage in 3.12.1

* Use 3.12.0 for all test jobs

---------

Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2024-01-15 15:13:47 +00:00
Daniel Rodríguez L c5339462df
Parallelize sampling measurement in MPS (#1911)
* mps parallel prob meas + test

* code style and releasenote for PR

* fix C3016

* change test to support windows python3.8

* Update releasenotes/notes/parallel-probabilistic-measurement-mps-ec00a896a0322213.yaml

Co-authored-by: merav-aharoni <merav@il.ibm.com>

---------

Co-authored-by: Jun Doi <doichan@jp.ibm.com>
Co-authored-by: merav-aharoni <merav@il.ibm.com>
2024-01-10 13:03:27 +09:00
Daniel Rodríguez L 86a27e3faa
Add support for BLAS SVD functions in MPS simulation (#1897)
* add lapack svd method + test

* forgot to unset env variable in test

* fix seg fault bc arrays were too big

* code style and releasenote for PR

* address microsoft C2131?

* style + another C2131

* missing free

* change test to support windows python3.8

* Update releasenotes/notes/compute-svd-with-lapack-3ee992d371d653d1.yaml

Co-authored-by: merav-aharoni <merav@il.ibm.com>

* remove unnecessary comments

* undo ifdef DEBUG

* automatic selector for QR or D&C in LAPACK SVD

* codestyle, enable MPS lapack using run_options

---------

Co-authored-by: merav-aharoni <merav@il.ibm.com>
Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2024-01-10 09:56:12 +09:00
Hiroshi Horii 0f3acb4452
enable bit operations for boolean types (#2024)
Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2024-01-09 06:35:06 +00:00
Arnau Casau 11e8f78bb5
Deploy docs to GitHub Pages (#2018)
Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2024-01-09 05:45:46 +00:00
Julien Gacon e6aaf03060
Remove usage of ``qiskit.extensions`` (#2023)
The module has been pending deprecation since Qiskit 0.45.
It is deprecated for 0.46 and removed in 1.0.

This removal concerns the import location of ``UnitaryGate`` and the
usage of the ``ExtensionError``. The first is easily fixed, whereas for
the latter I tried using ``ValueError`` or ``TypeError``, which seemed
to cover the error meanings. Technically, this is a breaking change and
we could introduce an intermediary class that inherits from the deprecated
``ExtensionError`` and the new choice of error. However, since we will
soon be changing to 1.0 and we also skipped this in Qiskit Terra (as we
thought it highly unlikely that users are actually relying on this error
type) it might be fine to just change the error type.
2024-01-09 13:22:23 +09:00
Jun Doi 180a0b6431
Reduce warning meesages (#2013)
* reduce warning meesages

* format

* fix Windows

* uint -> uint_t

* fix Thrust seg fault

* format
2023-12-22 15:06:32 +09:00
Jun Doi f7fcbc2b4c
Fix GPU batched execution (#2014)
* Fix GPU batched execution

* format
2023-12-22 13:04:40 +09:00
Will Shanks 766ad5e1c7
Use Apple-specific API to determine system memory on macOS (#2016)
The unistd.h API that had been used for both Linux and macOS is not
always available in macOS environments, for example when building with
upstream clang rather than AppleClang.

Closes https://github.com/Qiskit/qiskit-aer/issues/1923
2023-12-19 13:31:27 +09:00
Jun Doi 49667a01c6
Remove qiskit.test from test/common.py (#1971)
* remove qiskit.test from test/common.py

* fix format, add releasenote

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2023-12-08 14:45:45 +00:00
Jun Doi 096e1e33a1
Avoid accessing GPUs when using CPU only (#2012)
* avoid accessing GPUs when using CPU only

* remove unused import/parameter
2023-12-08 22:47:38 +09:00
Will Shanks 17edfa384e
Add CMake option `USE_BUNDLED_BLAS_WIN` (#1940)
This option controls whether CMake uses the bundled OpenBLAS library
when building on Windows (defaults to True). Having this option allows a
user to build qiskit-aer against a different system BLAS without needing
to specify a full path using the `AER_BLAS_LIB_PATH` option.

Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2023-11-29 01:37:43 +00:00
Jun Doi 893461c682
raise Qiskit dependency to 0.45.0 (#2008)
Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2023-11-29 09:56:19 +09:00