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

Fleshing out some conceptual guidelines #25

Draft
wants to merge 67 commits into
base: main
Choose a base branch
from
Draft

Conversation

bettinaheim
Copy link
Member

No description provided.

Bettina Heim and others added 30 commits June 16, 2022 18:19
Co-authored-by: Steve Manuel <nilslice@gmail.com>
bettinaheim and others added 20 commits August 9, 2022 11:26
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>
@github-actions
Copy link

github-actions bot commented Sep 10, 2022

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the Contributor License Agreement and I hereby accept the Terms.


2 out of 3 committers have signed the CLA.
@bettinaheim
@idavis
@Bettina Heim
Bettina Heim seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request

@bettinaheim
Copy link
Member Author

I have read the Contributor License Agreement and I hereby accept the Terms.

bettinaheim and others added 2 commits September 26, 2022 14:17
* 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
Copy link

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
Copy link

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.

Copy link

@bmhowe23 bmhowe23 left a 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

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

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

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

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

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

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:

Suggested change
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" }

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:

Suggested change
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

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

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

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?

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