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

Add V2 primitive Q-Ctrl tests #1534

Merged
merged 9 commits into from
Apr 6, 2024
Merged

Conversation

kt474
Copy link
Member

@kt474 kt474 commented Mar 18, 2024

Summary

Ready for initial review - wasn't completely sure how detailed the tests should be, my understanding is that we're just testing "does it run"/happy path.

Details and comments

Fixes #1499

@coveralls
Copy link

coveralls commented Mar 18, 2024

Pull Request Test Coverage Report for Build 8565471759

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

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 83.648%

Totals Coverage Status
Change from base Build 8527763739: 0.0%
Covered Lines: 6210
Relevant Lines: 7424

💛 - Coveralls

@kt474 kt474 marked this pull request as ready for review March 19, 2024 18:08
@kt474 kt474 requested review from jyu00 and mberna March 19, 2024 18:13
@kt474 kt474 requested review from gadial and ptristan3 April 2, 2024 18:55
Copy link
Collaborator

@jyu00 jyu00 left a comment

Choose a reason for hiding this comment

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

#1499 also says

Allow V2 primitives to be called with Q-Ctrl channel strategy, assuming there are no major issues found by the tests

def setUp(self) -> None:
super().setUp()
self.bell = bell()
self.backend = "alt_canberra"
Copy link
Collaborator

Choose a reason for hiding this comment

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

We shouldn't hard code backend name

@run_integration_test
def test_sampler_v2_qctrl(self, service):
"""Test qctrl bell state with samplerV2"""
shots = 1000
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's save some QPU time if we are not verifying result data

Suggested change
shots = 1000
shots = 1

@kt474
Copy link
Member Author

kt474 commented Apr 4, 2024

#1499 also says

Allow V2 primitives to be called with Q-Ctrl channel strategy, assuming there are no major issues found by the tests

It was enabled in #1550

@kt474 kt474 requested a review from jyu00 April 4, 2024 16:57
Comment on lines 54 to 57
bell_circuit = QuantumCircuit(2)
bell_circuit.h(0)
bell_circuit.cx(0, 1)
bell_circuit.measure_all()
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit - why create your own bell circuit when there is a self.bell?

test/qctrl/test_qctrl.py Outdated Show resolved Hide resolved
@kt474 kt474 merged commit 833b9d2 into Qiskit:main Apr 6, 2024
20 checks passed
@kt474 kt474 deleted the q-ctrl-v2-primitives-tests branch April 6, 2024 05:06
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.

Write integration tests for v2 primitives for Q-Ctrl
3 participants