diff --git a/release-notes/0.24.0.rst b/release-notes/0.24.0.rst new file mode 100644 index 000000000..922c8170b --- /dev/null +++ b/release-notes/0.24.0.rst @@ -0,0 +1,114 @@ +0.24.0 (2024-06-10) +=================== + +Deprecation Notes +----------------- + +- ``name`` will now be a required parameter in + `backend() `__. + ``backend()`` will no longer return the first backend out of all backends if ``name`` is not provided. (`1147 `__) +- After the removal of custom programs, the following methods are being deprecated and renamed. + :meth:`qiskit_ibm_runtime.QiskitRuntimeService.run` is deprecated and will be replaced by a private method + :meth:`qiskit_ibm_runtime.QiskitRuntimeService._run`. + + :meth:`qiskit_ibm_runtime.Session.run` is deprecated and will be replaced by a private method + :meth:`qiskit_ibm_runtime.Session._run`. + + :meth:`qiskit_ibm_runtime.RuntimeJob.program_id` is deprecated and will be replaced by + :meth:`qiskit_ibm_runtime.RuntimeJob.primitive_id`. (`1238 `__) +- The ``backend`` argument in `Sampler `__ + and `Estimator `__ has been deprecated. + Please use ``mode`` instead. + The ``session`` argument in `Sampler `__ + and `Estimator `__ has also been deprecated. + Please use ``mode`` instead. (`1556 `__) +- :meth:`qiskit_ibm_runtime.QiskitRuntimeService.get_backend` is deprecated. Please + :meth:`qiskit_ibm_runtime.QiskitRuntimeService.backend` use instead. + The V1 fake backends, :class:`.FakeBackend`, along with :class:`.FakeProvider` are also + being deprecated in favor of the V2 fake backends and :class:`.FakeProviderForBackendV2`. (`1689 `__) +- Specifying options without the full dictionary structure is deprecated. Instead, pass + in a fully structured dictionary. For example, use ``{'environment': {'log_level': 'INFO'}}`` + instead of ``{'log_level': 'INFO'}``. (`1731 `__) + + +New Features +------------ + +- Related to the execution modes, Sampler and Estimator now include a ``mode`` argument. The ``mode`` parameter + can be a Backend, Session, Batch, or None. As a result, the backend name has been deprecated, and will + no longer be supported as a valid execution mode. (`1556 `__) +- The `ZneOptions.amplifier` option was added, which can be one of these strings: + + * ``"gate_folding"`` (default) uses 2-qubit gate folding to amplify noise. If the noise + factor requires amplifying only a subset of the gates, then these gates are chosen + randomly. + * ``"gate_folding_front"`` uses 2-qubit gate folding to amplify noise. If the noise + factor requires amplifying only a subset of the gates, then these gates are selected + from the front of the topologically ordered DAG circuit. + * ``"gate_folding_back"`` uses 2-qubit gate folding to amplify noise. If the noise + factor requires amplifying only a subset of the gates, then these gates are selected + from the back of the topologically ordered DAG circuit. (`1679 `__) + +- When saving an account, there is a new parameter, ``private_endpoint`` that if set to ``True``, allows + users to connect to a private IBM Cloud API. This parameter can also be used when the service is initialized, for example: + ``QiskitRuntimeService(private_endpoint = True)``. (`1699 `__) +- New opt-in feature to support fractional gates is added to :class:`.IBMBackend`. + IBM backends currently support dynamic circuits and fractional gates exclusively and + the two features cannot be used in the same primitive job. + In addition, some error mitigation protocols you can use with the estimator primitive, + such as PEC or PEA, may not support gate twirling with the fractional gates. + Since Qiskit Target model doesn't represent such constraint, + we adopted the opt-in approach, where your backend target includes only + fractional gates (control flow instructions) when the backend is (not) opted. + This feature is controlled when you retrieve the target backend from the :class:`.QiskitRuntimeService`. + + .. code-block:: python + + from qiskit_ibm_runtime import QiskitRuntimeService + + backend = QiskitRuntimeService(channel="ibm_quantum").backends( + "name_of_your_backend", + use_fractional_gates=True, + )[0] + + When the fractional feature is enabled, transpiled circuits may have + shorter depth compared with the conventional IBM basis gates, e.g. [sx, rz, ecr]. + + When you use control flow instructions, e.g. ``if_else``, in your circuit, + you must disable the fractional gate feature to get executable ISA circuits. + The choice of the instruction set is now responsibility of users. + + Note that this pattern may be modified or removed without deprecation + when the IBM backends is updated in future development. (`1715 `__) +- You can now use the experimental option in :class:`qiskit_ibm_runtime.options.EstimatorOptions` to enable Probabilistic Error Amplification (PEA) error mitigation method for your estimator jobs. (`1728 `__) +- Qiskit version ``1.1`` is now supported and required. (`1700 `__) + +Upgrade Notes +------------- + +- :meth:`.QiskitRuntimeService.backends` now always returns a + new :class:`IBMBackend` instance even when the same query is used. + The backend properties and defaults data are retrieved from the server + for every instance when they are accessed for the first time, + while the configuration data is cached internally in the service instance. (`1732 `__) + + +Bug Fixes +--------- + +- Fixed an issue where retrieving jobs with + `job() `__ + and `jobs() `__ + would only return ``RuntimeJob`` instances, even if the job was run with a V2 primitive. Now, + V2 primitive jobs will be returned correctly as ``RuntimeJobV2`` instances. (`1471 `__) +- To avoid network disruptions during long job processes, websocket errors will no longer be raised. (`1518 `__) +- Fixed the combination of ``insert_multiple_cycles`` and ``coupling_map`` options in + :class:`.PadDynamicalDecoupling`. This combination allows to select staggered + dynamical decoupling with multiple sequence cycles in each delay that crosses + the threshold set by ``sequence_min_length_ratios``. (`1630 `__) +- Fixed a serialization issue where decoding job metadata resulted in an error. (`1682 `__) +- Fixed measurement twirling docstring which incorrectly indicated it's enabled by default for Sampler. (`1722 `__) +- Fixed nested experimental suboptions override non-experimental suboptions. (`1731 `__) +- The backend utils method ``convert_to_target`` has been replaced with the + `convert_to_target `__ method from Qiskit. + This fixes some issues related to target generation and calibration data. (`1600 `__) diff --git a/release-notes/unreleased/1147.deprecation.rst b/release-notes/unreleased/1147.deprecation.rst deleted file mode 100644 index 910dc3a5a..000000000 --- a/release-notes/unreleased/1147.deprecation.rst +++ /dev/null @@ -1,3 +0,0 @@ -``name`` will now be a required parameter in - `backend() https://docs.quantum.ibm.com/api/qiskit-ibm-runtime/qiskit_ibm_runtime.QiskitRuntimeService#backend`__. - ``backend()`` will no longer return the first backend out of all backends if ``name`` is not provided. \ No newline at end of file diff --git a/release-notes/unreleased/1238.deprecation.rst b/release-notes/unreleased/1238.deprecation.rst deleted file mode 100644 index f64d36093..000000000 --- a/release-notes/unreleased/1238.deprecation.rst +++ /dev/null @@ -1,9 +0,0 @@ -After the removal of custom programs, the following methods are being deprecated and renamed. -:meth:`qiskit_ibm_runtime.QiskitRuntimeService.run` is deprecated and will be replaced by a private method -:meth:`qiskit_ibm_runtime.QiskitRuntimeService._run`. - -:meth:`qiskit_ibm_runtime.Session.run` is deprecated and will be replaced by a private method -:meth:`qiskit_ibm_runtime.Session._run`. - -:meth:`qiskit_ibm_runtime.RuntimeJob.program_id` is deprecated and will be replaced by -:meth:`qiskit_ibm_runtime.RuntimeJob.primitive_id`. \ No newline at end of file diff --git a/release-notes/unreleased/1471.bug.rst b/release-notes/unreleased/1471.bug.rst deleted file mode 100644 index 73752f398..000000000 --- a/release-notes/unreleased/1471.bug.rst +++ /dev/null @@ -1,5 +0,0 @@ -Fixed an issue where retrieving jobs with -`job() `__ -and `jobs() `__ -would only return ``RuntimeJob`` instances, even if the job was run with a V2 primitive. Now, -V2 primitive jobs will be returned correctly as ``RuntimeJobV2`` instances. \ No newline at end of file diff --git a/release-notes/unreleased/1518.bug.rst b/release-notes/unreleased/1518.bug.rst deleted file mode 100644 index c395de4ab..000000000 --- a/release-notes/unreleased/1518.bug.rst +++ /dev/null @@ -1 +0,0 @@ -To avoid network disruptions during long job processes, websocket errors will no longer be raised. \ No newline at end of file diff --git a/release-notes/unreleased/1556.deprecation.rst b/release-notes/unreleased/1556.deprecation.rst deleted file mode 100644 index fd35f9abb..000000000 --- a/release-notes/unreleased/1556.deprecation.rst +++ /dev/null @@ -1,2 +0,0 @@ -`backend` argument in `Sampler `__ and `Estimator `__ has been deprecated . Please use the new `mode` argument instead. -`session` argument in `Sampler `__ and `Estimator `__ has been deprecated . Please use the new `mode` argument instead. diff --git a/release-notes/unreleased/1556.feat.rst b/release-notes/unreleased/1556.feat.rst deleted file mode 100644 index 2950a3149..000000000 --- a/release-notes/unreleased/1556.feat.rst +++ /dev/null @@ -1,3 +0,0 @@ -Related to the execution modes, Sampler and Estimator now include a `mode` argument. The `mode` param -can be a Backend, Session, Batch, or None. Due to this, the backend name has been deprecated, and will -no longer be supported as a valid execution mode. diff --git a/release-notes/unreleased/1630.bug.rst b/release-notes/unreleased/1630.bug.rst deleted file mode 100644 index 2583c2722..000000000 --- a/release-notes/unreleased/1630.bug.rst +++ /dev/null @@ -1,4 +0,0 @@ -Fixed the combination of `insert_multiple_cycles` and `coupling_map` options in - :class:`.PadDynamicalDecoupling`. This combination allows to select staggered - dynamical decoupling with multiple sequence cycles in each delay that crosses - the threshold set by `sequence_min_length_ratios`. \ No newline at end of file diff --git a/release-notes/unreleased/1679.feat.rst b/release-notes/unreleased/1679.feat.rst deleted file mode 100644 index 73362acaf..000000000 --- a/release-notes/unreleased/1679.feat.rst +++ /dev/null @@ -1,11 +0,0 @@ -The `ZneOptions.amplifier` option was added, which can be one of these strings: - -* `"gate_folding"` (default) uses 2-qubit gate folding to amplify noise. If the noise - factor requires amplifying only a subset of the gates, then these gates are chosen - randomly. -* `"gate_folding_front"` uses 2-qubit gate folding to amplify noise. If the noise - factor requires amplifying only a subset of the gates, then these gates are selected - from the front of the topologically ordered DAG circuit. -* `"gate_folding_back"` uses 2-qubit gate folding to amplify noise. If the noise - factor requires amplifying only a subset of the gates, then these gates are selected - from the back of the topologically ordered DAG circuit. \ No newline at end of file diff --git a/release-notes/unreleased/1682.bug.rst b/release-notes/unreleased/1682.bug.rst deleted file mode 100644 index ac2414d97..000000000 --- a/release-notes/unreleased/1682.bug.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed a serialization issue where decoding job metadata resulted in an error. \ No newline at end of file diff --git a/release-notes/unreleased/1689.deprecation.rst b/release-notes/unreleased/1689.deprecation.rst deleted file mode 100644 index 3f4cd3090..000000000 --- a/release-notes/unreleased/1689.deprecation.rst +++ /dev/null @@ -1,4 +0,0 @@ -:meth:`qiskit_ibm_runtime.QiskitRuntimeService.get_backend` is deprecated. Please -:meth:`qiskit_ibm_runtime.QiskitRuntimeService.backend` use instead. -The V1 fake backends, :class:`.FakeBackend`, along with :class:`.FakeProvider` are also -being deprecated in favor of the V2 fake backends and :class:`.FakeProviderForBackendV2`. \ No newline at end of file diff --git a/release-notes/unreleased/1699.feat.rst b/release-notes/unreleased/1699.feat.rst deleted file mode 100644 index 03b7ec925..000000000 --- a/release-notes/unreleased/1699.feat.rst +++ /dev/null @@ -1,2 +0,0 @@ -When saving an account, there is a new parameter, ``private_endpoint`` that if set to ``True``, allows -users to connect to a private IBM Cloud API. \ No newline at end of file diff --git a/release-notes/unreleased/1715.feat.rst b/release-notes/unreleased/1715.feat.rst deleted file mode 100644 index 0590dff98..000000000 --- a/release-notes/unreleased/1715.feat.rst +++ /dev/null @@ -1,28 +0,0 @@ -New opt-in feature to support fractional gates is added to :class:`.IBMBackend`. -IBM backends currently support dynamic circuits and fractional gates exclusively and -the two features cannot be used in the same primitive job. -In addition, some error mitigation protocols you can use with the estimator primitive, -such as PEC or PEA, may not support gate twirling with the fractional gates. -Since Qiskit Target model doesn't represent such constraint, -we adopted the opt-in approach, where your backend target includes only -fractional gates (control flow instructions) when the backend is (not) opted. -This feature is controlled when you retrieve the target backend from the :class:`.QiskitRuntimeService`. - -.. code-block:: python - - from qiskit_ibm_runtime import QiskitRuntimeService - - backend = QiskitRuntimeService(channel="ibm_quantum").backends( - "name_of_your_backend", - use_fractional_gates=True, - )[0] - -When the fractional feature is enabled, transpiled circuits may have -shorter depth compared with the conventional IBM basis gates, e.g. [sx, rz, ecr]. - -When you use control flow instructions, e.g. ``if_else``, in your circuit, -you must disable the fractional gate feature to get executable ISA circuits. -The choice of the instruction set is now responsibility of users. - -Note that this pattern may be modified or removed without deprecation -when the IBM backends is updated in future development. diff --git a/release-notes/unreleased/1722.bug.rst b/release-notes/unreleased/1722.bug.rst deleted file mode 100644 index 08b01445f..000000000 --- a/release-notes/unreleased/1722.bug.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed measurement twirling docstring which incorrectly indicated it's enabled by default for Sampler. \ No newline at end of file diff --git a/release-notes/unreleased/1728.feat.rst b/release-notes/unreleased/1728.feat.rst deleted file mode 100644 index 291e3580d..000000000 --- a/release-notes/unreleased/1728.feat.rst +++ /dev/null @@ -1 +0,0 @@ -You can now use the experimental option in :class:`qiskit_ibm_runtime.options.EstimatorOptions` to enable Probabilistic Error Amplification (PEA) error mitigation method for your estimator jobs. \ No newline at end of file diff --git a/release-notes/unreleased/1731.bug.rst b/release-notes/unreleased/1731.bug.rst deleted file mode 100644 index dbc530209..000000000 --- a/release-notes/unreleased/1731.bug.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed nested experimental suboptions override non-experimental suboptions. \ No newline at end of file diff --git a/release-notes/unreleased/1731.deprecation.rst b/release-notes/unreleased/1731.deprecation.rst deleted file mode 100644 index 0e3db9029..000000000 --- a/release-notes/unreleased/1731.deprecation.rst +++ /dev/null @@ -1,3 +0,0 @@ -Specifying options without the full dictionary structure is deprecated. Instead, pass -in a fully structured dictionary. For example, use ``{'environment': {'log_level': 'INFO'}}`` -instead of ``{'log_level': 'INFO'}``. \ No newline at end of file diff --git a/release-notes/unreleased/1732.upgrade.rst b/release-notes/unreleased/1732.upgrade.rst deleted file mode 100644 index f4edf5f90..000000000 --- a/release-notes/unreleased/1732.upgrade.rst +++ /dev/null @@ -1,5 +0,0 @@ -The :meth:`.QiskitRuntimeService.backends` now always returns -new :class:`IBMBackend` instance even for the same query. -The backend properties and defaults data are retrieved from the server -for every instance when they are accessed for the first time, -while the configuration data is cached internally in the service instance. diff --git a/setup.py b/setup.py index 6ccfcc278..f68ea9fec 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ "websocket-client>=1.5.1", "ibm-platform-services>=0.22.6", "pydantic", - "qiskit>=1.0.0", + "qiskit>=1.1.0", ] # Handle version. diff --git a/test/integration/test_ibm_job.py b/test/integration/test_ibm_job.py index cb9b79a1e..919746adc 100644 --- a/test/integration/test_ibm_job.py +++ b/test/integration/test_ibm_job.py @@ -121,6 +121,10 @@ def test_retrieve_completed_jobs(self): def test_retrieve_pending_jobs(self): """Test retrieving jobs with the pending filter.""" + if self.dependencies.channel == "ibm_quantum": + raise SkipTest( + "Intermittently failing on ibm quantum channel, needs more investigation." + ) pending_job_list = self.service.jobs( program_id="sampler", limit=3, pending=True, created_after=self.last_month ) diff --git a/test/unit/transpiler/passes/scheduling/test_scheduler.py b/test/unit/transpiler/passes/scheduling/test_scheduler.py index 1958b576f..f41a9899a 100644 --- a/test/unit/transpiler/passes/scheduling/test_scheduler.py +++ b/test/unit/transpiler/passes/scheduling/test_scheduler.py @@ -12,7 +12,6 @@ """Test the dynamic circuits scheduling analysis""" -from unittest import skip from unittest.mock import patch from qiskit import ClassicalRegister, QuantumCircuit, QuantumRegister, transpile @@ -871,7 +870,6 @@ def test_registers(self): self.assertEqual(expected, scheduled) - @skip("Plugin method no longer patched after Qiskit/11996") def test_c_if_plugin_conversion_with_transpile(self): """Verify that old format c_if may be converted and scheduled after transpilation with the plugin.""" @@ -2029,7 +2027,6 @@ def test_transpile_both_paths(self): expected.delay(160, qr[q_ind]) self.assertEqual(expected, scheduled) - @skip("Plugin method no longer patched after Qiskit/11996") def test_c_if_plugin_conversion_with_transpile(self): """Verify that old format c_if may be converted and scheduled after transpilation with the plugin."""