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

More validation: require data_type in cvar_define #14

Merged
merged 1 commit into from
Nov 22, 2023
Merged

Conversation

qartik
Copy link
Member

@qartik qartik commented Nov 6, 2023

Fixes #13 and restricts classical variables' data type to be one of "i64", "i32", "u64", and "u32".

EDIT: I merged non-spec changes in #15

@qartik qartik requested a review from dlucchetti November 6, 2023 15:56
@qartik qartik marked this pull request as ready for review November 6, 2023 16:51
@qartik qartik changed the title fix(model): data_type is not optional in cvar_define More validation: literal classical/quantum ops and require data_type in cvar_define Nov 6, 2023
phir/model.py Outdated Show resolved Hide resolved
@qartik qartik changed the title More validation: literal classical/quantum ops and require data_type in cvar_define More validation: require data_type in cvar_define Nov 7, 2023
@qartik qartik requested a review from qciaran November 13, 2023 15:25
Copy link
Collaborator

@qciaran qciaran left a comment

Choose a reason for hiding this comment

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

Looks reasonable with switching from i32 to i64 as default.

@qartik qartik added this pull request to the merge queue Nov 22, 2023
Merged via the queue into main with commit 8862244 Nov 22, 2023
@qartik qartik deleted the more-validation branch November 22, 2023 03:31
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.

cvar_define should require "data_type" field in the PHIR model
3 participants