qiskit-aer/test/terra/backends/aer_simulator
Elena Peña Tapia f77dbd3863
Update BaseEstimator import to support qiskit 2.0 (#2327)
* Use versioned base class for BaseEstimatorV1 instead of deprecated unversioned alias

* Vendor removed V1 utils

* Fix black

* Replace bit with qubit

* Remove assemble test, as assemble was deprecated in 1.4 and removed in 2.0

* Treat header as dict

* Handle header conditionally

* c_if is removed in 2.0, keep functionality for compatibility with 1.4 but remove use in tests

* Fix access to header in tests

* Remove use of instruction_durations in transpile

* Attempt at fixing custom gate mapping. Not sure if gate = None is accepted as a gate definition

* IfElseOp is not supported by statevector simulator. Reverted uni tests to c_if and added a conditional skip depending on qiskit version

* Remove wrong import

* Fix failed target construction

* Only run tests with c_if with qiskit<2

* Address leftover custom basis gates in transpiler

* Attempt at addressing .duration removal

* Add unittest import missing in previous commit

* Use new target arg in tests for relaxation noise pass

* Fix lint

* Don't use target with backend props

* Attempt at fixing relaxation pass

* use hashable type

* Fix issue with pickle/dill (temporary skip of fractional gates)

* Add missing c_if skip

* Skip transpilation to avoid qiskit bug in test

* Skipping transpilation affects results

* Update truncation test. This test was relying on the transpiler blowing up the circuit to an arbitrary coupling map, which is something independent of the enable_truncation flag. The test now skips transpilation and exclusively tests the truncation (with enable_truncation=True, the test returns 2 instead of 4 qubits)

* Apply suggestion to use shots None

* Get rid of shot noise

* Improve truncation test

* Assert number of active qubits
2025-03-13 10:27:39 +01:00
..
__init__.py add code-formatting with black for python and with clang-format for c++ (#1630) 2023-03-13 20:19:06 +00:00
test_algorithms.py Update BaseEstimator import to support qiskit 2.0 (#2327) 2025-03-13 10:27:39 +01:00
test_auto_method.py Change priority of method selection of noise simulation (#1989) 2023-11-08 22:58:56 +09:00
test_chunk.py fix tests for the latest Qiskit (#2138) 2024-05-14 17:06:26 +09:00
test_circuit.py Update BaseEstimator import to support qiskit 2.0 (#2327) 2025-03-13 10:27:39 +01:00
test_cliffords.py Handle gates with ctrl_stete=0 (#2148) 2024-05-30 11:22:15 +09:00
test_conditional.py Update BaseEstimator import to support qiskit 2.0 (#2327) 2025-03-13 10:27:39 +01:00
test_control_flow.py Update BaseEstimator import to support qiskit 2.0 (#2327) 2025-03-13 10:27:39 +01:00
test_executors.py Update BaseEstimator import to support qiskit 2.0 (#2327) 2025-03-13 10:27:39 +01:00
test_fusion.py Update pylint version (#2158) 2024-05-31 10:13:11 +09:00
test_initialize.py Applying global phase multiplication to initialize operation (#1980) 2023-11-01 18:39:44 +09:00
test_measure.py Fixes for Qiskit 1.2 (#2201) 2024-08-15 09:52:00 +09:00
test_metadata.py Update BaseEstimator import to support qiskit 2.0 (#2327) 2025-03-13 10:27:39 +01:00
test_multiplexer.py add code-formatting with black for python and with clang-format for c++ (#1630) 2023-03-13 20:19:06 +00:00
test_noise.py Fix legacy accesses of `CircuitInstruction` in tests (#2191) 2024-07-12 10:17:22 +09:00
test_non_cliffords.py add code-formatting with black for python and with clang-format for c++ (#1630) 2023-03-13 20:19:06 +00:00
test_options.py Fixes for Qiskit 1.2 (#2201) 2024-08-15 09:52:00 +09:00
test_pauli_gate.py add code-formatting with black for python and with clang-format for c++ (#1630) 2023-03-13 20:19:06 +00:00
test_reset.py add code-formatting with black for python and with clang-format for c++ (#1630) 2023-03-13 20:19:06 +00:00
test_rotation.py Add support for rotation gates (#2147) 2024-05-28 13:39:49 +09:00
test_save_amplitudes.py add code-formatting with black for python and with clang-format for c++ (#1630) 2023-03-13 20:19:06 +00:00
test_save_density_matrix.py add code-formatting with black for python and with clang-format for c++ (#1630) 2023-03-13 20:19:06 +00:00
test_save_expval.py Fix for save_expval truncation (#2265) 2024-12-10 10:40:36 +02:00
test_save_matrix_product_state.py Fixed MPS save failure when memory limit is ignored (#2248) 2024-11-05 11:04:52 +02:00
test_save_probabilities.py add code-formatting with black for python and with clang-format for c++ (#1630) 2023-03-13 20:19:06 +00:00
test_save_state.py add code-formatting with black for python and with clang-format for c++ (#1630) 2023-03-13 20:19:06 +00:00
test_save_statevector.py Support save_statevector for QuantumCircuit from QASM3 string (#1846) 2023-07-10 06:00:43 +00:00
test_save_statevector_dict.py add code-formatting with black for python and with clang-format for c++ (#1630) 2023-03-13 20:19:06 +00:00
test_save_superop.py add code-formatting with black for python and with clang-format for c++ (#1630) 2023-03-13 20:19:06 +00:00
test_save_unitary.py add code-formatting with black for python and with clang-format for c++ (#1630) 2023-03-13 20:19:06 +00:00
test_set_state.py add code-formatting with black for python and with clang-format for c++ (#1630) 2023-03-13 20:19:06 +00:00
test_shot_branching.py Update BaseEstimator import to support qiskit 2.0 (#2327) 2025-03-13 10:27:39 +01:00
test_standard_gates.py Adding ccz gate to statevector, unitary and tensor_network methods (#2087) 2024-03-28 11:29:17 +09:00
test_thread_management.py Change priority of method selection of noise simulation (#1989) 2023-11-08 22:58:56 +09:00
test_truncate.py Update BaseEstimator import to support qiskit 2.0 (#2327) 2025-03-13 10:27:39 +01:00
test_unitary_gate.py Fixes for Qiskit 1.2 (#2201) 2024-08-15 09:52:00 +09:00
test_wrapper_qasm_simulator.py add code-formatting with black for python and with clang-format for c++ (#1630) 2023-03-13 20:19:06 +00:00
test_wrapper_statevector_simulator.py Update BaseEstimator import to support qiskit 2.0 (#2327) 2025-03-13 10:27:39 +01:00
test_wrapper_unitary_simulator.py Fixes for Qiskit 1.2 (#2201) 2024-08-15 09:52:00 +09:00