This repository was archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 173
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Use RuntimeCapability type in qsc/LS * Update capability names in SDK
* Continue on error in check style step * Test bad formatting * Use separate job for check style * Fix WrapUp job name * Fix initialize job steps * Run init/steps/wrap-up in same job * Remove dependsOn * Revert some changes * Revert "Test bad formatting" This reverts commit a59e4f7.
* Hide internal, ```Q# → ```qsharp, and fix ms.topic. * Update src/Documentation/DocumentationGenerator/ProcessDocComments.cs Co-authored-by: Sarah Marshall <33814365+samarsha@users.noreply.github.com> * Update src/Documentation/DocumentationGenerator/ProcessDocComments.cs Co-authored-by: Sarah Marshall <33814365+samarsha@users.noreply.github.com> * Added missing using statement. Co-authored-by: Sarah Marshall <33814365+samarsha@users.noreply.github.com>
* Update global.json and use .NET 5 in CI * Fix .NET version * Use 3.1 runtime * Use 3.1 SDK instead of runtime
Added template README file.
This change updates yeoman-environment package version from 2.9.6 to 2.10.3, back to the configuration used in the QDK version 0.14.2011120240.
Updated Interpolated String Delimiter Logic for Code Lines.
* Add Q# source code formatter * Add formatter to build scripts * Formatting * Add docs to Discoverer.fs * Add links to original language spec grammars * Add copyright headers * Update README * Clean up Parser.csproj a little * Add properties for ANTLR version and JAR name * Add quotes in command line * Use AntlrInput variable for ANTLR command * Update command line interface * Use inferred type * Add CLI tests * Formatting * Add (skipped) identity tests * Don't format if there are syntax errors * Remove error token hiding * Add error tests * Filter out test cases with invalid syntax * Use Microsoft.Quantum namespace prefix * Update README * Add comments to Program.fs * Fix duplicate error messages * Add IO exception handlers * Replace several facts with theories * Remove nameof * Add limitations to readme * Remove whitespace/comment types * Add TODO to CallableDeclaration * Add signature files * Remove redundant access modifiers * Rename Formatter to QsFmt * Update solution name in scripts
…ax tree (#835) * Use Public instead of DefaultAccess * Deprecate AccessModifier and Modifiers * Formatting * Comment out reference to Example project * Skip execution tests * Update variable names in doc generator * Update tuple item names in CompilationUnit * Update more names/functions to visibility * Update terminology in Namespace.fs * Update terminology in NamespaceManager.fs * Deprecate QsNullable<T>.FromOption * Update Monomorphization.cs * Update more terminology * Add doc comments * Hide records * Re-enable execution tests * Update runtime packages * Minor version 15 * Update ProcessDocComments.cs * Remove unused using * Rename Visibility to Access * IsVisible -> IsAccessible * Visibility -> accessibility * Disable execution tests * More general name * Revert "Disable execution tests" This reverts commit 7c8a675. * Update runtime packages * Add backwards compatible Modifiers properties
kuzminrobin
approved these changes
Mar 9, 2021
Contributor
kuzminrobin
left a comment
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 was mostly looking at .lls and .qss. I don't understand most of the other (.cs, .fs) files.
What I looked at seems good to me.
cesarzc
reviewed
Mar 9, 2021
Co-authored-by: bettinaheim <34236215+bettinaheim@users.noreply.github.com>
…Transformation.cs Co-authored-by: bettinaheim <34236215+bettinaheim@users.noreply.github.com>
…Transformation.cs Co-authored-by: bettinaheim <34236215+bettinaheim@users.noreply.github.com>
cesarzc
approved these changes
Mar 11, 2021
Contributor
cesarzc
left a comment
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.
Looks good to me.
This was referenced Mar 13, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements implements generating an entry point wrapper during QIR emission that has a signature that does not rely on any QIR specific/opaque types. Generating this wrapper allows to decouple e.g. the command line processing or other driver code from the runtime implementation. The generated wrapper itself relies on the existence of a malloc function (
__quantum_rt__memory_allocate) in the runtime.More tests will follow shortly.
If the e2e build fails, that would be a good sign: The e2e should currently fail if it is properly running the runtime tests against the compiler edits, since I finally adjusted the string creation signature to match the specs.
This PR also contains
Sorry for not properly splitting out those changes - we have I think at least 3 more PRs queued up and it is getting a bit cumbersome to coordinate. We need to unify all of that and then working against main should facilitate keeping a proper structure for PRs...
Additional infos to facilitate review:
For this PR, the changes that contain the core of the functionality outlined in the description are in Interop.cs. The changes in particular are in the generation of the wrapper function for the entry point. The method GenerateWrapper generates that wrapper. MapToInteropType defines how QIR types in entry point signatures are replaced in the entry point wrapper. ProcessArguments does that replacement for argument; i.e. it maps "generic types" -> QIR types. ProcessReturnValue does that replacement for the return value; i.e. it maps QIR types -> "generic types". Having one general purpose function doing both, i.e. one function to map types A <-> types B, with the types A and B fully configurable would be nice, but makes the code really tedious both to write, read and maintain, so I decided to favor the two separate functions in this case.
Configuration.cs has been removed. While it might in general be valuable to allow to configure the QIR emission, the only configuration options that were available so far was the names of the types that the QIR runtime uses to represent the opaque QIR types and other QIR pointer types. Having thought a bit about how to package everything, I believe it is a better approach not to use those in the wrapper to decouple the dependency on the runtime from the entry point driver (C++ or other native code calling into QIR) and command line handling. I believe this should save us some packaging grievances. This comes at the cost of needing the runtime to provide something like a malloc function (__quantum__rt__memory_allocate).