-
Notifications
You must be signed in to change notification settings - Fork 19
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
Fleshing out some conceptual guidelines #25
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Steve Manuel <nilslice@gmail.com>
… into base-profile
…e workstream meeting
…ubit and result usage
Co-authored-by: Henrique Silvério <henrique.silverio@tecnico.ulisboa.pt>
Co-authored-by: Alec Edgington <54802828+cqc-alec@users.noreply.github.com>
Co-authored-by: Alec Edgington <54802828+cqc-alec@users.noreply.github.com>
Co-authored-by: Alec Edgington <54802828+cqc-alec@users.noreply.github.com>
Co-authored-by: Alec Edgington <54802828+cqc-alec@users.noreply.github.com>
Co-authored-by: Alec Edgington <54802828+cqc-alec@users.noreply.github.com>
Co-authored-by: Thomas Alexander <thomasalexander2718@gmail.com>
… into base-profile
…itting measurements into their own block
…marked by an attribute
CLA Assistant Lite bot: I have read the Contributor License Agreement and I hereby accept the Terms. 2 out of 3 committers have signed the CLA. |
I have read the Contributor License Agreement and I hereby accept the Terms. |
* Adding output schemas. * Adding grammars for output files. * Adding notes for implementors. Co-authored-by: César Zaragoza Cortés <cesarzc@microsoft.com> Co-authored-by: Amos Anderson <45039789+qci-amos@users.noreply.github.com>
```console | ||
START | ||
METADATA entry_point | ||
METADATA num_required_qubits 5 |
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 believe this should be required_num_qubits
instead of num_required_qubits
.
START | ||
METADATA entry_point | ||
METADATA num_required_qubits 5 | ||
METADATA num_required_results 5 |
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.
Similarly, this should be required_num_results
instead of num_required_results
.
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 have a few comments and questions about the output specifications (and a few comments about num_required_* vs required_num_*).
START | ||
METADATA\tentry_point | ||
METADATA\tnum_required_qubits\t5 | ||
METADATA\tnum_required_results\t5 |
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.
To be consistent with the Base Profile documentation, I believe this should be required_num_qubits
instead of num_required_qubits
and required_num_results
instead of num_required_results
.
METADATA\tuser_metadata3_name\tuser_metadata3_value | ||
METADATA\tentry_point | ||
METADATA\tnum_required_qubits\t5 | ||
METADATA\tnum_required_results\t5 |
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.
To be consistent with the Base Profile documentation, I believe this should be required_num_qubits
instead of num_required_qubits
and required_num_results
instead of num_required_results
.
START | ||
METADATA entry_point | ||
METADATA num_required_qubits 5 | ||
METADATA num_required_results 5 |
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.
To be consistent with the Base Profile documentation, I believe this should be required_num_qubits
instead of num_required_qubits
and required_num_results
instead of num_required_results
.
START | ||
METADATA entry_point | ||
METADATA num_required_qubits 5 | ||
METADATA num_required_results 5 |
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.
To be consistent with the Base Profile documentation, I believe this should be required_num_qubits
instead of num_required_qubits
and required_num_results
instead of num_required_results
.
START | ||
METADATA entry_point | ||
METADATA num_required_qubits 5 | ||
METADATA num_required_results 5 |
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.
To be consistent with the Base Profile documentation, I believe this should be required_num_qubits
instead of num_required_qubits
and required_num_results
instead of num_required_results
.
METADATA entry_point | ||
METADATA num_required_qubits 5 | ||
METADATA num_required_results 5 | ||
METADATA output_labeling_schema |
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.
Should this also contain the value of the "output_labeling_schema" attribute? Like this:
METADATA output_labeling_schema | |
METADATA output_labeling_schema No_Labels_And_Async |
|
||
declare void @__quantum__rt__result_record_output(%Result*, i8*) | ||
|
||
attributes #0 = { "entry_point" "num_required_qubits"="5" "num_required_results"="5" "output_labeling_schema" "qir_profiles"="base_profile" } |
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.
To be consistent with prior examples in the Base Profile documentation, I believe output_labeling_schema
needs to be set to some value, like this:
attributes #0 = { "entry_point" "num_required_qubits"="5" "num_required_results"="5" "output_labeling_schema" "qir_profiles"="base_profile" } | |
attributes #0 = { "entry_point" "num_required_qubits"="5" "num_required_results"="5" "output_labeling_schema"="No_Labels_And_Ordered" "qir_profiles"="base_profile" } |
backend. A backend may reject a program as invalid or fail execution if a label | ||
is missing. | ||
|
||
Both the labeling schema and the output schema are identified by a metadata |
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 only see the output_labeling_schema
attribute defined, but this comment makes it seem like there should be another attribute for the output schema. Am I misinterpreting that? (Note that lines 338-339 say that output_labeling_schema
is for the labeling schema (and hence not the output schema, presumably).
The defined [output schemas](../output_schemas/) provide different options for | ||
how a backend may express the computed value(s). The exact schema can be freely | ||
chosen by the backend and is identified by a string label in the produced | ||
schema. Each output schema contains sufficient information to allow quantum |
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.
Perhaps I'm having a disconnect here, but Line 416 says that the "output_labeling_schema"
attribute value can be freely chosen by the compiler frontend, but this comment makes it sound like the backend is deciding on the schema. In either case, is it freely chosen from a set of limit output options (like Labeled_And_Async
and No_Labels_And_Ordered
)? If so, I think those options should probably enumerated in a table. If not, then it seems like it is an arbitrary string that the front-end can choose, but then the backend may not know what to do with that attribute value.
|
||
Both the labeling schema and the output schema are identified by a metadata | ||
entry in the produced output. For the [output schema](../output_schemas/), that | ||
identifier matches the one listed in the corresponding specification. The |
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 don't see the explicit identifier strings for the output schemas called out in the corresponding specifications. Am I just missing them?
No description provided.