Commit Graph

1597 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
Takashi Imamichi b306b8398b
Add `open_pulse` entry to `AerBackendConfiguration` (#2214)
* add open_pulse entry to AerBackendConfiguration

* add test
2024-08-30 18:38: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
Hiroshi Horii 32f3a477d1
run pip check again in macos CI (#2208) 2024-08-21 17:05:37 +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
Takashi Imamichi f6b232f239
Suppress Clang++ warnings on macOS (#2205)
* Suppress Clang++ warnings

* clang-format
2024-08-15 18:31:19 +09:00
ElHirad f1cf4df7eb
minor fix of aer_simulator.py (#2203)
Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2024-08-15 13:43:39 +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
Jim Garrison 2825e1f76d
Derive from `BaseSamplerV1` rather than `BaseSampler` (#2199)
This change is in accordance with the following warning
that is triggered by the Qiskit 1.2 rc:

> qiskit_aer/primitives/sampler.py:69: DeprecationWarning: The class ``qiskit.primitives.base.base_sampler.BaseSampler`` is deprecated as of qiskit 1.2. It will be removed no earlier than 3 months after the release date. The `BaseSampler` class is a type alias for the `BaseSamplerV1` interface that has been deprecated in favor of explicitly versioned interface classes. It is recommended to migrate all implementations to use `BaseSamplerV2`. However, for implementations incompatible with `BaseSamplerV2`, `BaseSampler` can be replaced with the explicitly versioned `BaseSamplerV1` class.

Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2024-08-13 12:03:07 +09:00
Takashi Imamichi ad7b86fa40
rewrite CircuitInstrution as iterable (#2198)
Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2024-08-09 18:48:32 +09:00
Hiroshi Horii b1709719af
Reduce `pip check` in CI test on Mac (#2200)
* bump up macos version from 13 to 14

* revert change of mac version and take pip check in mac test

* skip tests failed in CI due to qiskit 1.2
2024-08-09 18:04:54 +09:00
Jun Doi 5efea57354
cvxpy version < 1.5 (#2189) 2024-07-19 13:59:22 +09:00
Jun Doi 91142d7150
Add apply_initialize to AerState (#2196)
* Add apply_initialize to AerState, move initialize from BASIS_GATES to _CUSTOM_INSTR

* add custom instructions to evelve_instruction

* format

* fix custom instructions

* fix custom instructions
2024-07-18 20:43:51 +09:00
Jim Garrison 0388bca643
Fix legacy accesses of `CircuitInstruction` in tests (#2191)
This is a follow-up to #2179, with similar fixes in two tests.
2024-07-12 10:17:22 +09:00
Saman e56cbbbd97
fix undefined behaviors (#2130)
* fix undefined behaviours

* Run clang format 15 instead of 18

* OpenMP for statement must have signed integral type

---------

Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2024-07-09 16:25:27 +09:00
Saman 322e786b90
Fix performance hints generated by clang-tidy (#2131)
* Fix performance hints generated with clang-tidy

* Run clang format 15 instead of 18

---------

Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2024-07-09 11:14:52 +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
Jake Lishman f8d20213ee
Fix legacy accesses of `CircuitInstruction` (#2179)
Using Terra's `CircuitInstruction` like a tuple is a legacy access
pattern.  The pattern of using named access attributes was introduced
about two years ago, and the legacy format is about to be deprecated.
This fixes up the last couple of uses.

Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2024-07-05 14:01:22 +09:00
Jun Doi efda2eadb5
Fixes for recent CI failures (#2186)
* trying to fix CI failure

* change CUDA rpm to use RHEL8

* CentOS issue

* fix sed

* fix sed

* fix sed, merge fix for CUDA 12.5

* fix sed

* use scipy 1.13.1 to ignore neko error

* use scipy 1.13.1 to ignore neko error

* use scipy 1.13.1 to ignore neko error

* use scipy 1.13.1 to ignore neko error

* use scipy 1.13.1 to ignore neko error
2024-07-04 14:32:34 +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
Divyanshu Singh 2d4e101e45
Updated documents and tutorials which supports Qiskit 1.0 and Primitives V2 (#2160)
* making-them-work

* making-them-work

* reverting-first-tutorial-changes

* Reverting_changes_and_updating_it

* final_updated_working_file

* Update 3_building_noise_models.ipynb

* Update 4_custom_gate_noise.ipynb

* updated 5_noise_transformation

* added_few_things

* Update 5_noise_transformation.ipynb

* Update 6_extended_stabilizer_tutorial.ipynb

* Update 7_matrix_product_state_method.ipynb

* updated_setup

* fixes_references_issue

---------

Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2024-06-14 14:00:11 +09:00
M.C. (Chris) 5e40517f31
Fix example (#2162)
* Fix example

* unused import

* use SamplerV2 for sim

---------

Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2024-06-12 15:51:30 +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
Christopher J. Wood 18a2668bcc
Add `BaseQuantumError` class (#2155)
* Add BaseQuantumError class

Adds a `BaseQuantumError` parent class for `QuantumError` that is used by noise models and circuit insertion in preparation of adding additional optimized error classes for Pauli and Pauli Lindblad errors.

* Fixup Base Error

---------

Co-authored-by: Jun Doi <doichan@jp.ibm.com>
2024-06-05 13:18:43 +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
Christopher J. Wood 9bfd1105da
Update pylint version (#2158)
* Update pylint version

Updates pylint version and fixes linting errors and pylint config with updated version.

* Add pylint disable rather than change arg name

* Fix tests

* fix typo
2024-05-31 10:13:11 +09:00
Jun Doi 33f77c5e97
Move delay gate to custom instructions (#2153) 2024-05-30 18:14:17 +09:00
Takashi Imamichi 0591436639
fix random seed (#2151)
Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
2024-05-30 17:20:31 +09:00
Jun Doi 0062f646a3
Handle gates with ctrl_stete=0 (#2148)
* handle cx gate with ctrl_stete=0

* add handling *_o0, add test for cx_o0

* format

* fix test

* fix test

* fix test cx

* fix to handle multiple control states

* fix ctrl_state

* format

* resolve conflict again

* fix aer_compiler
2024-05-30 11:22:15 +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 0320a1467e
Fix deploy.yml (#2110)
Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
Co-authored-by: Luciano Bello <bel@zurich.ibm.com>
2024-05-28 17:28:55 +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 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