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

[UnitaryHack] Mock provider, backend #107

Merged
merged 11 commits into from
Jun 29, 2023

Conversation

WingCode
Copy link
Contributor

@WingCode WingCode commented Jun 9, 2023

Summary

Mocks backend, provider, job

Details and comments

closes #19

@WingCode
Copy link
Contributor Author

WingCode commented Jun 9, 2023

@JordanAWS Would could you give me some pointers to look upon for the failing test for test_real_device_circuit_execution ?
This test-case was previously not being run in CI because the backend, provider wasn't yet mocked and unittest.skip was being applied. After mocking the backend, random_circuit transpilation is failing.

@WingCode
Copy link
Contributor Author

WingCode commented Jun 9, 2023

After some digging through, I think this test case failure might be related to this issue #91 since the gates are not supported?

@kshitijc
Copy link
Collaborator

kshitijc commented Jun 9, 2023

@WingCode could you try replacing that with a deterministic circuit instead which has supported gates?

@WingCode WingCode changed the title Mock provider, backend [UnitaryHack] Mock provider, backend Jun 10, 2023
Copy link
Collaborator

@kshitijc kshitijc left a comment

Choose a reason for hiding this comment

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

Thanks for the updates @WingCode! The issue also calls for adding tests for the backend and job classes.

The coverage for these currently appears to be:

tests/providers/test_adapter.py .... [ 19%]
tests/providers/test_braket_backend.py .....s.sss.. [ 76%]
tests/providers/test_braket_job.py .. [ 85%]

Would you like to add the tests for backend and job in this PR?

tests/providers/test_braket_provider.py Outdated Show resolved Hide resolved
@WingCode
Copy link
Contributor Author

@kshitijc Thank you for the review. Yes, I can add tests for lines not covered in braket_job.py, braket_backend.py in this PR

@WingCode
Copy link
Contributor Author

@kshitijc Kindly let me know if you like some changes in this PR to get it merged :)

@WingCode
Copy link
Contributor Author

This is how the current coverage looks like :)
image

Copy link
Collaborator

@kshitijc kshitijc left a comment

Choose a reason for hiding this comment

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

Nice work @WingCode! Thanks for the improved coverage! 👍

@kshitijc kshitijc merged commit 984101c into qiskit-community:main Jun 29, 2023
4 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.

Tests: mock tests for cloud devices
2 participants