Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Conversation

@ScottCarda-MS
Copy link
Contributor

@ScottCarda-MS ScottCarda-MS commented Feb 24, 2021

Refactors the Entry Point Driver and C# generation to accommodate Q# code having multiple entry points.

Major Changes:

  • Updated C# generation:
    • Now generate a unique entry point class for each entry point. These classes will no longer contain a Main method.
    • The Main method is generated in its own namespace and class: __QsEntryPoint__.__QsEntryPoint__.
    • Added a public function generateMainSource to the C# gen's EntryPoint module. This function parallels generateSource in the same module and generates the content for the C# gen's Main file.
    • The outputted files for C# gen are now:
      • the .g.cs for the C# of the Q# operations (same as before)
      • .g.EntryPoint.cs instead of EntryPoint.g.cs for generated entry point classes
      • EntryPoint.g.Main.cs for the name of the new file containing the Main method.
  • Microsoft.Quantum.EntryPointDriver.Azure.Submit was made public as it is used in the generated C# for entry points.
  • Microsoft.Quantum.EntryPointDriver.Simulation.Simulate was made public as it is used in the generated C# for entry points.
  • The IEntryPoint interface was changed considerably.
  • And more changes under the Entry Point Driver project. Too many to list here 😄.

Dependent PR on compiler repo: microsoft/qsharp-compiler#881

@ScottCarda-MS ScottCarda-MS changed the title Sccarda/multiple entry points Multiple Entry Points For Entry Point Driver Feb 25, 2021
@ScottCarda-MS ScottCarda-MS marked this pull request as ready for review February 25, 2021 07:12
@bamarsha bamarsha dismissed their stale review March 23, 2021 17:53

Dismissed.

Copy link
Contributor

@bettinaheim bettinaheim left a comment

Choose a reason for hiding this comment

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

LGTM

@ScottCarda-MS
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@ScottCarda-MS ScottCarda-MS merged commit 9d4159d into main Mar 23, 2021
@ScottCarda-MS ScottCarda-MS deleted the sccarda/MultipleEntryPoints branch March 23, 2021 23:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants