-
Notifications
You must be signed in to change notification settings - Fork 0
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
Modeling & validation CLI #2
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say it's usually best to have Ciaran review before merging. Since, it doesn't look like there are changes to the spec and you're just adding the model, then this looks good to go to me.
I think there might be some funniness with the cvar_ids and qvar_ids, which is probably due to what I was doing in PECOS. I was converting it to not exactly a PHIR model but what I was calling PyPMIR, which is almost the same but I was attempting to make some conversions to make simulations faster. I need to sit and squint at the model a bit longer to be sure. |
"""Quantum operation.""" | ||
|
||
qop: str | ||
args: list[list[str | int] | list[list[str | int]]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
args: list[list[str | int] | list[list[str | int]]] | |
args: list[list[str, int] | list[list[str, int]]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@qciaran that won't work as lists are unconstrained in size. Ideally the internal lists should be tuples in the PHIR spec to have the correct format for arguments. I wanted to bring it up as a potential change in the spec.
So the correct form should be:
args: list[ tuple[str, int] | list[tuple[str, int]] ]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSON seems to only have lists. Or at least it converts tuples to lists. If it is okay for the Python model to use tuples and there is no worries about validating JSON, then sounds good. (edit: lists-> tuples)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise, what you had before might be correct and it is just something that has to be dealt with because of JSON.
@qartik Alright, I think I might of caught all the left overs from "PyPMIR." |
No description provided.