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

Remove use of qasm simulator #589

Merged
merged 3 commits into from
May 15, 2024
Merged

Remove use of qasm simulator #589

merged 3 commits into from
May 15, 2024

Conversation

garrison
Copy link
Member

@garrison garrison commented May 15, 2024

Closes #502.

I had not noticed before, but the section on setting up the sampler primitive appears twice in the second cutqc tutorial. So I was able to remove the first appearance.

@garrison garrison added the cutqc Related to the wire cutting code based on the CutQC paper, arXiv:2012.02333 label May 15, 2024
@garrison garrison added this to the 0.7.2 milestone May 15, 2024
@garrison garrison marked this pull request as draft May 15, 2024 14:01
Comment on lines 84 to 85
backend_names_repeated = ["ibmq_qasm_simulator"] * len(subcircuits)
least_busy = service.least_busy().name
backend_names_repeated = [least_busy] * len(subcircuits)
Copy link
Member Author

@garrison garrison May 15, 2024

Choose a reason for hiding this comment

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

Actually, I am going to change this to restore the old code path and just put a warning right before it. I am doing this with the typical persona of somebody using this (deprecated) code in mind. If I were using cutqc still, I'd be very surprised if I upgraded and my old code that used a cloud qasm simulator suddenly uses a hardware backend instead. Better is for the user to have an error occur, and to be able to deal with it as they see fit. With the warning, they'll have a bit more context for why the qasm simulator is suddenly failing and what to do to fix it (pass backend_names).

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated accordingly in 2d27024.

@garrison garrison added the stable backport potential Suitable to be backported to most recent stable branch by Mergify label May 15, 2024
@garrison garrison marked this pull request as ready for review May 15, 2024 15:48
@coveralls
Copy link

coveralls commented May 15, 2024

Pull Request Test Coverage Report for Build 9099267395

Details

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

Changes Missing Coverage Covered Lines Changed/Added Lines %
circuit_knitting/cutting/cutqc/wire_cutting_evaluation.py 1 2 50.0%
Totals Coverage Status
Change from base Build 9084779766: -0.03%
Covered Lines: 3500
Relevant Lines: 3666

💛 - Coveralls

Copy link
Collaborator

@caleb-johnson caleb-johnson left a comment

Choose a reason for hiding this comment

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

Thanks!

@garrison garrison merged commit e3db27b into main May 15, 2024
11 checks passed
@garrison garrison deleted the rm-qasm-simulator branch May 15, 2024 16:46
mergify bot pushed a commit that referenced this pull request May 15, 2024
* Remove use of qasm simulator

Closes #502.

* Replace default configuration change with a warning

* Add `stacklevel` to warning

(cherry picked from commit e3db27b)
garrison added a commit that referenced this pull request May 15, 2024
* Remove use of qasm simulator

Closes #502.

* Replace default configuration change with a warning

* Add `stacklevel` to warning

(cherry picked from commit e3db27b)

Co-authored-by: Jim Garrison <garrison@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cutqc Related to the wire cutting code based on the CutQC paper, arXiv:2012.02333 stable backport potential Suitable to be backported to most recent stable branch by Mergify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove uses of ibmq_qasm_simulator from cutqc tutorials
3 participants