Commit Graph

321 Commits

Author SHA1 Message Date
Jun Doi dd7a261fb0
Truncate save_expval (#2216)
* truncate save_expval

* fix truncation

* fix truncation

* add num_original_qubits to aer_circuit to get num_qubits without ancilla qubits

* Fix adding qubitset

* add test case, release note and fix docs

* fix doc

* fix doc

* fix doc

* fix doc

* fix doc

* fix doc

* fix doc

* fix doc

* change truncation strategy

* format

* remove print

* no truncation when circuit is empty

* Update VERSION.txt

revert to 0.15.0

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2024-09-12 18:27:07 +09:00
Jun Doi 697535985c
Revert NoiseModel.from_dict (#2222) 2024-09-12 17:52:30 +09:00
Jun Doi 707dbdf733
Fix tests Aer 0.15 in the latest environments (#2223)
* qiskit 1.0.0rc1 -> 1.3.0b1

* test

* test

* fix tutorial

* add release note
2024-09-12 16:05:23 +09:00
Jun Doi 11a89c4213
Release 0.15 (#2204)
* Release 0.15

* add deprecation warnings to V1 primitives

* lint
2024-08-23 10:17:20 +09:00
Jun Doi c5a285b169
Restore MacOS Arm64 for Python 3.8 and 3.9 (#2169)
* Restore MacOS Arm64 for Python 3.8 and 3.9

* upgrade version of numpy and cvxpy

* fix test

* modify settings as same as main branch

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2024-08-22 18:55:42 +09:00
Jun Doi 1b2cbbd843
Fix parameter array initialization for runtime parameter binding (#2209)
* Fix parameter bind

* lint

* add test case
2024-08-22 18:10:35 +09:00
Jun Doi eaba16ca42
Remove standalone and qobj (#2187)
* Remove standalone and qobj

* format

* remove unused imports

* remove unused imports

* restore neccesary files

* remove AerJobSet

* remove assemble

* format

* resolve conflict

* lint

* lint

* remove dask ref in release note

* remove dask ref in release note
2024-08-20 23:31:34 +09:00
Takashi Imamichi 0bcc6e5ee7
Update metadata of Primitives V2 (#2206)
* Update metadata of Primitives V2

* add reno

* fix lint

---------

Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2024-08-19 11:48:01 +09:00
Jun Doi 44bd7eba59
Fixes for Qiskit 1.2 (#2201)
* remove configuration and properties from AerBackend

* lint

* lint

* lint

* fix qasm_simulator

* fix qasm_simulator

* fix target

* merge code from #2187 partialy to reduce deprecation warnings

* lint

* fix qasm_simulator

* fix test_sampler_v2

* add configuration and properties in Aer

* lint

* lint

* lint

* lint

* fix set_max_qubits

* test unite-test-latest-qiskit

* remove transpile when unitary gates are in circuits

* fix test

* restore unittest for latest qiskit

* add releasenote
2024-08-15 09:52:00 +09:00
Jun Doi 9fe6be7216
Fix from backend of V2 primitives to use existing AerSimulator (#2173)
* Fix from_backend of V2 primitives to use existing AerSimulator

* add reno, fix format

* delete print for debug

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2024-07-08 15:06:42 +09:00
Luciano Bello ad1209b2de
Remove Provider superclass, as it is deprecated in Qiskit 1.1 (#2184)
* Fixes #2178

* linting

---------

Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2024-07-08 14:14:49 +09:00
Hiroshi Horii 9a4f283db2
Support `Store` and storage `Var` (#2028)
* support store and storage var

* add test to store cr with cr

* set qiskit 1.1.0rc1 for test

* fix lint

* add reno

---------

Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2024-06-17 10:41:55 +09:00
Hiroshi Horii fb9153451a
fix bit mapping inconsistency in inline of AerCompiler (#2175)
* fix bit mapping inconsistency in inline of AerCompiler

* fix lint

---------

Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2024-06-15 18:14:26 +09:00
Takashi Imamichi 7a4360ffd4
Update SamplerV2 and EstimatorV2 to be compatible with those of Qiskit 1.1 (#2150)
* Update SamplerV2

* Update SamplerV2 to be compatible with SamplerV2 of Qiskit 1.1

* update test_sampler_v2

* simplify tests and revert common.py

* update EstimatorV2 and tests

* reno

---------

Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2024-06-14 17:32:19 +09:00
Christopher J. Wood 6f2010718d
Pauli lindblad error (#2157)
* Add PauliLindbladError with C++ support

Adds a BaseOperator subclass for efficiently working with Pauli channels generated by lindblad dissipators, and add support from sampling from these in Aer simulation.

* Add reno and tests

* Fix some extra compiler warnings

* Fix typo in doc string
2024-06-07 13:16:08 +09:00
Christopher J. Wood 4a5e830d01
Add optimized `PauliError` quantum error operator class (#2156)
* Add optimized PauliError pauli channel operator

* Add PauliError tests

* Add reno

* Add more unit tests

* Move sort to helper function

* Improve doc string

* Add settings for runtime JSON encoder
2024-06-06 15:36:16 +09:00
Jun Doi 18ef494c30
Fix AerBackend.set_max_qubits (#2159)
* Fix AerBackend.set_max_qubits

* add release note
2024-06-05 09:57:00 +09:00
Jun Doi 33f77c5e97
Move delay gate to custom instructions (#2153) 2024-05-30 18:14:17 +09:00
Jun Doi 0e7d65822f
Add support for ECR gate to MPS (#2137)
* Add support for ECR gate

* replace is not to !=

* fix release note

* Fix ecr implementation for stabilizer/extended-stabilizer
2024-05-29 13:05:44 +09:00
Jun Doi 7111188c95
Fix init of EstimatorV2 and SamplerV2 (#2120)
* fix init of EstimatorV2 and SamplerV2 to handle method

* add release note

* fix from_backend and example in README

* remove setting density_matrix
2024-05-28 16:42:46 +09:00
Jun Doi 3cc6932401
Fix deterministic measure of stabilizer (#2132)
* Fix deterministic measure of stabilizer

* fix accumulation in loop

* format

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2024-05-28 14:28:34 +09:00
Jun Doi 5e9be0b30c
Add support for rotation gates (#2147)
* add rotation gates

* add cr* gates to operations.hpp

* fix test for stabilkize/extended-stabilizer

* fix test again
2024-05-28 13:39:49 +09:00
Jun Doi 83d679efd5
Fix cuStateVec_enable option (#2146)
* Fix cuStateVec_enable option

* fix function name
2024-05-24 16:32:52 +09:00
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 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 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 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 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
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
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 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
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
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
Jun Doi f7fcbc2b4c
Fix GPU batched execution (#2014)
* Fix GPU batched execution

* format
2023-12-22 13:04:40 +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 ce27d7052e
Fix AerBackend issues caused by upgrading BackendV2 (#1995)
* add description if no description is provided, build coupling map if it is provided

* move import line

* fix target for simulator backend

* format

* remove unused import

* use translation plugin to rebuild gate sets for simulator

* rename plugin

* rebuild of gate sets is eanbled only for opt level 0 and 1

* fix custom pass manager

* fix pass_manager function

* added ccx in NAME_MAPPING

* added missed gates in NAME_MAPPING

* added release note

* add check if opnodes is None

* add check config

* decrease return

* check opt level

* fix searching ops in control flow blocks

* Update qiskit_aer/backends/plugin/aer_backend_plugin.py

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

* Update qiskit_aer/backends/plugin/aer_backend_plugin.py

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

* refer review comments

* remove unused import

---------

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
2023-11-24 15:03:29 +09:00
eliotheinrich 0de759ef37
Fix extended stabilizer thread safety in apply_ops_parallel (#1993)
* Extended stabilizer simulator no longer shares RngEngine amongst states when ops are applied in parallel

* Added release note

* Fixed ugly cast

---------

Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2023-11-24 01:48:35 +00:00
Jun Doi 7adacaad36
Reverse ordering to read out error in sampling measure (#2003)
* reverse ordering of read out error in sampling measure

* fix batch check

---------

Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2023-11-22 04:43:00 +00:00
Matthew Treinish 6f0b94f489
Directly use psutil to get total system memory (#2002)
Currently Aer is using Qiskit's local_hardware_info() function which to
determine the total amount of system memory which is used to compute the
largest statevector the system can build. However, this function wasn't
really intended to be used outside of Qiskit and also Qiskit is looking
to remove the memory reporting (see: Qiskit/qiskit#11254). This commit
just pivots to using psutil directly which is what qiskit is doing
internally.
2023-11-21 13:00:10 +09:00