Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Option to dynamically decouple qubits regardless of their state #776

Merged
merged 14 commits into from
Mar 12, 2024

Conversation

dieris
Copy link
Contributor

@dieris dieris commented Dec 18, 2023

Summary

Modify behavior of skip_reset_qubits optional argument. If False, dynamical decoupling is applied on qubits regardless of their state, even on delays that are at the beginning of a circuit. This option now matches the behavior in qiskit.

Details and comments

This can be useful to enforce the same DD sequence to be applied throughout a circuit regardless of the qubit state (as determined by the preceding nodes).

@coveralls
Copy link

coveralls commented Dec 18, 2023

Pull Request Test Coverage Report for Build 8253340646

Details

  • 3 of 3 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 43.375%

Totals Coverage Status
Change from base Build 8099540967: 0.03%
Covered Lines: 2943
Relevant Lines: 6785

💛 - Coveralls

@ajavadia
Copy link
Member

ajavadia commented Jan 20, 2024

can we make this the same as the dynamical decoupling in qiskit? There the __init__ has an argument skip_reset_qubits which is set to True by default, and setting it to False will instruct the pass to insert DD regardless of qubit state.
https://github.com/Qiskit/qiskit/blob/a7fa6c52a6191034e52ef015378b9fc8cee34a26/qiskit/transpiler/passes/scheduling/dynamical_decoupling.py#L115

@dieris
Copy link
Contributor Author

dieris commented Jan 22, 2024

That's a good point. I realized that skip_reset_qubits here is already an option, but only enforces DD (when False) if the circuit is actually following a reset, but not on qubits that have delays at the beginning of a circuit (the reason being that those qubits are not marked as dirty). I believe this is different behavior than in qiskit, so it may make more sense to align it here instead of adding include_clean_qubits as a different option.

In other words,
current behavior with skip_reset_qubits = False

image

Desired behavior:
image

Copy link
Member

@ajavadia ajavadia 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. can you update the PR summary to match the recent change as well

@kt474 kt474 added the Changelog: New Feature Include in the Added section of the changelog label Mar 12, 2024
@kt474 kt474 merged commit 96c3b94 into Qiskit:main Mar 12, 2024
19 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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