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 Shor example #1439

Merged
merged 1 commit into from
Sep 13, 2024
Merged

Fix Shor example #1439

merged 1 commit into from
Sep 13, 2024

Conversation

stavros11
Copy link
Member

@stavros11 stavros11 commented Sep 9, 2024

Fix Shor example, which is outdated since #1039, as reported in #1432.

The measurement in the end is needed because it is no longer possible to execute circuits that contain only collapse measurements using state vectors.

Specifying nshots=1 is needed because a default nshots=1000 was introduced in #1039 compared to the None being used before. This was also causing the performance issue reported in #1432, because during the repeated execution it was executing the circuit 1000 times instead of one that we need.

Checklist:

  • Reviewers confirm new code works as expected.
  • Tests are passing.
  • Coverage does not decrease.
  • Documentation is updated.

@stavros11 stavros11 linked an issue Sep 9, 2024 that may be closed by this pull request
Copy link
Contributor

@igres26 igres26 left a comment

Choose a reason for hiding this comment

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

Thanks! This looks like the solution.

Copy link
Contributor

@MatteoRobbiati MatteoRobbiati left a comment

Choose a reason for hiding this comment

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

Thanks.

Copy link

codecov bot commented Sep 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.10%. Comparing base (e93ec84) to head (c645237).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1439   +/-   ##
=======================================
  Coverage   97.10%   97.10%           
=======================================
  Files          81       81           
  Lines       11653    11653           
=======================================
  Hits        11316    11316           
  Misses        337      337           
Flag Coverage Δ
unittests 97.10% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MatteoRobbiati MatteoRobbiati added this pull request to the merge queue Sep 13, 2024
Merged via the queue into master with commit a55d05f Sep 13, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shor example performance drop
3 participants