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

Microsoft.Quantum.Qir.Runtime.Tools.BuildFromQSharpDll could be parametrized by IQirExecutable type #815

Open
@swernli

Description

@swernli

The Qir Runtime Tools expose a mechanism for generating an executable from a Q# DLL and appropriate headers+libraries folders:

/// <summary>
/// Creates QIR-based executables from a .NET DLL generated by the Q# compiler.
/// </summary>
/// <param name="qsharpDll">.NET DLL generated by the Q# compiler.</param>
/// <param name="libraryDirectories">Directory where the libraries to link to are located.</param>
/// <param name="includeDirectories">Directory where the headers needed for compilation are located.</param>
/// <param name="executablesDirectory">Directory where the created executables are placed.</param>
/// <param name="debug">Enable additional debugging checks at runtime.</param>
public static async Task BuildFromQSharpDll(
FileInfo qsharpDll,
IList<DirectoryInfo> libraryDirectories,
IList<DirectoryInfo> includeDirectories,
DirectoryInfo executablesDirectory,
bool debug)

However, the implementation specifically invokes new QirFullStateExecutable such that this only works for compiling against runtimes that use the fullstate simulator. If this method were instead generic across any type that implemented IQirExecutable then it would work well with the extensibility built into the tools to support arbitrary runtimes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions