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

Correctly parse string boolean for ai param #7

Merged
merged 6 commits into from
Jun 28, 2024

Conversation

nihaocami
Copy link
Contributor

@nihaocami nihaocami commented Jun 24, 2024

Summary

The ai argument on the TranspilerService was not honoured.

Details and comments

The TranspilerService class has an argument ai which is defined to be a Boolean, however it actually needs to be a 'true' or 'false'. I have defined the condition to properly map the boolean to string.

Note: I was not sure if we need 'auto' as an option at all since technically it was never used. If that's actually useful, maybe we can change the type to string or an enum?

@CLAassistant
Copy link

CLAassistant commented Jun 24, 2024

CLA assistant check
All committers have signed the CLA.

@victor-villar
Copy link
Collaborator

Hi @chrisamirani ! Thanks a lot for the contribution and for being our first community contributor!

Regarding the PR itself, we do really need the auto option, as it is one of the accepted values by the API: https://docs.quantum.ibm.com/api/qiskit-transpiler-service-rest/tags/transpiler-methods#tags__transpiler-methods__operations__transpile_transpile_post.

Could you change it to accept that value as well, using an enum, for example, as you mention in your comments section?

@nihaocami
Copy link
Contributor Author

nihaocami commented Jun 26, 2024

Hey @victor-villar . Done! I'll be running the test now. Though it would be great if you can validate the tests yourself too. Hopefully CI pipeline will be added soon? 🤞

First community PR!! yay!

@nihaocami
Copy link
Contributor Author

@victor-villar All tests passed except those that require authentication for the IBM service. So I think it'd be great if you verified. I also noticed that my linter introduced some style changes on the README file. Maybe it'd be good to also add some linting rules?

Copy link
Member

@cbjuan cbjuan left a comment

Choose a reason for hiding this comment

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

Hi @chrisamirani. As Victor said, thanks for being the 1st community PR!

Regarding the pipeline, we're on it in #6, so for your next PR it should be ready :)

As of the markdown file, you're right, we should add some linting guidelines and rules. For this PR I'd prefer to only cover in the markdown file the changes in terms of strings (true, false, auto) you added and not include the style changes. In any case these changes are not a blocker for me.

Let us run the tests with your changes and our IBM Quantum authentication tokens so we can double check everything. Apart from that, the code changes look OK, so thanks!

Copy link
Collaborator

@victor-villar victor-villar left a comment

Choose a reason for hiding this comment

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

LGTM!
I've run all tests successfully!

Copy link
Member

@cbjuan cbjuan left a comment

Choose a reason for hiding this comment

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

Tests passed, approving.

Thanks @chrisamirani !

@cbjuan cbjuan merged commit 1935200 into Qiskit:main Jun 28, 2024
1 check 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.

4 participants