Skip to content

Fixes to various graphs in the docs#14055

Merged
gadial merged 6 commits intoQiskit:mainfrom
gadial:fix_doc_graph
Mar 24, 2025
Merged

Fixes to various graphs in the docs#14055
gadial merged 6 commits intoQiskit:mainfrom
gadial:fix_doc_graph

Conversation

@gadial
Copy link
Copy Markdown
Contributor

@gadial gadial commented Mar 19, 2025

Summary

Fixes visual problems in the display of some of the visualizations in the docs.

Fixes #13558
Fixes #13632

Details and comments

What's fixed

What was not fixed

Before/after screenshots

GratphState

image
image

QuantumVolume

image
image

InnerProduct

image
image

DynamicalDecoupling

image
image

@gadial gadial added the Changelog: Fixed Add a "Fixed" entry in the GitHub Release changelog. label Mar 19, 2025
@gadial gadial added this to the 2.1.0 milestone Mar 19, 2025
@gadial gadial requested a review from mtreinish March 19, 2025 15:38
@gadial gadial requested review from a team and nonhermitian as code owners March 19, 2025 15:38
@qiskit-bot
Copy link
Copy Markdown
Collaborator

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

  • @enavarro51
  • @Cryoris
  • @Qiskit/terra-core
  • @ajavadia
  • @nkanazawa1989

@ShellyGarion
Copy link
Copy Markdown
Member

ShellyGarion commented Mar 19, 2025

can you also fix this similar issue? #13632

@ShellyGarion
Copy link
Copy Markdown
Member

@gadial
Copy link
Copy Markdown
Contributor Author

gadial commented Mar 20, 2025

@coveralls
Copy link
Copy Markdown

coveralls commented Mar 20, 2025

Pull Request Test Coverage Report for Build 14019415716

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 6 of 22 (27.27%) changed or added relevant lines in 4 files are covered.
  • 67 unchanged lines in 9 files lost coverage.
  • Overall coverage decreased (-0.02%) to 88.06%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/visualization/counts_visualization.py 2 4 50.0%
qiskit/visualization/library.py 0 3 0.0%
qiskit/visualization/timeline/plotters/matplotlib.py 0 4 0.0%
qiskit/visualization/state_visualization.py 4 11 36.36%
Files with Coverage Reduction New Missed Lines %
crates/accelerate/src/unitary_synthesis.rs 1 94.79%
crates/qasm2/src/expr.rs 1 94.23%
qiskit/visualization/state_visualization.py 1 57.37%
qiskit/visualization/timeline/plotters/matplotlib.py 1 0.0%
qiskit/circuit/library/standard_gates/u1.py 3 94.57%
crates/qasm2/src/lex.rs 7 91.98%
crates/circuit/src/packed_instruction.rs 8 94.23%
crates/circuit/src/operations.rs 11 91.0%
crates/accelerate/src/two_qubit_decompose.rs 34 91.67%
Totals Coverage Status
Change from base Build 13949351916: -0.02%
Covered Lines: 72616
Relevant Lines: 82462

💛 - Coveralls

Copy link
Copy Markdown
Contributor

@ElePT ElePT left a comment

Choose a reason for hiding this comment

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

Thanks @gadial. Given that the fix only affects docs generated by sphinx, I think we can consider this a documentation fix, which doesn't require a release note.

@ShellyGarion ShellyGarion modified the milestones: 2.1.0, 2.0.0 Mar 20, 2025
@ShellyGarion ShellyGarion added the documentation Something is not clear or an error documentation label Mar 20, 2025
@gadial gadial requested a review from ElePT March 23, 2025 14:34
@ElePT ElePT added the stable backport potential Make Mergify open a backport PR to the most recent stable branch on merge. label Mar 24, 2025
Copy link
Copy Markdown
Contributor

@ElePT ElePT left a comment

Choose a reason for hiding this comment

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

Thanks @gadial! The changes LGTM. The visual test references are always very annoying, because depending on the OS and other small factors, the images show this small discrepancy that breaks tests. I think that reducing the tolerance is ok in this case, not perfect, but comparing pixels is not a perfect method anyways. Alternatively, what usually do in these cases, is that I copy the output image generated in the CI visual tests published artifacts (here), but I wouldn't bother doing it in this case, I can see in the artifacts that the images are essentially correct.

@gadial gadial added this pull request to the merge queue Mar 24, 2025
Merged via the queue into Qiskit:main with commit dc672d5 Mar 24, 2025
21 checks passed
mergify Bot pushed a commit that referenced this pull request Mar 24, 2025
* Fixes to various graphs in the docs

* Fix a bug caused by `tight_layout` crashing on some images

* Apply the fix to the timeline plotter

* Remove release note and fix bloch sphere visualization

* Additional bloch fix

* Slighly relax image compairson for bloch sphere due to small discrepancies between the server and local versions.

(cherry picked from commit dc672d5)
github-merge-queue Bot pushed a commit that referenced this pull request Mar 24, 2025
* Fixes to various graphs in the docs

* Fix a bug caused by `tight_layout` crashing on some images

* Apply the fix to the timeline plotter

* Remove release note and fix bloch sphere visualization

* Additional bloch fix

* Slighly relax image compairson for bloch sphere due to small discrepancies between the server and local versions.

(cherry picked from commit dc672d5)

Co-authored-by: gadial <gadial@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog: Fixed Add a "Fixed" entry in the GitHub Release changelog. documentation Something is not clear or an error documentation stable backport potential Make Mergify open a backport PR to the most recent stable branch on merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug in circuit library visualization function Problem with graph in some API docs

5 participants