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

Authenticate IBM Quantum account with GH actions to run unit tests #268

Conversation

SaashaJoshi
Copy link

This PR builds a GH actions workflow that runs unit tests while authenticating the IBM Quantum account with the help of an IBM_API_TOKEN stored as a GH secret. It partially addresses #261.

The changes aim to run the tests/plugin/test_qiskit_plugins.py file with GH actions.

@01110011011101010110010001101111
Copy link
Collaborator

Hi, just wanted to let you know that you don’t need to worry about getting the lint + pre-commit passing.

@SaashaJoshi
Copy link
Author

Thanks for letting me know. I was indeed worried about the linting.

@SaashaJoshi
Copy link
Author

SaashaJoshi commented May 30, 2024

Hey @GenericP3rson, the latest GH workflow gives the following error,

FAILED test/plugin/test_qiskit_plugins.py::test_expval_observable - qiskit_ibm_runtime.accounts.exceptions.AccountNotFoundError: 'Unable to find account.'

Just wanted to make sure that we use the same keyword for the GH secret, which is `IBM_API_TOKEN'. Let me know if this is different and I will reflect those changes in the code. If this is not causing the error, I will brainstorm more.

@SaashaJoshi
Copy link
Author

@GenericP3rson, Could you approve the workflow for the latest commit? Since the GH secret is sorted, I think this should work!

@SaashaJoshi
Copy link
Author

SaashaJoshi commented May 30, 2024

Okay, the AccountNotFound error persists. I am not sure what is going wrong here. I am able to run the tests successfully on my local machine though. I even have a PR on my fork of torchquantum and the tests pass there. For reference, check this

PS: I am using this API token from my IBM quantum platform.

Screenshot 2024-05-30 at 14 32 40

@01110011011101010110010001101111
Copy link
Collaborator

Hi, so sorry, I have not yet added the secret yet; I don’t have the permissions to add secrets to this repo at the moment but will get it added ASAP!

While I’m getting that sorted, to fully complete the task, if you want to add a set of tests for some function (either as a separate PR or with this), that would be great!

@01110011011101010110010001101111 01110011011101010110010001101111 linked an issue Jun 2, 2024 that may be closed by this pull request
@SaashaJoshi
Copy link
Author

No problem!
Absolutely, I will add a few test classes to increase the coverage.

@Hanrui-Wang Hanrui-Wang changed the base branch from main to unitary-hack June 12, 2024 14:29
@01110011011101010110010001101111 01110011011101010110010001101111 changed the base branch from unitary-hack to unitary-hack-ibmq-auth June 12, 2024 14:30
@01110011011101010110010001101111 01110011011101010110010001101111 merged commit 6667fa3 into mit-han-lab:unitary-hack-ibmq-auth Jun 12, 2024
0 of 7 checks passed
@01110011011101010110010001101111
Copy link
Collaborator

Merging the PR, congrats!

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.

Develop the TorchQuantum Testing Suite
3 participants