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
* 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)
* 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
* 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
* 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
* 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>
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.
* 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
* 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>
* parallelize sampling measure
* replace BitVector to SampleVector is special class for sampling measure
* format
---------
Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
* 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>
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).
* 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>
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.
* 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
* 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>
* 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>
* 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>
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.
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
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>