qiskit-documentation/docs/api/qiskit/release-notes/0.46.mdx

584 lines
50 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Qiskit 0.46 release notes
description: Changes made in Qiskit 0.46
in_page_toc_max_heading_level: 3
---
# Qiskit 0.46 release notes
## 0.46.3
<span id="relnotes-0-46-3-prelude" />
### Prelude
Qiskit 0.46.3 is a minor bugfix and backport release for the 0.46 series. It is also the last release of the 0.46 minor version, marking its end-of-life.
<span id="relnotes-0-46-3-bug-fixes" />
### Bug Fixes
* Fixed a missing decorator in [`C3SXGate`](/api/qiskit/0.46/qiskit.circuit.library.C3SXGate "qiskit.circuit.library.C3SXGate") that made it fail if [`Gate.to_matrix()`](/api/qiskit/0.46/qiskit.circuit.Gate#to_matrix "qiskit.circuit.Gate.to_matrix") was called. The gate matrix is now return as expected.
* The [`QuantumCircuit.parameters`](/api/qiskit/0.46/qiskit.circuit.QuantumCircuit#parameters "qiskit.circuit.QuantumCircuit.parameters") attribute will now correctly be empty when using [`QuantumCircuit.copy_empty_like()`](/api/qiskit/0.46/qiskit.circuit.QuantumCircuit#copy_empty_like "qiskit.circuit.QuantumCircuit.copy_empty_like") on a parametric circuit. Previously, an internal cache would be copied over without invalidation. Fix [#12617](https://github.com/Qiskit/qiskit/issues/12617).
* Fix the [`SolovayKitaev`](/api/qiskit/0.46/qiskit.transpiler.passes.SolovayKitaev "qiskit.transpiler.passes.SolovayKitaev") transpiler pass when loading basic approximations from an exising `.npy` file. Previously, loading a stored approximation which allowed for further reductions (e.g. due to gate cancellations) could cause a runtime failure. Additionally, the global phase difference of the U(2) gate product and SO(3) representation was lost during a save-reload procedure. Fixes [Qiskit/qiskit#12576](https://github.com/Qiskit/qiskit/issues/12576).
* The constructor [`GenericBackendV2`](/api/qiskit/0.46/qiskit.providers.fake_provider.GenericBackendV2 "qiskit.providers.fake_provider.GenericBackendV2") was allowing to create malformed backends because it accepted basis gates that couldnt be allocated in the backend size . That is, a backend with a single qubit should not accept a basis with two-qubit gates.
* Previously, [`DAGCircuit.replace_block_with_op()`](/api/qiskit/0.46/qiskit.dagcircuit.DAGCircuit#replace_block_with_op "qiskit.dagcircuit.DAGCircuit.replace_block_with_op") allowed to place an `n`-qubit operation onto a block of `m` qubits, leaving the DAG in an invalid state. This behavior has been fixed, and the attempt will raise a [`DAGCircuitError`](/api/qiskit/0.46/dagcircuit#qiskit.dagcircuit.DAGCircuitError "qiskit.dagcircuit.DAGCircuitError").
<span id="relnotes-0-46-3-other-notes" />
### Other Notes
* This release extends the constraints.txt file with a complete list of pinned version numbers of Qiskit 0.46.3 dependencies. As this release marks the end-of-life of the 0.46 version, this ensures a reproducible installation environment for it going forward based on the version specifications in constraints.txt.
<span id="relnotes-0-46-2" />
<span id="id3" />
## 0.46.2
<span id="relnotes-0-46-2-prelude" />
<span id="id4" />
### Prelude
Qiskit 0.46.2 is a minor bug-fix and backport release for the 0.46 series.
<span id="relnotes-0-46-2-new-features" />
### New Features
* This release of Qiskit finalizes support for NumPy 2.0. Qiskit will continue to support both Numpy 1.x and 2.x for the foreseeable future.
<span id="relnotes-0-46-2-bug-fixes" />
<span id="id5" />
### Bug Fixes
* Fixed an issue with the `circuit_drawer()` or `QuantumCircuit.draw()` when using the `mpl` output option where the program would hang if the circuit being drawn had a ControlFlow operation in it and the `fold` option was set to -1 (meaning no fold). Fixed [#12012](https://github.com/Qiskit/qiskit/issues/12012).
* The [`EvolvedOperatorAnsatz`](/api/qiskit/0.46/qiskit.circuit.library.EvolvedOperatorAnsatz "qiskit.circuit.library.EvolvedOperatorAnsatz") now correctly handles the case where the operators argument is an empty list. Previously, this would result in an error.
* From now on, [`EvolvedOperatorAnsatz`](/api/qiskit/0.46/qiskit.circuit.library.EvolvedOperatorAnsatz "qiskit.circuit.library.EvolvedOperatorAnsatz") will not have any qregs when thera are zero qubits, instead of having a [`QuantumRegister`](/api/qiskit/0.46/qiskit.circuit.QuantumRegister "qiskit.circuit.QuantumRegister") instance with zero qubits. This behavior aligns more consistently with its superclass [`QuantumCircuit`](/api/qiskit/0.46/qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit").
* The method [`Instruction.repeat()`](/api/qiskit/0.46/qiskit.circuit.Instruction#repeat "qiskit.circuit.Instruction.repeat") now moves a set [`condition`](/api/qiskit/0.46/qiskit.circuit.Instruction#condition "qiskit.circuit.Instruction.condition") to the outer returned [`Instruction`](/api/qiskit/0.46/qiskit.circuit.Instruction "qiskit.circuit.Instruction") and leave the inner gates of its definition unconditional. Previously, the method would leave [`ClassicalRegister`](/api/qiskit/0.46/qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") instances within the inner definition, which was an invalid state, and would manifest itself as seemingly unrelated bugs later, such as during transpilation or export. Fixed [#11935](https://github.com/Qiskit/qiskit/issues/11935).
* Fixed a floating-point imprecision when scaling certain pulse units between seconds and nanoseconds. If the pulse was symbolically defined, an unnecessary floating-point error could be introduced by the scaling for certain builds of `symengine`, which could manifest in unexpected results once the symbols were fully bound. See [#12392](https://github.com/Qiskit/qiskit/pull/12392).
* Fixed a bug in `qiskit.visualization.pulse_v2.interface.draw()` that didnt draw pulse schedules when the draw function was called with a [`BackendV2`](/api/qiskit/0.46/qiskit.providers.BackendV2 "qiskit.providers.BackendV2") argument. Because the V2 backend doesnt report hardware channel frequencies, the generated drawing will show no freq. below each channel label.
* The [`VF2Layout`](/api/qiskit/0.46/qiskit.transpiler.passes.VF2Layout "qiskit.transpiler.passes.VF2Layout") pass would raise an exception when provided with a [`Target`](/api/qiskit/0.46/qiskit.transpiler.Target "qiskit.transpiler.Target") instance without connectivity constraints. This would be the case with targets from Aer 0.13. The issue is now fixed.
* The default `init` plugin was not properly raising a [`TranspilerError`](/api/qiskit/0.46/transpiler#qiskit.transpiler.TranspilerError "qiskit.transpiler.TranspilerError") when called with an invalid optimization level.
* [`PassManager.run()`](/api/qiskit/0.46/qiskit.transpiler.PassManager#run "qiskit.transpiler.PassManager.run") will no longer waste time serializing itself when given multiple inputs if it is only going to work in serial.
* The OpenQASM 2.0 parser ([`qasm2.load()`](/api/qiskit/0.46/qasm2#qiskit.qasm2.load "qiskit.qasm2.load") and [`qasm2.loads()`](/api/qiskit/0.46/qasm2#qiskit.qasm2.loads "qiskit.qasm2.loads")) can now evaluate gate-angle expressions including integer operands that would overflow the system-size integer. These will be evaluated in a double-precision floating-point context, just like the rest of the expression always has been. Beware: an arbitrarily large integer will not necessarily be exactly representable in double-precision floating-point, so there is a chance that however the circuit was generated, it had already lost all numerical precision modulo $2\pi$.
<span id="relnotes-0-46-1" />
<span id="id6" />
## 0.46.1
<span id="relnotes-0-46-1-prelude" />
<span id="id7" />
### Prelude
Qiskit 0.46.1 is a minor bugfix release for the 0.46 series.
<span id="relnotes-0-46-1-bug-fixes" />
<span id="id8" />
### Bug Fixes
* Fixed an issue with [`convert_to_target()`](/api/qiskit/0.46/qiskit.providers.convert_to_target "qiskit.providers.convert_to_target") where the converter would incorrectly ignore control flow instructions if they were specified in the `BackendConfiguration.supported_instructions` attribute, which is the typical location that control flow instructions are specified in a [`BackendConfiguration`](/api/qiskit/0.46/qiskit.providers.models.BackendConfiguration "qiskit.providers.models.BackendConfiguration") object. Fixed [#11872](https://github.com/Qiskit/qiskit/issues/11872).
* Calling [`EquivalenceLibrary.set_entry()`](/api/qiskit/0.46/qiskit.circuit.EquivalenceLibrary#set_entry "qiskit.circuit.EquivalenceLibrary.set_entry") will now correctly update the internal graph object of the library. Previously, the metadata would be updated, but the graph structure would be unaltered, meaning that users like [`BasisTranslator`](/api/qiskit/0.46/qiskit.transpiler.passes.BasisTranslator "qiskit.transpiler.passes.BasisTranslator") would still use the old rules. Fixed [#11958](https://github.com/Qiskit/qiskit/issues/11958).
* [`BasePassManager.run()`](/api/qiskit/0.46/qiskit.passmanager.BasePassManager#run "qiskit.passmanager.BasePassManager.run") will no longer leak the previous [`PropertySet`](/api/qiskit/0.46/qiskit.passmanager.PropertySet "qiskit.passmanager.PropertySet") into new workflows when called more than once. Previously, the same [`PropertySet`](/api/qiskit/0.46/qiskit.passmanager.PropertySet "qiskit.passmanager.PropertySet") as before would be used to initialize follow-on runs, which could mean that invalid property information was being given to tasks. The behavior now matches that of Qiskit 0.44. Fixed [#11784](https://github.com/Qiskit/qiskit/issues/11784).
* Updated properties and configuration information of the [`FakeOpenPulse2Q`](/api/qiskit/0.46/qiskit.providers.fake_provider.FakeOpenPulse2Q "qiskit.providers.fake_provider.FakeOpenPulse2Q") backend. Missing gate properties were added for some gates defined in the pulse defaults so that the gates defined in the two locations are consistent.
* The monitoring tools module `qiskit.tools.monitor` (included in the now deprecated module [`qiskit.tools`](/api/qiskit/0.46/tools#module-qiskit.tools "qiskit.tools")) has been updated to work as expected. The function [`job_monitor()`](/api/qiskit/0.46/tools#qiskit.tools.job_monitor "qiskit.tools.job_monitor") now works with [`Job`](/api/qiskit/0.46/qiskit.providers.Job "qiskit.providers.job.Job") instances. The functions [`backend_overview()`](/api/qiskit/0.46/tools#qiskit.tools.backend_overview "qiskit.tools.backend_overview") and [`backend_monitor()`](/api/qiskit/0.46/tools#qiskit.tools.backend_monitor "qiskit.tools.backend_monitor") should now work as expected.
* [`InstructionDurations.from_backend()`](/api/qiskit/0.46/qiskit.transpiler.InstructionDurations#from_backend "qiskit.transpiler.InstructionDurations.from_backend") now returns an instance of any subclass of [`InstructionDurations`](/api/qiskit/0.46/qiskit.transpiler.InstructionDurations "qiskit.transpiler.InstructionDurations") instead of the base class.
<span id="relnotes-0-46-0" />
<span id="id9" />
## 0.46.0
<span id="relnotes-0-46-0-prelude" />
<span id="id10" />
### Prelude
The 0.46.0 release is the final minor version release for the 0.x series. This release primarily adds new deprecation warnings for API changes coming in the future major version release 1.0.0. It is fully compatible with the Qiskit 0.45.x releases. It is strongly recommended that you upgrade from 0.45.x to 0.46.0 so that youre able to see the warnings about which interfaces will change with Qiskit 1.0.0.
The 0.46.x release series will continue to be supported and recieve bugfix and security fixes via patch releases for 6 months after this release. For more details on the release schedule and support cycle see: [start/install#qiskit-versioning](/start/install#qiskit-versioning) which documents the release schedule in more detail.
<Admonition title="Note" type="note">
If your project depends on Qiskit, it may rely on functionality that will no longer be supported in Qiskit 1.0.0. For this reason, we recommend that you proactively cap your supported version to `<1.0`. Qiskit 1.0.0 is scheduled to release approximately two weeks after Qiskit 0.46.0, on 2024-02-15, and might not yet be available when you read this message.
</Admonition>
The packaging structure of Qiskit is changing in Qiskit 1.0, and unfortunately the changed requirements cannot be fully communicated to `pip`, especially if `pip install --upgrade` commands are run after the environment has been initially configured. All versions of Qiskit prior to 1.0 (including this one) have an installation conflict with Qiskit 1.0 that `pip` will not resolve.
If `import qiskit` raises an [`ImportError`](https://docs.python.org/3/library/exceptions.html#ImportError "(in Python v3.12)") for you, your environment is in an invalid state, and versions of Qiskit 0.45/0.46 and 1.0 are both reachable, which will result in subtly broken code. You will need to create a new virtual environment, and ensure that *only* one of the two versions are installed. In particular, if you are intending to install Qiskit 1.0, you must have no packages that depend on `qiskit-terra` installed; these packages are incompatible with Qiskit 1.0 and must be updated. If you are intending to install Qiskit 0.45 or 0.46, you must ensure that you have nothing attempting to install `qiskit>=1.0`.
If you develop a library based on Qiskit and you still have a dependency on `qiskit-terra`, you should urgently release a new package that depends only on `qiskit`. Since version 0.44, the `qiskit` package contained only the `qiskit-terra` compiler core (the component that is now simply called “Qiskit”), so if your minimum version is `0.44`, you can safely switch a `qiskit-terra>=0.44` dependency to `qiskit>=0.44` with no change in what will be installed. For more detail and recommendations for testing and preparation, see the [section for developers of the migration guide](https://qisk.it/1-0-packaging-migration#for-developers).
<span id="relnotes-0-46-0-new-features" />
<span id="id11" />
### New Features
* A new function, [`qs_decomposition()`](/api/qiskit/0.46/synthesis#qiskit.synthesis.qs_decomposition "qiskit.synthesis.qs_decomposition"), has been added to [`qiskit.synthesis`](/api/qiskit/0.46/synthesis#module-qiskit.synthesis "qiskit.synthesis"). This function allows to apply the Quantum Shannon Decomposition of arbitrary unitaries.
* A new [`qiskit.providers.basic_provider`](/api/qiskit/0.46/providers_basic_provider#module-qiskit.providers.basic_provider "qiskit.providers.basic_provider") module has been introduced to replace [`qiskit.providers.basicaer`](/api/qiskit/0.46/providers_basicaer#module-qiskit.providers.basicaer "qiskit.providers.basicaer"). This module contains provider tools that mirror those of the `BasicAer` provider and offers a single, non-efficient, statevector-based simulator: [`BasicSimulator`](/api/qiskit/0.46/qiskit.providers.basic_provider.BasicSimulator "qiskit.providers.basic_provider.BasicSimulator"). This simulator is based on the [`BackendV2`](/api/qiskit/0.46/qiskit.providers.BackendV2 "qiskit.providers.BackendV2") interface and is exclusively intended for testing and simple prototyping, for more advanced simulation capabilities, please refer to the `qiskit-aer` package. See the `BasicAer` deprecation note for migration guidelines.
* The [`Target`](/api/qiskit/0.46/qiskit.transpiler.Target "qiskit.transpiler.Target") interface and transpiler pipeline now support target definitions with `num_qubits=None`. This is to allow the creation of [`Target`](/api/qiskit/0.46/qiskit.transpiler.Target "qiskit.transpiler.Target")-based simulators with a flexible number of qubits. A target with `num_qubits=None` will exclusively contain global instructions (with `qargs=None`) and when given to the transpiler, it is expected that the transpiler will not resize the circuit. This change in the [`Target`](/api/qiskit/0.46/qiskit.transpiler.Target "qiskit.transpiler.Target") requires future transpiler passes to account for the case where `target.num_qubits is None`.
* A new class, [`GenericBackendV2`](/api/qiskit/0.46/qiskit.providers.fake_provider.GenericBackendV2 "qiskit.providers.fake_provider.GenericBackendV2") has been added to the [`qiskit.providers.fake_provider`](/api/qiskit/0.46/providers_fake_provider#module-qiskit.providers.fake_provider "qiskit.providers.fake_provider") module. This class is configurable, and builds a [`BackendV2`](/api/qiskit/0.46/qiskit.providers.BackendV2 "qiskit.providers.BackendV2") instance that can run locally (in the spirit of fake backends). Users can configure the number of qubits, basis gates, coupling map, ability to run dynamic circuits (control flow instructions), instruction calibrations and dtm of the backend without having to deal with manual target construction. Qubit and gate properties are generated by randomly sampling from default ranges. The seed for this random generation can be fixed to ensure the reproducibility of the backend output. Its important to note that this backend only supports gates in the standard library. If you need a more flexible backend, there is always the option to directly instantiate a [`Target`](/api/qiskit/0.46/qiskit.transpiler.Target "qiskit.transpiler.Target") object to use for transpilation.
Example usage 1:
```python
from qiskit import QuantumCircuit, transpile
from qiskit.providers.fake_provider import GenericBackendV2
# Create a simple circuit
circuit = QuantumCircuit(3)
circuit.h(0)
circuit.cx(0,1)
circuit.cx(0,2)
circuit.measure_all()
circuit.draw('mpl')
# Define backend with 3 qubits
backend = GenericBackendV2(num_qubits=3)
# Transpile and run
transpiled_circuit = transpile(circuit, backend)
result = backend.run(transpiled_circuit).result()
```
Example usage 2:
```python
from qiskit import QuantumCircuit, ClassicalRegister, transpile
from qiskit.providers.fake_provider import GenericBackendV2
# Create a circuit with classical control
creg = ClassicalRegister(19)
qc = QuantumCircuit(25)
qc.add_register(creg)
qc.h(0)
for i in range(18):
qc.cx(0, i + 1)
for i in range(18):
qc.measure(i, creg[i])
qc.ecr(20, 21).c_if(creg, 0)
# Define backend with custom basis gates
# and control flow instructions
backend = GenericBackendV2(
num_qubits=25,
basis_gates = ["ecr","id","rz","sx","x"],
control_flow=True)
#Transpile
transpiled_qc = transpile(qc, backend)
```
<Admonition title="Note" type="note">
The noise properties generated by these class do not mimic any concrete quantum device, and should not be used to measure concrete backend behaviors. They are “reasonable defaults” that can be used to test general backend-interfacing functionality. For a more accurate simulation of existing devices, you can manually build a noise model from the real backend using the functionality offered in `qiskit-aer`.
</Admonition>
<span id="relnotes-0-46-0-upgrade-notes" />
### Upgrade Notes
* The minimum version required for `symengine` was bumped to >=0.11. This enabled removing workarounds from [`ParameterExpression.is_real()`](/api/qiskit/0.46/qiskit.circuit.ParameterExpression#is_real "qiskit.circuit.ParameterExpression.is_real") to handle a bug in earlier releases of `symengine`.
<span id="relnotes-0-46-0-deprecation-notes" />
### Deprecation Notes
* The [`ScheduleBlock.scoped_parameters()`](/api/qiskit/0.46/qiskit.pulse.ScheduleBlock#scoped_parameters "qiskit.pulse.ScheduleBlock.scoped_parameters") and [`ScheduleBlock.search_parameters()`](/api/qiskit/0.46/qiskit.pulse.ScheduleBlock#search_parameters "qiskit.pulse.ScheduleBlock.search_parameters") methods have been deprecated. These methods produce [`Parameter`](/api/qiskit/0.46/qiskit.circuit.Parameter "qiskit.circuit.Parameter") objects with names modified to indicate pulse scoping. The original intention of the methods was that these objects would still link to the original unscoped [`Parameter`](/api/qiskit/0.46/qiskit.circuit.Parameter "qiskit.circuit.Parameter") objects. However, the modification of the name breaks the link so that assigning using the scoped version does not work. See [#11654](https://github.com/Qiskit/qiskit/issues/11654) for more context.
* Passing a [`QuasiDistribution`](/api/qiskit/0.46/qiskit.result.QuasiDistribution "qiskit.result.QuasiDistribution"), [`ProbDistribution`](/api/qiskit/0.46/qiskit.result.ProbDistribution "qiskit.result.ProbDistribution"), or a distribution dictionary in for the `data` argument of the [`plot_histogram()`](/api/qiskit/0.46/qiskit.visualization.plot_histogram "qiskit.visualization.plot_histogram") visualization function is now deprecated. Support for doing this will be removed in the Qiskit 1.0 release. If you would like to plot a histogram from a [`QuasiDistribution`](/api/qiskit/0.46/qiskit.result.QuasiDistribution "qiskit.result.QuasiDistribution"), [`ProbDistribution`](/api/qiskit/0.46/qiskit.result.ProbDistribution "qiskit.result.ProbDistribution"), or a distribution dictionary you should use the [`plot_distribution()`](/api/qiskit/0.46/qiskit.visualization.plot_distribution "qiskit.visualization.plot_distribution") function instead.
* The `qiskit-terra` Python package is deprecated and will no longer receive updates starting in Qiskit 1.0.0. If youre installing `qiskit-terra` by itself this will no longer be updated for Qiskit>=1.0.0. If youre running qiskit without the `qiskit` package a `FutureWarning` will be emitted on import of [`qiskit`](/api/qiskit/0.46/index#module-qiskit "qiskit") to indicate youre not using the `qiskit` package.
* Use of the `qiskit.Aer` object is deprecated and will be removed in Qiskit 1.0. You should instead use the same object from the `qiskit_aer` namespace, which is a drop-in replacement.
* Importing from `qiskit.providers.aer` is deprecated and will stop working in Qiskit 1.0. You should instead import from `qiskit_aer`, which is a drop-in replacement.
* Running pulse jobs on backends from [`qiskit.providers.fake_provider`](/api/qiskit/0.46/providers_fake_provider#module-qiskit.providers.fake_provider "qiskit.providers.fake_provider") is deprecated, and all support will be removed in Qiskit 1.0. This is due to Qiskit Aer removing its simulation functionality for such jobs. For low-level Hamiltonian-simulation workloads, consider using a specialised library such as [Qiskit Dynamics](https://qiskit.org/ecosystem/dynamics).
* The `qiskit.transpiler.synthesis` module is deprecated and will be removed in Qiskit 1.0. The following objects have been moved:
* `qiskit.transpiler.synthesis.aqc` has been moved to [`qiskit.synthesis.unitary.aqc`](/api/qiskit/0.46/synthesis_aqc#module-qiskit.synthesis.unitary.aqc "qiskit.synthesis.unitary.aqc") (except of `qiskit.synthesis.unitary.aqc.AQCSynthesisPlugin`).
* `qiskit.synthesis.unitary.aqc.AQCSynthesisPlugin` has been moved to `qiskit.transpiler.passes.synthesis.AQCSynthesisPlugin`.
* `qiskit.transpiler.synthesis.graysynth()` has been moved to [`qiskit.synthesis.synth_cnot_phase_aam()`](/api/qiskit/0.46/synthesis#qiskit.synthesis.synth_cnot_phase_aam "qiskit.synthesis.synth_cnot_phase_aam").
* `qiskit.transpiler.synthesis.cnot_synth()` has been moved to [`qiskit.synthesis.synth_cnot_count_full_pmh()`](/api/qiskit/0.46/synthesis#qiskit.synthesis.synth_cnot_count_full_pmh "qiskit.synthesis.synth_cnot_count_full_pmh").
* The `qiskit.tools.jupyter` module has been deprecated and will be removed in Qiskit 1.0.0. This module is deprecated because the functionality in this module is tied to the legacy `qiskit-ibmq-provider` package which is no longer supported and also only supported [`BackendV1`](/api/qiskit/0.46/qiskit.providers.BackendV1 "qiskit.providers.BackendV1"). If youre using this functionality currently, similar jupyter tools exist in the [qiskit-ibm-provider](https://github.com/Qiskit/qiskit-ibm-provider) package which can be used instead.
* The `qiskit.tools.monitor` module has been deprecated and will be removed in Qiskit 1.0.0. This module is deprecated because the functionality in this module is tied to the legacy `qiskit-ibmq-provider` package which is no longer supported and also only supported [`BackendV1`](/api/qiskit/0.46/qiskit.providers.BackendV1 "qiskit.providers.BackendV1").
* The `qiskit.tools.visualization` module has been deprecated and will be removed in Qiskit 1.0.0. This module was a legacy redirect from the original location of Qiskits visualization module and was moved to [`qiskit.visualization`](/api/qiskit/0.46/visualization#module-qiskit.visualization "qiskit.visualization") in Qiskit 0.8.0. If youre still using this path you can just update your imports from `qiskit.tools.visualization` to [`qiskit.visualization`](/api/qiskit/0.46/visualization#module-qiskit.visualization "qiskit.visualization").
* The `qiskit.tools.events` module and the `progressbar()` utility it exposed has been deprecated and will be removed in the Qiskit 1.0.0 release. This modules functionality was not widely used and better covered by dedicated packages such as [tqdm](https://github.com/tqdm/tqdm).
* The `qiskit.tools` module has been deprecated and will be removed in Qiskit 1.0.0. Except as noted in the release notes above for specific submodules (`qiskit.tools.jupyter`, `qiskit.tools.monitor`, `qiskit.tools.events` and `qiskit.tools.visualization`) the functionality in this module have been migrated to [`qiskit.utils`](/api/qiskit/0.46/utils#module-qiskit.utils "qiskit.utils"). If youre using any functionality in this module you can update your imports from `qiskit.tools` to [`qiskit.utils`](/api/qiskit/0.46/utils#module-qiskit.utils "qiskit.utils").
* The module `qiskit.test` is deprecated. This module contains tooling and helpers for internal Qiskit testing, and most of its functionality had been moved or is not used in Qiskit anymore. In practice, the module was never meant to be used externally. If any of the code in the module is absolutely necessary beyond Qiskit, consider copying that code out into your own test infrastructure.
* The `qiskit.quantum_info.synthesis` module is deprecated and will be removed in Qiskit 1.0.0. The following objects have been moved to [`qiskit.synthesis`](/api/qiskit/0.46/synthesis#module-qiskit.synthesis "qiskit.synthesis"):
* [`OneQubitEulerDecomposer`](/api/qiskit/0.46/qiskit.synthesis.OneQubitEulerDecomposer "qiskit.synthesis.OneQubitEulerDecomposer") has been moved to `qiskit.synthesis.one_qubit`
* [`TwoQubitBasisDecomposer`](/api/qiskit/0.46/qiskit.synthesis.TwoQubitBasisDecomposer "qiskit.synthesis.TwoQubitBasisDecomposer") has been moved to `qiskit.synthesis.two_qubits`
* [`XXDecomposer`](/api/qiskit/0.46/qiskit.synthesis.XXDecomposer "qiskit.synthesis.XXDecomposer") has been moved to `qiskit.synthesis.two_qubits`
* `two_qubit_cnot_decompose()` has been moved to `qiskit.synthesis.two_qubits`
The class [`Quaternion`](/api/qiskit/0.46/qiskit.quantum_info.Quaternion "qiskit.quantum_info.Quaternion") has been migrated from `qiskit.quantum_info.synthesis` to [`qiskit.quantum_info`](/api/qiskit/0.46/quantum_info#module-qiskit.quantum_info "qiskit.quantum_info"). This move has not affected the usual import path of the class, but accessing it via the `qiskit.quantum_info.synthesis` is now deprecated.
This function is deprecated and will be removed in Qiskit 1.0.0:
* `cnot_rxx_decompose()`
* The legacy OpenQASM 2 parser module previously present in [`qiskit.qasm`](/api/qiskit/0.46/qasm#module-qiskit.qasm "qiskit.qasm") has been deprecated. It will be removed in the Qiskit 1.0.0 release. The legacy OpenQASM 2 parser has been superseded by the [`qiskit.qasm2`](/api/qiskit/0.46/qasm2#module-qiskit.qasm2 "qiskit.qasm2") module which provides a faster more correct parser for OpenQASM 2.
* The `qiskit.converters.ast_to_dag` function has been deprecated and will be removed in the Qiskit 1.0.0 release. It previously was used to convert the abstract syntax tree generated by the legacy OpenQASM 2 parser (in the [`qiskit.qasm`](/api/qiskit/0.46/qasm#module-qiskit.qasm "qiskit.qasm") module which has been deprecated) and convert that directly to a [`DAGCircuit`](/api/qiskit/0.46/qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit"). As the legacy OpenQASM 2 parser has been deprecated this function will no longer serves a purpose after the legacy parser is removed. If you were previously using this, you can instead parse your OpenQASM 2 files into a [`QuantumCircuit`](/api/qiskit/0.46/qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") using the [`QuantumCircuit.from_qasm_file()`](/api/qiskit/0.46/qiskit.circuit.QuantumCircuit#from_qasm_file "qiskit.circuit.QuantumCircuit.from_qasm_file") or [`QuantumCircuit.from_qasm_str()`](/api/qiskit/0.46/qiskit.circuit.QuantumCircuit#from_qasm_str "qiskit.circuit.QuantumCircuit.from_qasm_str") constructor methods and then converting that [`QuantumCircuit`](/api/qiskit/0.46/qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") into a [`DAGCircuit`](/api/qiskit/0.46/qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") with [`circuit_to_dag()`](/api/qiskit/0.46/converters#qiskit.converters.circuit_to_dag "qiskit.converters.circuit_to_dag").
* The [`QuantumCircuit.qasm()`](/api/qiskit/0.46/qiskit.circuit.QuantumCircuit#qasm "qiskit.circuit.QuantumCircuit.qasm") method used to generate a OpenQASM 2 representation of the [`QuantumCircuit`](/api/qiskit/0.46/qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") object has been deprecated and will be removed in the Qiskit 1.0.0 release. The [`qasm2.dump()`](/api/qiskit/0.46/qasm2#qiskit.qasm2.dump "qiskit.qasm2.dump") or [`qasm2.dumps()`](/api/qiskit/0.46/qasm2#qiskit.qasm2.dumps "qiskit.qasm2.dumps") functions which provide similar functionality should be used instead. If you were using the [`QuantumCircuit.qasm()`](/api/qiskit/0.46/qiskit.circuit.QuantumCircuit#qasm "qiskit.circuit.QuantumCircuit.qasm") method to generate pygments formatted output you should instead look at the standalone `openqasm-pygments` package to provide this functionality (as [`qasm2.dump()`](/api/qiskit/0.46/qasm2#qiskit.qasm2.dump "qiskit.qasm2.dump") and [`qasm2.dumps()`](/api/qiskit/0.46/qasm2#qiskit.qasm2.dumps "qiskit.qasm2.dumps") do not provide pygments colored output).
* The [`ParametricPulse`](/api/qiskit/0.46/qiskit.pulse.library.ParametricPulse "qiskit.pulse.library.parametric_pulses.ParametricPulse") base class and pulses are now deprecated, and will be removed in Qiskit 1.0. This includes:
* [`ParametricPulse`](/api/qiskit/0.46/qiskit.pulse.library.ParametricPulse "qiskit.pulse.library.parametric_pulses.ParametricPulse")
* `Constant`
* `Drag`
* `Gaussian`
* `GaussianSquare`
The class has been superseded by `SymbolicPulse` and the corresponding pulse library. `SymbolicPulse` provides better performance, flexibility and QPY support.
* The [`NoiseAdaptiveLayout`](/api/qiskit/0.46/qiskit.transpiler.passes.NoiseAdaptiveLayout "qiskit.transpiler.passes.NoiseAdaptiveLayout") transpiler pass and the corresponding `"noise_adaptive"` layout stage plugin have been deprecated and will be removed in the 1.0.0 release. This pass has been largely superseded by [`VF2Layout`](/api/qiskit/0.46/qiskit.transpiler.passes.VF2Layout "qiskit.transpiler.passes.VF2Layout") and [`VF2PostLayout`](/api/qiskit/0.46/qiskit.transpiler.passes.VF2PostLayout "qiskit.transpiler.passes.VF2PostLayout") which will set a layout based on the reported noise characteristics of a backend.
* The [`CrosstalkAdaptiveSchedule`](/api/qiskit/0.46/qiskit.transpiler.passes.CrosstalkAdaptiveSchedule "qiskit.transpiler.passes.CrosstalkAdaptiveSchedule") transpiler pass has been deprecated and will be removed in the 1.0.0 release. This pass was not usable any longer because its internal operation was dependent on custom properties being set in the [`BackendProperties`](/api/qiskit/0.46/qiskit.providers.models.BackendProperties "qiskit.providers.models.BackendProperties") payload of a [`BackendV1`](/api/qiskit/0.46/qiskit.providers.BackendV1 "qiskit.providers.BackendV1") instance. As no backends are setting these fields the pass has been deprecated.
* The `qiskit.visualization.qcstyle` module is now deprecated and will be removed in the Qiskit 1.0.0 release. Instead you should use `qiskit.visualization.circuit.qcstyle` as direct replacement.
* Injecting circuit gate operations into the pulse builder context is now deprecated. The deprecation affects the following functions:
* `call_gate()`,
* `cx()`,
* `u1()`,
* `u2()`,
* `u3()`,
* `x()`
As well as input arguments of type [`QuantumCircuit`](/api/qiskit/0.46/qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") type in [`call()`](/api/qiskit/0.46/pulse#qiskit.pulse.builder.call "qiskit.pulse.builder.call").
If you still wish to inject backend calibrated schedules, you can use following pattern instead of calling gate commands.
```python
from qiskit.providers.fake_provider import GenericBackendV2
from qiskit import pulse
backend = GenericBackendV2(num_qubits=5)
sched = backend.target['x'][(qubit,)].calibration
with pulse.build() as only_pulse_scheds:
pulse.call(sched)
```
Similarly, [`QuantumCircuit`](/api/qiskit/0.46/qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") can be injected in the builder context by manually transpiling and scheduling the object.
```python
from math import pi
from qiskit.compiler import schedule, transpile
qc = QuatumCircuit(2)
qc.rz(pi/2, 0)
qc.sx(0)
qc.rz(pi/2, 0)
qc.cx(0, 1)
qc_t = transpile(qc, backend)
sched = schedule(qc_t, backend)
with pulse.build() as only_pulse_scheds:
pulse.call(sched)
```
In any case we now recommend to write a minimum pulse program with the builder and attach it to [`QuantumCircuit`](/api/qiskit/0.46/qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") via the [`QuantumCircuit.add_calibration()`](/api/qiskit/0.46/qiskit.circuit.QuantumCircuit#add_calibration "qiskit.circuit.QuantumCircuit.add_calibration") method as a microcode of a gate instruction, rather than writing the entire program with the pulse model.
The following arguments in [`build()`](/api/qiskit/0.46/pulse#qiskit.pulse.builder.build "qiskit.pulse.builder.build") have also been deprecated:
* `default_transpiler_settings`
* `default_circuit_scheduler_settings`
Together with the functions:
* [`active_transpiler_settings()`](/api/qiskit/0.46/pulse#qiskit.pulse.builder.active_transpiler_settings "qiskit.pulse.builder.active_transpiler_settings")
* [`active_circuit_scheduler_settings()`](/api/qiskit/0.46/pulse#qiskit.pulse.builder.active_circuit_scheduler_settings "qiskit.pulse.builder.active_circuit_scheduler_settings")
* [`transpiler_settings()`](/api/qiskit/0.46/pulse#qiskit.pulse.builder.transpiler_settings "qiskit.pulse.builder.transpiler_settings")
* [`circuit_scheduler_settings()`](/api/qiskit/0.46/pulse#qiskit.pulse.builder.circuit_scheduler_settings "qiskit.pulse.builder.circuit_scheduler_settings")
* The following tools in [`qiskit.utils`](/api/qiskit/0.46/utils#module-qiskit.utils "qiskit.utils") have been deprecated:
* Utils in `qiskit.utils.arithmetic`
* Utils in `qiskit.utils.circuit_utils`
* Utils in `qiskit.utils.entangler_map`
* Utils in `qiskit.utils.name_unnamed_args`
These functions were used exclusively in the context of `qiskit.algorithms` and `qiskit.opflow`, and will be removed following the removals of `qiskit.algorithms` and `qiskit.opflow` in Qiskit 1.0.
* The [`qiskit.providers.fake_provider`](/api/qiskit/0.46/providers_fake_provider#module-qiskit.providers.fake_provider "qiskit.providers.fake_provider") module has been migrated to the `qiskit-ibm-runtime` Python package. For this reason, the following elements in the [`qiskit.providers.fake_provider`](/api/qiskit/0.46/providers_fake_provider#module-qiskit.providers.fake_provider "qiskit.providers.fake_provider") have been deprecated as of Qiskit 0.46 and will be removed in Qiskit 1.0:
* [`qiskit.providers.fake_provider.FakeProvider`](/api/qiskit/0.46/qiskit.providers.fake_provider.FakeProvider "qiskit.providers.fake_provider.FakeProvider")
* [`qiskit.providers.fake_provider.FakeProviderForBackendV2`](/api/qiskit/0.46/qiskit.providers.fake_provider.FakeProviderForBackendV2 "qiskit.providers.fake_provider.FakeProviderForBackendV2")
* `qiskit.providers.fake_provider.FakeProviderFactory`
* `qiskit.providers.fake_provider.fake_backends.FakeBackendV2`
* any fake backend contained in `qiskit.providers.fake_provider.backends` (accessible through the provider)
* [`qiskit.providers.fake_provider.FakeQasmSimulator`](/api/qiskit/0.46/qiskit.providers.fake_provider.FakeQasmSimulator "qiskit.providers.fake_provider.FakeQasmSimulator")
* `qiskit.providers.fake_provider.FakeJob`
* `qiskit.providers.fake_provider.FakeQobj`
Migration example to the new fake provider:
```python
# Legacy path
from qiskit.providers.fake_provider import FakeProvider, FakeSherbrooke
backend1 = FakeProvider().get_backend("fake_ourense")
backend2 = FakeSherbrooke()
# New path
# run "pip install qiskit-ibm-runtime"
from qiskit_ibm_runtime.fake_provider import FakeProvider, FakeSherbrooke
backend1 = FakeProvider().get_backend("fake_ourense")
backend2 = FakeSherbrooke()
```
Additionally, the following fake backends designed for special testing purposes have been superseded by the new [`GenericBackendV2`](/api/qiskit/0.46/qiskit.providers.fake_provider.GenericBackendV2 "qiskit.providers.fake_provider.GenericBackendV2") class, and are also deprecated as of Qiskit 0.46:
* [`qiskit.providers.fake_provider.fake_backend_v2.FakeBackendV2`](/api/qiskit/0.46/qiskit.providers.fake_provider.FakeBackendV2 "qiskit.providers.fake_provider.fake_backend_v2.FakeBackendV2")
* `qiskit.providers.fake_provider.fake_backend_v2.FakeBackendV2LegacyQubitProps`
* [`qiskit.providers.fake_provider.fake_backend_v2.FakeBackend5QV2`](/api/qiskit/0.46/qiskit.providers.fake_provider.FakeBackend5QV2 "qiskit.providers.fake_provider.fake_backend_v2.FakeBackend5QV2")
* `qiskit.providers.fake_provider.fake_backend_v2.FakeBackendSimple`
Migration example to the new [`GenericBackendV2`](/api/qiskit/0.46/qiskit.providers.fake_provider.GenericBackendV2 "qiskit.providers.fake_provider.GenericBackendV2") class:
```python
# Legacy path
from qiskit.providers.fake_provider import FakeBackend5QV2
backend = FakeBackend5QV2()
# New path
from qiskit.providers.fake_provider import GenericBackendV2
backend = GenericBackendV2(num_qubits=5)
# note that this class will generate 5q backend with generic
# properties that serves the same purpose as FakeBackend5QV2
# but will generate different results
```
* The [`qiskit.extensions`](/api/qiskit/0.46/extensions#module-qiskit.extensions "qiskit.extensions") module is now deprecated. It had been pending deprecation since the Qiskit 0.45 release. Most objects have been moved to [`qiskit.circuit.library`](/api/qiskit/0.46/circuit_library#module-qiskit.circuit.library "qiskit.circuit.library"), including:
* [`DiagonalGate`](/api/qiskit/0.46/qiskit.circuit.library.DiagonalGate "qiskit.circuit.library.DiagonalGate"),
* `HamiltonianGateGate`,
* [`Initialize`](/api/qiskit/0.46/qiskit.circuit.library.Initialize "qiskit.circuit.library.Initialize"),
* [`Isometry`](/api/qiskit/0.46/qiskit.circuit.library.Isometry "qiskit.circuit.library.Isometry"),
* `MCGupDiag`,
* [`UCGate`](/api/qiskit/0.46/qiskit.circuit.library.UCGate "qiskit.circuit.library.UCGate"),
* [`UCPauliRotGate`](/api/qiskit/0.46/qiskit.circuit.library.UCPauliRotGate "qiskit.circuit.library.UCPauliRotGate"),
* [`UCRXGate`](/api/qiskit/0.46/qiskit.circuit.library.UCRXGate "qiskit.circuit.library.UCRXGate"),
* [`UCRYGate`](/api/qiskit/0.46/qiskit.circuit.library.UCRYGate "qiskit.circuit.library.UCRYGate"),
* [`UCRZGate`](/api/qiskit/0.46/qiskit.circuit.library.UCRZGate "qiskit.circuit.library.UCRZGate"),
* [`UnitaryGate`](/api/qiskit/0.46/qiskit.circuit.library.UnitaryGate "qiskit.circuit.library.UnitaryGate").
With the deprecation of the objects, the following circuit methods have also been deprecated:
* `QuantumCircuit.diagonal`,
* `QuantumCircuit.hamiltonian`,
* `QuantumCircuit.isometry` and `QuantumCircuit.iso`,
* `QuantumCircuit.uc`,
* `QuantumCircuit.ucrx`,
* `QuantumCircuit.ucry`,
* `QuantumCircuit.ucrz`.
* Qiskits [`execute()`](/api/qiskit/0.46/execute#qiskit.execute_function.execute "qiskit.execute_function.execute") function is deprecated. This function served as a high-level wrapper around transpiling a circuit with some transpile options and running it on a backend with some run options. To do the same thing, you can explicitly use the [`transpile()`](/api/qiskit/0.46/compiler#qiskit.compiler.transpile "qiskit.compiler.transpile") function (with appropriate transpile options) followed by `backend.run()` (with appropriate run options).
For example, instead of running:
```python
from qiskit import execute
job = execute(circuit, backend)
```
you can run:
```python
from qiskit import transpile
new_circuit = transpile(circuit, backend)
job = backend.run(new_circuit)
```
Alternatively, the `Sampler` primitive is semantically equivalent to the deprecated [`execute()`](/api/qiskit/0.46/execute#qiskit.execute_function.execute "qiskit.execute_function.execute") function. The class [`BackendSampler`](/api/qiskit/0.46/qiskit.primitives.BackendSampler "qiskit.primitives.BackendSampler") is a generic wrapper for backends that do not support primitives:
```python
from qiskit.primitives import BackendSampler
sampler = BackendSampler(backend)
job = sampler.run(circuit)
```
* Implicit conversion from a dense `` BaseOperator` `` to a [`SparsePauliOp`](/api/qiskit/0.46/qiskit.quantum_info.SparsePauliOp "qiskit.quantum_info.SparsePauliOp") in `Estimator` observable arguments is deprecated as of Qiskit 0.46 and will be removed in Qiskit 1.0. You should explicitly convert to a [`SparsePauliOp`](/api/qiskit/0.46/qiskit.quantum_info.SparsePauliOp "qiskit.quantum_info.SparsePauliOp") using [`SparsePauliOp.from_operator()`](/api/qiskit/0.46/qiskit.quantum_info.SparsePauliOp#from_operator "qiskit.quantum_info.SparsePauliOp.from_operator") instead.
* The discrete pulse library is now deprecated and will be removed in a future release. This includes:
* [`constant()`](/api/qiskit/0.46/pulse#qiskit.pulse.library.constant "qiskit.pulse.library.constant")
* [`zero()`](/api/qiskit/0.46/pulse#qiskit.pulse.library.zero "qiskit.pulse.library.zero")
* [`square()`](/api/qiskit/0.46/pulse#qiskit.pulse.library.square "qiskit.pulse.library.square")
* [`sawtooth()`](/api/qiskit/0.46/pulse#qiskit.pulse.library.sawtooth "qiskit.pulse.library.sawtooth")
* [`triangle()`](/api/qiskit/0.46/pulse#qiskit.pulse.library.triangle "qiskit.pulse.library.triangle")
* [`cos()`](/api/qiskit/0.46/pulse#qiskit.pulse.library.cos "qiskit.pulse.library.cos")
* [`sin()`](/api/qiskit/0.46/pulse#qiskit.pulse.library.sin "qiskit.pulse.library.sin")
* [`gaussian()`](/api/qiskit/0.46/pulse#qiskit.pulse.library.gaussian "qiskit.pulse.library.gaussian")
* [`gaussian_deriv()`](/api/qiskit/0.46/pulse#qiskit.pulse.library.gaussian_deriv "qiskit.pulse.library.gaussian_deriv")
* [`sech()`](/api/qiskit/0.46/pulse#qiskit.pulse.library.sech "qiskit.pulse.library.sech")
* [`sech_deriv()`](/api/qiskit/0.46/pulse#qiskit.pulse.library.sech_deriv "qiskit.pulse.library.sech_deriv")
* [`gaussian_square()`](/api/qiskit/0.46/pulse#qiskit.pulse.library.gaussian_square "qiskit.pulse.library.gaussian_square")
* [`drag()`](/api/qiskit/0.46/pulse#qiskit.pulse.library.drag "qiskit.pulse.library.drag")
Instead, use the corresponding `SymbolicPulse`, with [`get_waveform()`](/api/qiskit/0.46/qiskit.pulse.library.SymbolicPulse#get_waveform "qiskit.pulse.library.SymbolicPulse.get_waveform"). For example, instead of `pulse.gaussian(100,0.5,10)` use `pulse.Gaussian(100,0.5,10).get_waveform()`.
Note that the phase of both `Sawtooth` and `Square` is defined such that a phase of $2\\pi$ shifts by a full cycle, contrary to the discrete counterpart. Also note that complex amplitude support is deprecated in the symbolic pulse library - use `float`, `amp` and `angle` instead.
* The [`ConfigurableFakeBackend`](/api/qiskit/0.46/qiskit.providers.fake_provider.ConfigurableFakeBackend "qiskit.providers.fake_provider.ConfigurableFakeBackend") class, which has mainly been used for internal testing, is now deprecated. It will be removed in the Qiskit 1.0.0 release. Instead, you can use the [`GenericBackendV2`](/api/qiskit/0.46/qiskit.providers.fake_provider.GenericBackendV2 "qiskit.providers.fake_provider.GenericBackendV2") class to build a similar backend for testing.
* Loading library `ScalableSymbolicPulse` objects with complex `amp` parameter from qpy files of version 5 or lower (Qiskit Terra \< 0.23.0) is now deprecated. Following the removal in Qiskit 1.0.0, complex `amp` will be automatically converted to float (`amp`, `angle`). The change applies to the pulses:
* `Constant`
* `Drag`
* `Gaussian`
* `GaussianSquare`
* The [`qiskit.providers.basicaer`](/api/qiskit/0.46/providers_basicaer#module-qiskit.providers.basicaer "qiskit.providers.basicaer") module and all of its classes are deprecated from Qiskit 0.46 onwards. Their use should be replaced with the [`qiskit.quantum_info`](/api/qiskit/0.46/quantum_info#module-qiskit.quantum_info "qiskit.quantum_info") module and the new [`qiskit.providers.basic_provider`](/api/qiskit/0.46/providers_basic_provider#module-qiskit.providers.basic_provider "qiskit.providers.basic_provider") module.
The migration from using [`qiskit.providers.basicaer`](/api/qiskit/0.46/providers_basicaer#module-qiskit.providers.basicaer "qiskit.providers.basicaer") to [`qiskit.providers.basic_provider`](/api/qiskit/0.46/providers_basic_provider#module-qiskit.providers.basic_provider "qiskit.providers.basic_provider") can be performed as follows:
```python
Migrate from | Replace with
------------------------------------------------------------------------------
:mod:`.basicaer` | :mod:`.basic_provider`
:class:`.BasicAerProvider` | :class:`.BasicProvider`
:class:`.BasicAerJob` | :class:`.BasicProviderJob`
:class:`.QasmSimulatorPy` | :class:`.BasicSimulator`
:class:`.UnitarySimulatorPy` | use :class:`~.quantum_info.Operator`
:class:`.StatevectorSimulatorPy` | use :class:`~.quantum_info.Statevector`
```
A notable difference is that the new provider is no longer exposed through a global instance (like `BasicAer`), so it will not be valid to do `from qiskit import BasicProvider`. Instead, the provider class must be imported from its submodule and instantiated:
```python
from qiskit.providers.basic_provider import BasicProvider
provider = BasicProvider()
backend = provider.get_backend("sim_name")
```
The following examples show the migration paths of the three simulators in [`basicaer`](/api/qiskit/0.46/providers_basicaer#module-qiskit.providers.basicaer "qiskit.providers.basicaer").
1. Statevector simulator:
```python
from qiskit import QuantumCircuit
qc = QuantumCircuit(3)
qc.h(0)
qc.h(1)
qc.cx(1,2)
qc.measure_all()
# Former path
from qiskit import BasicAer
backend = BasicAer.get_backend("statevector_simulator")
statevector = backend.run(qc).result().get_statevector()
# New path
qc.remove_final_measurements() # no measurements allowed
from qiskit.quantum_info import Statevector
statevector = Statevector(qc)
```
2. Unitary simulator:
```python
from qiskit import QuantumCircuit
qc = QuantumCircuit(3)
qc.h(0)
qc.h(1)
qc.cx(1,2)
qc.measure_all()
# Former path
from qiskit import BasicAer
backend = BasicAer.get_backend("unitary_simulator")
result = backend.run(qc).result()
# New path
qc.remove_final_measurements() # no measurements allowed
from qiskit.quantum_info import Operator
result = Operator(qc).data
```
3. Qasm simulator:
```python
from qiskit import QuantumCircuit
qc = QuantumCircuit(3)
qc.h(0)
qc.h(1)
qc.cx(1,2)
qc.measure_all()
# Former path
from qiskit import BasicAer
backend = BasicAer.get_backend("qasm_simulator")
result = backend.run(qc).result()
# New path
from qiskit.providers.basic_provider import BasicProvider
backend = BasicProvider().get_backend("basic_simulator")
result = backend.run(qc).result()
# or, directly
from qiskit.providers.basic_provider import BasicSimulator
backend = BasicSimulator()
result = backend.run(qc).result()
```
* Using a [`PauliList`](/api/qiskit/0.46/qiskit.quantum_info.PauliList "qiskit.quantum_info.PauliList") as an observable that is implicitly converted to a [`SparsePauliOp`](/api/qiskit/0.46/qiskit.quantum_info.SparsePauliOp "qiskit.quantum_info.SparsePauliOp") with coefficients 1 when calling [`Estimator.run()`](/api/qiskit/0.46/qiskit.primitives.Estimator#run "qiskit.primitives.Estimator.run") is deprecated. Instead you should explicitly convert the argument using `SparsePauliOp(pauli_list)` first.
<span id="relnotes-0-46-0-critical-issues" />
### Critical Issues
* When updating Qiskit from `0.46.x` to `1.0.0` you will not be able to update in place. For example, `pip install -U qiskit` or `pip install --upgrade qiskit` is not supported and likely will **not** work. To upgrade `qiskit` the recommended path is to create a new virtual environment ([`venv`](https://docs.python.org/3/library/venv.html#module-venv "(in Python v3.12)")) to build a new separate environment for Qiskit>=1.0.0. For example:
```python
python -m venv qiskit_1.0
source qiskit_1.0/bin/activate
pip install qiskit>=1
```
will create a new virtual environment named `qiskit_1.0` will contain the new version of Qiskit.