Skip to content

Conversation

@catornow
Copy link
Contributor

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

See code. This PR implements the core part of PR #675.

Copy link
Collaborator

@nkanazawa1989 nkanazawa1989 left a comment

Choose a reason for hiding this comment

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

Thanks for splitting PRs. This is much easier to review. I added several comments.

Copy link
Contributor

@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 looks good to me a few minor comments on docs and tests.

catornow and others added 6 commits February 25, 2022 11:00
Co-authored-by: Daniel J. Egger <38065505+eggerdj@users.noreply.github.com>
Co-authored-by: Daniel J. Egger <38065505+eggerdj@users.noreply.github.com>
Co-authored-by: Daniel J. Egger <38065505+eggerdj@users.noreply.github.com>
Co-authored-by: Daniel J. Egger <38065505+eggerdj@users.noreply.github.com>
Copy link
Collaborator

@nkanazawa1989 nkanazawa1989 left a comment

Choose a reason for hiding this comment

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

I added minor comment but rest of code looks good. Thanks @catornow

Once the shots have been ordered in this fashion the data can be post-processed.
"""

def __init__(self, validate: bool = True, circuits_first: bool = True):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we rename circuit_first to memory_allocation taking value "C" (circuit-first), "S" (shot-first) and show a both data structures in class documentation with these labels? Currently only circuit first is shown and user may get wrong impression that the node only supports circuit-first. This memory representation convention would be useful when we implement another type of data processor, i.e. such label can be attached to metadata.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good. We could make this convention more explicit with an Enum to add proper documentation. Perhaps:

from enum import Enum

class ShotOrder(Enum):
    """Description ..."""
    circuit_first = "c"
    shot_first = "s"

and then

    def __init__(self, validate: bool = True, memory_allocation: ShotOrder = ShotOrder.circuit_first):

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I implemented the code here: 07e777f.

Copy link
Collaborator

@nkanazawa1989 nkanazawa1989 left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks @catornow! It would be great if you could write documentation for shot-first, but this doesn't block merging.

Copy link
Contributor

@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.

LGTM!

@eggerdj eggerdj merged commit fcd182d into qiskit-community:main Feb 28, 2022
@chriseclectic chriseclectic added the Changelog: New Feature Include in the "Added" section of the changelog label Apr 25, 2022
paco-ri pushed a commit to paco-ri/qiskit-experiments that referenced this pull request Jul 11, 2022
* Added restless nodes and tests.

Co-authored-by: Daniel J. Egger <38065505+eggerdj@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog: New Feature Include in the "Added" section of the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants