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

Fix circuit ordering in InterleavedRB #1191

Merged
merged 4 commits into from
Jun 2, 2023

Conversation

itoko
Copy link
Contributor

@itoko itoko commented May 26, 2023

Summary

Changes the ordering of circuits generated by InterleavedRB back to RIRIRI (R: Reference, I: Interleaved) order. It was accidentally changed into RRRIII order in #898. Before that, it had been RIRIRI order.

Details and comments

This change may slightly alter the impact of noise on IRB results. RIRIRI ordering is preferable in the sense that it minimizes the impact of drift or noise fluctuations. Note that InterleavedRBAnalysis is not changed that means it works correctly regardless of the circuit ordering because it processes data relying on "interleaved" flag in circuit metadata.

This commit also adds a new experiment option circuit_order to InterleavedRB. It enables to change the order of the reference and the interleaved circuits and hence slightly alter the impact of noise on interleaved RB results. The default value is set to "RIRIRI".

@coruscating
Copy link
Collaborator

I think the circuit order can be an experiment option defaulting to RIRIRI that can be optionally set upon experiment instantiation as well, what do you think?

@itoko
Copy link
Contributor Author

itoko commented May 31, 2023

That makes sense to me. BTW. I'm understanding Qiskit Experiments has a convention that all experiment options can be set upon experiment instantiation. Is it correct?

Copy link
Collaborator

@coruscating coruscating 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, thanks! The current convention is that options can be and are usually set upon instantiation, but it might be worth formalizing the rules on when exactly options (and the backend) can be specified with the planned refactoring of the workflow.

@coruscating coruscating added the backport stable potential The issue or PR might be minimal and/or import enough to backport to stable label Jun 2, 2023
@itoko itoko added this pull request to the merge queue Jun 2, 2023
Merged via the queue into qiskit-community:main with commit c6753f3 Jun 2, 2023
mergify bot pushed a commit that referenced this pull request Jun 2, 2023
### Summary
Changes the ordering of circuits generated by `InterleavedRB` back to
RIRIRI (R: Reference, I: Interleaved) order. It was accidentally changed
into RRRIII order in #898. Before that, it had been RIRIRI order.

### Details and comments
This change may slightly alter the impact of noise on IRB results.
RIRIRI ordering is preferable in the sense that it minimizes the impact
of drift or noise fluctuations. Note that `InterleavedRBAnalysis` is not
changed that means it works correctly regardless of the circuit ordering
because it processes data relying on "interleaved" flag in circuit
metadata.

This commit also adds a new experiment option `circuit_order` to
`InterleavedRB`. It enables to change the order of the reference and the
interleaved circuits and hence slightly alter the impact of noise on
interleaved RB results. The default value is set to `"RIRIRI"`.

(cherry picked from commit c6753f3)
coruscating added a commit that referenced this pull request Jun 29, 2023
This is an automatic backport of pull request #1191 done by
[Mergify](https://mergify.com).


---


<details>
<summary>Mergify commands and options</summary>

<br />

More conditions and actions can be found in the
[documentation](https://docs.mergify.com/).

You can also trigger Mergify actions by commenting on this pull request:

- `@Mergifyio refresh` will re-evaluate the rules
- `@Mergifyio rebase` will rebase this PR on its base branch
- `@Mergifyio update` will merge the base branch into this PR
- `@Mergifyio backport <destination>` will backport this PR on
`<destination>` branch

Additionally, on Mergify [dashboard](https://dashboard.mergify.com) you
can:

- look at your merge queues
- generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com
</details>

Co-authored-by: Toshinari Itoko <[email protected]>
Co-authored-by: Helena Zhang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport stable potential The issue or PR might be minimal and/or import enough to backport to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants