Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Restless experiments data processing #4

Open
wants to merge 76 commits into
base: main
Choose a base branch
from

Conversation

catornow
Copy link

@catornow catornow commented Dec 18, 2021

ToDo:

  • Add tests.
  • Add additional tests.
  • Improve tutorial.
  • Improve summary and details.

Summary

This PR implements the new data processing nodes RestlessNode and RestlessToCounts. These allow users to perform and analyze experiments based on restless measurements (without qubit reset) to significantly speed-up calibration experiments compared to standard experiments based on active reset, see https://arxiv.org/pdf/2202.06981.pdf.

Details and comments

Certain experiments, e.g., calibration experiments or Randomized Benchmarking, can be run in a restless setting.
In a restless experiment the qubits are not reset after a measurement and the subsequent circuit is run after a short delay of, e.g., 1 us. Consequently, the initial state of a circuit is either |0> or |1> depending on the outcome of the previous circuit. This makes the post-processing of the single measurement outcomes of each circuit necessary which is done by the new data processing nodes introduced in this PR. Crucially, restless experiments provide a fast alternative to several characterization and calibration tasks based on active reset.

The following run options define a restless experiment:

  1. Set the rep_delay to a small value, e.g. 1 us.
  2. Ensure that the qubits are not reset to the ground state throughout the experiment: init_qubits=False.
  3. Set memory=True to ensure that the single measurement shots are returned. This is needed for post-processing.
  4. Set meas_level=2.

Restless experiments will automatically be post-processed by the new restless nodes.

Example

We can define a restless RoughDrag experiment by specifying the restless run options:

restless_cal_drag = RoughDrag(qubit, ...)
restless_cal_drag.set_experiment_options(...)

# set restless run options.
restless_cal_drag.set_run_options(rep_delay=1e-6, meas_level=2, memory=True, init_qubits=False)

Copy link
Owner

@eggerdj eggerdj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good. Can you setup an extra test that uses a restless simulator to produce counts for an experiment so that we can create an end-to-end test?

qiskit_experiments/data_processing/processor_library.py Outdated Show resolved Hide resolved
qiskit_experiments/curve_analysis/curve_analysis.py Outdated Show resolved Hide resolved
qiskit_experiments/curve_analysis/curve_analysis.py Outdated Show resolved Hide resolved
qiskit_experiments/data_processing/nodes.py Outdated Show resolved Hide resolved
qiskit_experiments/data_processing/nodes.py Outdated Show resolved Hide resolved
qiskit_experiments/data_processing/nodes.py Outdated Show resolved Hide resolved
qiskit_experiments/data_processing/processor_library.py Outdated Show resolved Hide resolved
test/data_processing/test_nodes.py Outdated Show resolved Hide resolved
test/data_processing/test_nodes.py Outdated Show resolved Hide resolved
test/data_processing/test_nodes.py Outdated Show resolved Hide resolved
Copy link
Owner

@eggerdj eggerdj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. We must also document the arguments that get_processor needs to extract from the metadata in its docstring.

qiskit_experiments/data_processing/processor_library.py Outdated Show resolved Hide resolved
qiskit_experiments/data_processing/processor_library.py Outdated Show resolved Hide resolved
qiskit_experiments/data_processing/processor_library.py Outdated Show resolved Hide resolved
qiskit_experiments/data_processing/processor_library.py Outdated Show resolved Hide resolved
qiskit_experiments/data_processing/processor_library.py Outdated Show resolved Hide resolved
qiskit_experiments/data_processing/nodes.py Outdated Show resolved Hide resolved
test/data_processing/test_nodes.py Outdated Show resolved Hide resolved
catornow and others added 30 commits February 3, 2022 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants