Skip to content

Commit f1f2f37

Browse files
committed
Remove RestlessMixin and deprecate restless nodes
This change removes the previously deprecated `RestlessMixin` class and deprecates the restless processing nodes `RestlessToIQ` and `RestlessToCounts`. The motivation for the removals is to streamline the remaining code base. The restless features are little used and it remains possible to set up experiments to run in restless mode by using a custom data processor even without support in the base package.
1 parent eecce03 commit f1f2f37

20 files changed

+81
-798
lines changed

docs/conf.py

-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@
9494
"manuals/verification/quantum_volume": "_images/quantum_volume_2_0.png",
9595
"manuals/measurement/readout_mitigation": "_images/readout_mitigation_4_0.png",
9696
"manuals/verification/randomized_benchmarking": "_images/randomized_benchmarking_3_1.png",
97-
"manuals/measurement/restless_measurements": "_images/restless_shots.png",
9897
"manuals/verification/state_tomography": "_images/state_tomography_3_0.png",
9998
"manuals/characterization/t1": "_images/t1_0_0.png",
10099
"manuals/characterization/t2ramsey": "_images/t2ramsey_4_0.png",

docs/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ We've divided up the documentation into four sections with different purposes:
6262
these manuals:
6363

6464
* How to analyze 1- and 2-qubit errors in :doc:`randomized benchmarking </manuals/verification/randomized_benchmarking>`
65-
* How to calculate the speedup from using :doc:`restless measurements </manuals/measurement/restless_measurements>`
65+
* How to characterize a quantum circuit using :doc:`state tomography </manuals/verification/state_tomography>`
6666

6767
+++
6868

docs/manuals/measurement/restless_measurements.rst

-241
This file was deleted.
-1.23 MB
Binary file not shown.

docs/tutorials/custom_experiment.rst

-5
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@ Optionally, to allow configuring experiment and execution options, you can overr
6262
metadata["device_components"] = list(map(Resonator, self.physical_qubits))
6363
return metadata
6464

65-
Furthermore, some characterization and calibration experiments can be run with restless
66-
measurements, i.e. measurements where the qubits are not reset and circuits are executed
67-
immediately after the previous measurement. Here, the :class:`.RestlessMixin` class
68-
can help to set the appropriate run options and data processing chain.
69-
7065
Analysis subclassing
7166
--------------------
7267

docs/tutorials/data_processor.rst

+1-7
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,7 @@ processing connects the data returned by the backend to the data that
192192
the analysis classes need. Typically, you will not need to implement
193193
the data processing yourself since Qiskit Experiments has built-in
194194
methods that determine the correct instance of :class:`.DataProcessor` for
195-
your data. More advanced data processing includes, for example, handling
196-
:doc:`restless measurements </manuals/measurement/restless_measurements>`.
195+
your data.
197196

198197
References
199198
----------
@@ -202,8 +201,3 @@ References
202201
Christopher J. Wood, Ali Javadi-Abhari, David McKay, Qiskit Pulse:
203202
Programming Quantum Computers Through the Cloud with Pulses, Quantum
204203
Science and Technology **5**, 044006 (2020). https://arxiv.org/abs/2004.06755.
205-
206-
See also
207-
--------
208-
209-
- Experiment manual: :doc:`/manuals/measurement/restless_measurements`

qiskit_experiments/data_processing/nodes.py

+12
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from uncertainties import unumpy as unp, ufloat
2424

2525
from qiskit.result.postprocess import format_counts_memory
26+
from qiskit.utils import deprecate_func
2627
from qiskit_experiments.data_processing.data_action import DataAction, TrainableDataAction
2728
from qiskit_experiments.data_processing.exceptions import DataProcessorError
2829
from qiskit_experiments.data_processing.discriminator import BaseDiscriminator
@@ -910,6 +911,17 @@ class RestlessNode(DataAction, ABC):
910911
Once the shots have been ordered in this fashion the data can be post-processed.
911912
"""
912913

914+
@deprecate_func(
915+
since="0.9",
916+
additional_msg=(
917+
"Restless data processing nodes will be removed from "
918+
"qiskit-experiments. Refer to the RestlessMixin code of "
919+
"qiskit-experiment 0.8 and the code for RestlessToIQ and "
920+
"RestlessToCounts for the way to use a custom restless "
921+
"processor on an experiment."
922+
),
923+
package_name="qiskit-experiments",
924+
)
913925
def __init__(
914926
self, validate: bool = True, memory_allocation: ShotOrder = ShotOrder.circuit_first
915927
):

qiskit_experiments/data_processing/processor_library.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def get_kerneled_processor(
3737
one dimension.
3838
meas_return: Type of data returned by the backend, i.e., averaged data or single-shot data.
3939
normalize: If True then normalize the output data to the interval ``[0, 1]``.
40-
pre_nodes: any nodes to be applied first in the data processing chain such as restless nodes.
40+
pre_nodes: any nodes to be applied first in the data processing chain
4141
4242
Returns:
4343
An instance of DataProcessor capable of processing `meas_level=MeasLevel.KERNELED` data for

qiskit_experiments/framework/__init__.py

-2
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@
130130
131131
BackendData
132132
BackendTiming
133-
RestlessMixin
134133
135134
"""
136135
from qiskit.providers.options import Options
@@ -161,4 +160,3 @@
161160
)
162161
from .json import ExperimentEncoder, ExperimentDecoder
163162
from .provider_interfaces import BaseJob, BaseProvider, ExtendedJob, IBMProvider, Job, Provider
164-
from .restless_mixin import RestlessMixin

0 commit comments

Comments
 (0)