diff --git a/releasenotes/notes/0.8/0.8-release-179e83619783737f.yaml b/releasenotes/notes/0.8/0.8-release-179e83619783737f.yaml new file mode 100644 index 0000000000..b30adf9647 --- /dev/null +++ b/releasenotes/notes/0.8/0.8-release-179e83619783737f.yaml @@ -0,0 +1,70 @@ +--- +prelude: | + The 0.8 release includes several new features and bug fixes. The + highlights for this release are: the introduction of a unified + :class:`~qiskit.provider.aer.AerSimulator` backend for running circuit + simulations using any of the supported simulation methods; a simulator + instruction library (:mod:`~qiskit.providers.aer.library`) + which includes custom instructions for saving various kinds of simulator + data; MPI support for running large simulations on a distributed + computing environment. +features: + - | + This release includes support for building qiskit-aer with MPI support to + run large simulations on a distributed computing environment. See the + `contributing guide `__ + for instructions on building and running in an MPI environment. + - | + It is now possible to build qiskit-aer with CUDA enabled in Windows. + See the + `contributing guide `__ + for instructions on building from source with GPU support. + - | + When building the qiskit-aer Python extension from source several build + dependencies need to be pre-installed to enable C++ compilation. As a + user convenience when building the extension any of these build + dependencies which were missing would be automatically installed using + ``pip`` prior to the normal ``setuptools`` installation steps, however it was + previously was not possible to avoid this automatic installation. To solve + this issue a new environment variable ``DISABLE_DEPENDENCY_INSTALL`` + has been added. If it is set to ``1`` or ``ON`` when building the python + extension from source this will disable the automatic installation of these + missing build dependencies. + - | + Adds support for optimized N-qubit Pauli gate ( + :class:`qiskit.circuit.library.generalized_gates.PauliGate`) to the + :class:`~qiskit.providers.aer.StatevectorSimulator`, + :class:`~qiskit.providers.aer.UnitarySimulator`, and the + statevector and density matrix methods of the + :class:`~qiskit.providers.aer.QasmSimulator`. +upgrade: + - | + The minimum version of `Conan `__ has been increased to 1.31.2. + This was necessary to fix a compatibility issue with newer versions of the + `urllib3 `__ (which is a dependency of Conan). + It also adds native support for AppleClang 12 which is useful for users with + new Apple computers. + - | + ``pybind11`` minimum version required is 2.6 instead of 2.4. This is needed + in order to support CUDA enabled compilation in Windows. + - | + Cython has been removed as a build dependency. + - | + Removed x90 gate decomposition from noise models that was deprecated + in qiskit-aer 0.7. This decomposition is now done by using regular + noise model basis gates and the qiskit transpiler. +fixes: + - | + Fixes bug with the :meth:`~qiskit.providers.aer.QasmSimulator.from_backend` + method of the :class:`~qiskit.provider.aer.QasmSimulator` that would set the + ``local`` attribute of the configuration to the backend value rather than + always being set to ``True``. + - | + Fixes bug in + :meth:`~qiskit.providers.aer.noise.NoiseModel.from_backend` and + :meth:`~qiskit.providers.aer.QasmSimulator.from_backend` where + :attr:`~qiskit.providers.aer.noise.NoiseModel.basis_gates` was set + incorrectly for IBMQ devices with basis gate set + ``['id', 'rz', 'sx', 'x', 'cx']``. Now the noise model will always + have the same basis gates as the backend basis gates regardless of + whether those instructions have errors in the noise model or not. diff --git a/releasenotes/notes/add-new-backend-interface-5d8c1b5c7d47c50c.yaml b/releasenotes/notes/0.8/add-new-backend-interface-5d8c1b5c7d47c50c.yaml similarity index 87% rename from releasenotes/notes/add-new-backend-interface-5d8c1b5c7d47c50c.yaml rename to releasenotes/notes/0.8/add-new-backend-interface-5d8c1b5c7d47c50c.yaml index 4cb7f89eba..1fe38fa702 100644 --- a/releasenotes/notes/add-new-backend-interface-5d8c1b5c7d47c50c.yaml +++ b/releasenotes/notes/0.8/add-new-backend-interface-5d8c1b5c7d47c50c.yaml @@ -1,7 +1,8 @@ --- features: - | - The :meth:`~qiskit.providers.aer.QasmSimulator.run` method for the + The :meth:`~qiskit.providers.aer.AerSimulator.run` method for the + :class:`~qiskit.providers.aer.AerSimulator`, :class:`~qiskit.providers.aer.QasmSimulator`, :class:`~qiskit.providers.aer.StatevectorSimulator`, and :class:`~qiskit.providers.aer.UnitarySimulator` backends now takes a @@ -16,7 +17,7 @@ features: from qiskit.providers.aer import Aer - backend = Aer.get_backend('qasm_simulator') + backend = Aer.get_backend('aer_simulator') circuit = QuantumCircuit(2) qc.h(0) diff --git a/releasenotes/notes/0.8/aer-simulator-be393c2caaabb609.yaml b/releasenotes/notes/0.8/aer-simulator-be393c2caaabb609.yaml new file mode 100644 index 0000000000..b3a3d81e9c --- /dev/null +++ b/releasenotes/notes/0.8/aer-simulator-be393c2caaabb609.yaml @@ -0,0 +1,81 @@ +--- +features: + - | + Adds the new :class:`~qiskit.provider.aer.AerSimulator` simulator backend + supporting the following simulation methods + + * `automatic` + * `statevector` + * `stabilizer` + * `density_matrix` + * `matrix_product_state` + * `unitary` + * `superop` + + The default `automatic` method will automatically choose a simulation + method separately for each run circuit based on the circuit instructions + and noise model (if any). Initializing a simulator with a specific + method can be done using the `method` option. + + .. code::python + + from qiskit.providers.aer import AerSimulator + + # Create a MPS simulator backend + backend = AerSimulator(method='matrix_product_state') + + GPU simulation for the statevector, density matrix and unitary methods + can be enabled by setting the `device='GPU'` backend option. + + .. code::python + + from qiskit.providers.aer import AerSimulator + + # Create a GPU statevector backend + backend = AerSimulator(method='statevector', device='GPU') + + Note that the `unitary` and `superop` methods do not support measurement + as they simulate the unitary matrix or superopator matrix of the run + circuit so one of the new :func:`~qiskit.provider.aer.library.save_unitary`, + :func:`~qiskit.provider.aer.library.save_superop`, or + :func:`~qiskit.provider.aer.library.save_state` instructions must + be used to save the simulator state to the returned results. Similarly + state of the other simulations methods can be saved using the + appropriate instructions. See the :mod:`qiskit.provider.aer.library` + API documents for more details. + + Note that the :class:`~qiskit.provider.aer.AerSimulator` simulator + superceds the :class:`~qiskit.provider.aer.QasmSimulator`, + :class:`~qiskit.provider.aer.StatevectorSimulator`, and + :class:`~qiskit.provider.aer.UnitarySimulator` backends which will + be deprecated in a future release. + - | + Updates the :class:`~qiskit.providers.aer.AerProvider` class to include + multiple :class:`~qiskit.provider.aer.AerSimulator` backends preconfigured + for all available simulation methods and simulation devices. The new + backends can be accessed through the provider interface using the names + + * `"aer_simulator"` + * `"aer_simulator_statevector"` + * `"aer_simulator_stabilizer"` + * `"aer_simulator_density_matrix"` + * `"aer_simulator_matrix_product_state"` + * `"aer_simulator_extended_stabilizer"` + * `"aer_simulator_unitary"` + * `"aer_simulator_superop"` + + Additional if Aer was installed with GPU support on a compatible system + the following GPU backends will also be available + + * `"aer_simulator_statevector_gpu"` + * `"aer_simulator_density_matrix_gpu"` + * `"aer_simulator_unitary_gpu"` + + Example + + .. code::python + + from qiskit import Aer + + # Get the GPU statevector simulator backend + backend = Aer.get_backend('aer_simulator_statevector_gpu') diff --git a/releasenotes/notes/extended_stabilizer_norm_estimation-d17632efe8d2bb19.yaml b/releasenotes/notes/0.8/extended_stabilizer_norm_estimation-d17632efe8d2bb19.yaml similarity index 57% rename from releasenotes/notes/extended_stabilizer_norm_estimation-d17632efe8d2bb19.yaml rename to releasenotes/notes/0.8/extended_stabilizer_norm_estimation-d17632efe8d2bb19.yaml index 1a8851c2dd..12b7b25482 100644 --- a/releasenotes/notes/extended_stabilizer_norm_estimation-d17632efe8d2bb19.yaml +++ b/releasenotes/notes/0.8/extended_stabilizer_norm_estimation-d17632efe8d2bb19.yaml @@ -1,28 +1,33 @@ --- features: - | - Introduce a new method for performing measurements with the Extended - Stabilizer simulator, called Norm Estimation. This method can be used by passing - the following options to the ``QasmSimulator`` provider:: + Added a new ``norm estimation`` method for performing measurements when using + the `"extended_stabilizer"` simulation method. This norm estimation method + can be used by passing the following options to the + :class:`~qiskit.providers.aer.AerSimulator` and + :class:`~qiskit.providers.aer.QasmSimulator` backends + + .. code::python simulator = QasmSimulator( - method='extended_stabilizer, - extended_stabilizer_sampling_method="norm_estimation" - ) + method='extended_stabilizer', + extended_stabilizer_sampling_method='norm_estimation') The norm estimation method is slower than the alternative `metropolis` or `resampled_metropolis` options, but gives better performance on circuits - with sparse output distributions. See the documentation of the ``QasmSimulator`` - provider for more information. + with sparse output distributions. See the documentation of the + :class:`~qiskit.providers.aer.QasmSimulator` for more information. fixes: - | - Fixes an issue where the Extended Stabilizer simulator would give incorrect - results on quantum circuits with sparse output distributions. Refer to - `#306 ` for more information - and examples. + Fixes an issue where the Extended `"extended_stabilizer"` simulation method + would give incorrect results on quantum circuits with sparse output + distributions. Refer to + `#306 ` for more + information and examples. upgrade: - | - The following options for the Extended Stabilizer simulator have changed. + The following options for the `"extended_stabilizer"` simulation method + have changed. + ``extended_stabilizer_measure_sampling``: This option has been replaced by the options ``extended_stabilizer_sampling_method``, which controls diff --git a/releasenotes/notes/save-data-instructions-24b127612c9f6502.yaml b/releasenotes/notes/0.8/instructions-c7ab21d4e9ed8a10.yaml similarity index 64% rename from releasenotes/notes/save-data-instructions-24b127612c9f6502.yaml rename to releasenotes/notes/0.8/instructions-c7ab21d4e9ed8a10.yaml index e9fb28f12e..15b5d42f8a 100644 --- a/releasenotes/notes/save-data-instructions-24b127612c9f6502.yaml +++ b/releasenotes/notes/0.8/instructions-c7ab21d4e9ed8a10.yaml @@ -24,6 +24,12 @@ features: See the :mod:`qiskit.providers.aer.library` API documentation for details on method compatibility for each instruction. + + Note that the snapshot instructions + :class:`~qiskit.providers.aer.extensions.SnapshotStatevector`, + :class:`~qiskit.providers.aer.extensions.SnapshotDensityMatrix`, + :class:`~qiskit.providers.aer.extensions.SnapshotStabilizer` are + still supported but will be deprecated in a future release. - | Adds :class:`qiskit.providers.aer.library.SaveExpectationValue` and :class:`qiskit.providers.aer.library.SaveExpectationValueVariance` @@ -35,6 +41,10 @@ features: :class:`~qiskit.providers.aer.library.save_expectation_value` and :class:`~qiskit.providers.aer.library.save_expectation_value_variance` circuit methods which is added to ``QuantumCircuit`` when importing Aer. + + Note that the snapshot instruction + :class:`~qiskit.providers.aer.extensions.SnapshotExpectationValue`, + is still supported but will be deprecated in a future release. - | Adds :class:`qiskit.providers.aer.library.SaveProbabilities` and :class:`qiskit.providers.aer.library.SaveProbabilitiesDict` quantum @@ -44,6 +54,10 @@ features: :class:`~qiskit.providers.aer.library.save_probabilities` and :class:`~qiskit.providers.aer.library.save_probabilities_dict` circuit methods which is added to ``QuantumCircuit`` when importing Aer. + + Note that the snapshot instruction + :class:`~qiskit.providers.aer.extensions.SnapshotProbabilities`, + is still supported but will be deprecated in a future release. - | Adds :class:`qiskit.providers.aer.library.SaveAmplitudes` and :class:`qiskit.providers.aer.library.SaveAmplitudesSquared` @@ -53,3 +67,23 @@ features: :class:`~qiskit.providers.aer.library.save_amplitudes` and :class:`~qiskit.providers.aer.library.save_amplitudes_squared`circuit methods which is added to ``QuantumCircuit`` when importing Aer. + - | + Adds instructions for setting the state of the simulators. These + instructions must be defined on the full number of qubits in the circuit. + They can be applied at any point in a circuit and will override the + simulator state with the one specified. Added instructions are + + * :class:`qiskit.providers.aer.library.SetDensityMatrix` + * :class:`qiskit.providers.aer.library.SetStabilizer` + * :class:`qiskit.providers.aer.library.SetStatevector` + * :class:`qiskit.providers.aer.library.SetUnitary` + + These instruction can be appended to a quantum circuit by using the + :class:`~qiskit.providers.aer.library.set_density_matrix`, + :class:`~qiskit.providers.aer.library.set_stabilizer`, + :class:`~qiskit.providers.aer.library.set_statevector`, + :class:`~qiskit.providers.aer.library.set_unitary` + circuit methods which are added to ``QuantumCircuit`` when importing Aer. + + See the :mod:`qiskit.providers.aer.library` API documentation + for details on method compatibility for each instruction. diff --git a/releasenotes/notes/0.8/mps-4f8541d5b4bf1c18.yaml b/releasenotes/notes/0.8/mps-4f8541d5b4bf1c18.yaml new file mode 100644 index 0000000000..788e08eb38 --- /dev/null +++ b/releasenotes/notes/0.8/mps-4f8541d5b4bf1c18.yaml @@ -0,0 +1,15 @@ +--- +features: + - | + Added support for diagonal gates to the `"matrix_product_state"` simulation + method. + - | + Added support for the ``initialize`` instruction to the + `"matrix_product_state"` simulation method. +issues: + - | + There is a known issue where the simulation of certain circuits with a Kraus + noise model using the `"matrix_product_state"` simulation method can cause + the simulator to crash. Refer to + `#306 ` for more + information. diff --git a/releasenotes/notes/allow_cuda_on_win-c3e5c920528eb282.yaml b/releasenotes/notes/allow_cuda_on_win-c3e5c920528eb282.yaml deleted file mode 100644 index ce10e274b3..0000000000 --- a/releasenotes/notes/allow_cuda_on_win-c3e5c920528eb282.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -features: - - | - It is now possible to build AER with CUDA enabled in Windows. -upgrade: - - | - ``pybind11`` minimum version required is 2.6 instead of 2.4. This is needed - in order to support CUDA enabled compilation in Windows. diff --git a/releasenotes/notes/avoid-dependency-install-7d782ed5c8965629.yaml b/releasenotes/notes/avoid-dependency-install-7d782ed5c8965629.yaml deleted file mode 100644 index 0efacd0296..0000000000 --- a/releasenotes/notes/avoid-dependency-install-7d782ed5c8965629.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -features: - - | - Some *Python* packages needed at C++ compilaton step were installed outside the regular *setuptools* circuit, - and it was not possible to avoid their installation by any option. Now it is possible to avoid automatic - installation of those packages by setting the environment variable *DISABLE_DEPENDENCY_INSTALL* to *1* or *ON*. diff --git a/releasenotes/notes/config-local-46d47ae08eeab339.yaml b/releasenotes/notes/config-local-46d47ae08eeab339.yaml deleted file mode 100644 index 658dbfef56..0000000000 --- a/releasenotes/notes/config-local-46d47ae08eeab339.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -fixes: - - | - Fixes bug where creating a simulator from a backend would set the - ``local`` attribute of the configuration to the backend value - (typically ``False``) rather than always being set to ``True``. diff --git a/releasenotes/notes/cython-dep-removed-ffc095dcc575c449.yaml b/releasenotes/notes/cython-dep-removed-ffc095dcc575c449.yaml deleted file mode 100644 index 7f51030ec2..0000000000 --- a/releasenotes/notes/cython-dep-removed-ffc095dcc575c449.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -upgrade: - - | - Code that dependes on Aer has been removed, so Cython is no longer a dependency. diff --git a/releasenotes/notes/diagnoal-b06c925f44540f8e.yaml b/releasenotes/notes/diagnoal-b06c925f44540f8e.yaml deleted file mode 100644 index c2d86c5942..0000000000 --- a/releasenotes/notes/diagnoal-b06c925f44540f8e.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- - -features: - - | - Added support for MPS::apply_diagonal_matrix. - - - diff --git a/releasenotes/notes/fix-noise-basis-gates-ecdfa43394ff78e3.yaml b/releasenotes/notes/fix-noise-basis-gates-ecdfa43394ff78e3.yaml deleted file mode 100644 index 5c9edc2253..0000000000 --- a/releasenotes/notes/fix-noise-basis-gates-ecdfa43394ff78e3.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -fixes: - - | - Fixes bug in - :meth:`~qiskit.providers.aer.noise.NoiseModel.from_backend` and - :meth:`~qiskit.providers.aer.QasmSimulator.from_backend` where - :attr:`~qiskit.providers.aer.noise.NoiseModel.basis_gates` was set - incorrectly for IBMQ devices with basis gate set - ``['id', 'rz', 'sx', 'x', 'cx']``. Now the noise model will always - have the same basis gates as the backend basis gates regardless of - whether those instructions have errors in the noise model or not. diff --git a/releasenotes/notes/initialize-in-mps-e9f8b70c798e7e25.yaml b/releasenotes/notes/initialize-in-mps-e9f8b70c798e7e25.yaml deleted file mode 100644 index e02790fb1e..0000000000 --- a/releasenotes/notes/initialize-in-mps-e9f8b70c798e7e25.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- - -features: - - | - Added support for `initialize` in the MPS simulation method. - diff --git a/releasenotes/notes/mps-kraus-bug-1299a1c96e947125.yaml b/releasenotes/notes/mps-kraus-bug-1299a1c96e947125.yaml deleted file mode 100644 index 59781ad59f..0000000000 --- a/releasenotes/notes/mps-kraus-bug-1299a1c96e947125.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- - -fixes: - - | - Fixed bug in MPS with Kraus noise. Failure was detected in QFT. - - diff --git a/releasenotes/notes/pauli-instruction-c3aa2c0c634e642e.yaml b/releasenotes/notes/pauli-instruction-c3aa2c0c634e642e.yaml deleted file mode 100644 index 7a01c3e25d..0000000000 --- a/releasenotes/notes/pauli-instruction-c3aa2c0c634e642e.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- - -features: - - | - Adds support for optimized N-qubit Pauli gate ( - :class:`qiskit.circuit.library.generalized_gates.PauliGate`) to the - :class:`~qiskit.providers.aer.StatevectorSimulator`, - :class:`~qiskit.providers.aer.UnitarySimulator`, and the - statevector and density matrix methods of the - :class:`~qiskit.providers.aer.QasmSimulator`. diff --git a/releasenotes/notes/remove-deprecated-ba6eb1060207af99.yaml b/releasenotes/notes/remove-deprecated-ba6eb1060207af99.yaml deleted file mode 100644 index c5e6c4bfc7..0000000000 --- a/releasenotes/notes/remove-deprecated-ba6eb1060207af99.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -upgrade: - - | - Removed x90 gate decomposition from noise models that was deprecated - in qiskit-aer 0.7. This decomposition is now done by using regular - noise model basis gates and the qiskit transpiler. diff --git a/releasenotes/notes/set-state-a029d86b357df0dd.yaml b/releasenotes/notes/set-state-a029d86b357df0dd.yaml deleted file mode 100644 index 2854af5703..0000000000 --- a/releasenotes/notes/set-state-a029d86b357df0dd.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -features: - - | - Adds instructions for setting the state of the simulators. These - instructions must be defined on the full number of qubits in the circuit. - They can be applied at any point in a circuit and will override the - simulator state with the one specified. Added instructions are - - * :class:`qiskit.providers.aer.library.SetDensityMatrix` - * :class:`qiskit.providers.aer.library.SetStabilizer` - * :class:`qiskit.providers.aer.library.SetStatevector` - * :class:`qiskit.providers.aer.library.SetUnitary` - - These instruction can be appended to a quantum circuit by using the - :class:`~qiskit.providers.aer.library.set_density_matrix`, - :class:`~qiskit.providers.aer.library.set_stabilizer`, - :class:`~qiskit.providers.aer.library.set_statevector`, - :class:`~qiskit.providers.aer.library.set_unitary` - circuit methods which are added to ``QuantumCircuit`` when importing Aer. - - See the :mod:`qiskit.providers.aer.library` API documentation - for details on method compatibility for each instruction. diff --git a/releasenotes/notes/update-conan-0e891458bcc96ee2.yaml b/releasenotes/notes/update-conan-0e891458bcc96ee2.yaml deleted file mode 100644 index a7355f6610..0000000000 --- a/releasenotes/notes/update-conan-0e891458bcc96ee2.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -upgrade: - - | - The minimum version of `Conan `__ has been increased to 1.31.2. This was necessary - to fix a compatibility issue with newer versions of the `urllib3 `__ (which - is a dependency of Conan). It also adds native support for AppleClang 12 which is useful for users with - new Apple computers. diff --git a/setup.py b/setup.py index 5380bf97ab..d4e8410b23 100644 --- a/setup.py +++ b/setup.py @@ -82,7 +82,7 @@ def install_needed_req(import_name, package_name=None, min_version=None, max_ver if not _DISABLE_CONAN: setup_requirements.append('conan>=1.22.2') -requirements = common_requirements + ['qiskit-terra>=0.16.0'] +requirements = common_requirements + ['qiskit-terra>=0.17.0'] if not hasattr(setuptools, 'find_namespace_packages') or not inspect.ismethod(