Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Dec 5, 2025

Summary

The timeline drawer was storing the unitary of a gate from the target in the metadata collected around drawing properties for some reason. This field was never used by anything but was in the metadata dictionary used for visualization. However, if there is a gate without a unitary in the target (such as a parameterized gate like RGate(theta, phi) which has a duration then this would error. Since we don't use the unitary for anything there is no reason to collect. This commit fixes the issue by removing the unitary from this internal metadata dictionary.

Details and comments


This is an automatic backport of pull request #15421 done by [Mergify](https://mergify.com).

The timeline drawer was storing the unitary of a gate from the target in
the metadata collected around drawing properties for some reason. This
field was never used by anything but was in the metadata dictionary used
for visualization. However, if there is a gate without a unitary in the
target (such as a parameterized gate like RGate(theta, phi) which has a
duration then this would error. Since we don't use the unitary for
anything there is no reason to collect. This commit fixes the issue by
removing the unitary from this internal metadata dictionary.

(cherry picked from commit 9ef5a83)
@mergify mergify bot requested a review from a team as a code owner December 5, 2025 23:22
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the following people are relevant to this code:

@github-actions github-actions bot added this to the 2.2.4 milestone Dec 5, 2025
@github-actions github-actions bot added Changelog: Bugfix Include in the "Fixed" section of the changelog mod: visualization qiskit.visualization labels Dec 5, 2025
@jakelishman jakelishman enabled auto-merge December 5, 2025 23:30
@coveralls
Copy link

Pull Request Test Coverage Report for Build 19978823878

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 12 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.01%) to 88.436%

Files with Coverage Reduction New Missed Lines %
crates/circuit/src/parameter/symbol_expr.rs 2 73.19%
crates/qasm2/src/lex.rs 4 91.75%
crates/qasm2/src/parse.rs 6 97.09%
Totals Coverage Status
Change from base Build 19577979235: 0.01%
Covered Lines: 92404
Relevant Lines: 104487

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog: Bugfix Include in the "Fixed" section of the changelog mod: visualization qiskit.visualization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants