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

Don't wrap global phase if parameterized #689

Merged
merged 5 commits into from
Aug 8, 2023

Conversation

dieris
Copy link
Contributor

@dieris dieris commented Aug 1, 2023

Summary

Dynamical decoupling cannot currently be applied on a circuits where global phases contain unbound parameters, due to the _mod_2pi wrapping.

This PR replaces the _mod_2pi method with the global phase setter in DAGCircuit, wrapping the phase to the [0, 2π) interval (for floats).

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5729356354

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.03%) to 51.13%

Totals Coverage Status
Change from base Build 5728346612: -0.03%
Covered Lines: 3304
Relevant Lines: 6462

💛 - Coveralls

@kt474 kt474 requested a review from taalexander August 1, 2023 16:44
Copy link
Contributor

@taalexander taalexander left a comment

Choose a reason for hiding this comment

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

I believe this code was inherited from Qiskit when I started this PR. It seems ok if tests are passing but should be tested with hardware.

@dieris
Copy link
Contributor Author

dieris commented Aug 2, 2023

Yes, indeed, I believe qiskit dynamical_decoupling would have the same problem, I can open an issue there too

@kt474 kt474 added this to the 0.6.3 milestone Aug 6, 2023
@kt474 kt474 added the Changelog: Bugfix Include in the Fixed section of the changelog label Aug 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Changelog: Bugfix Include in the Fixed section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants