qiskit-aer/test/terra/reference
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
..
ref_1q_clifford.py add code-formatting with black for python and with clang-format for c++ (#1630) 2023-03-13 20:19:06 +00:00
ref_2q_clifford.py Handle gates with ctrl_stete=0 (#2148) 2024-05-30 11:22:15 +09:00
ref_algorithms.py Fix usage of QuantumCircuit.id (#1945) 2023-10-02 06:37:52 +00:00
ref_conditionals.py Update BaseEstimator import to support qiskit 2.0 (#2327) 2025-03-13 10:27:39 +01:00
ref_diagonal_gate.py Remove remaining diagonal, isometry and uc (#2040) 2024-01-29 20:58:07 +09:00
ref_initialize.py add code-formatting with black for python and with clang-format for c++ (#1630) 2023-03-13 20:19:06 +00:00
ref_kraus_noise.py Fix usage of QuantumCircuit.id (#1945) 2023-10-02 06:37:52 +00:00
ref_measure.py Fix usage of QuantumCircuit.id (#1945) 2023-10-02 06:37:52 +00:00
ref_multiplexer.py Update BaseEstimator import to support qiskit 2.0 (#2327) 2025-03-13 10:27:39 +01:00
ref_non_clifford.py add code-formatting with black for python and with clang-format for c++ (#1630) 2023-03-13 20:19:06 +00:00
ref_pauli_lindblad_noise.py Update BaseEstimator import to support qiskit 2.0 (#2327) 2025-03-13 10:27:39 +01:00
ref_pauli_noise.py Update BaseEstimator import to support qiskit 2.0 (#2327) 2025-03-13 10:27:39 +01:00
ref_readout_noise.py add code-formatting with black for python and with clang-format for c++ (#1630) 2023-03-13 20:19:06 +00:00
ref_reset.py add code-formatting with black for python and with clang-format for c++ (#1630) 2023-03-13 20:19:06 +00:00
ref_reset_noise.py Fix usage of QuantumCircuit.id (#1945) 2023-10-02 06:37:52 +00:00
ref_rotation.py Add rotation gates to stabilizer (#1938) 2023-09-19 14:51:36 +09:00
ref_save_expval.py Fix usage of QuantumCircuit.id (#1945) 2023-10-02 06:37:52 +00:00
ref_unitary_gate.py add code-formatting with black for python and with clang-format for c++ (#1630) 2023-03-13 20:19:06 +00:00