diff --git a/examples/QIR/Development/Development.csproj b/examples/QIR/Development/Development.csproj index 477f3f323a..74493b8648 100644 --- a/examples/QIR/Development/Development.csproj +++ b/examples/QIR/Development/Development.csproj @@ -1,4 +1,4 @@ - + Exe @@ -20,8 +20,8 @@ - - + + @@ -136,6 +136,7 @@ <_QirRuntimeLibFiles Include="$(QirRuntimeLibs)/**/*.*" Exclude="$(QirRuntimeLibs)/**/*.exe" /> <_QirRuntimeHeaderFiles Include="$(QirRuntimeHeaders)/**/*.hpp" /> + <_QirRuntimeHeaderFiles Include="$(QirRuntimeHeaders)/**/*.h" /> diff --git a/examples/QIR/Emission/Emission.csproj b/examples/QIR/Emission/Emission.csproj index 7f8829fd9a..7e1c497226 100644 --- a/examples/QIR/Emission/Emission.csproj +++ b/examples/QIR/Emission/Emission.csproj @@ -1,4 +1,4 @@ - + Detailed diff --git a/src/QsCompiler/QirGeneration/README.md b/src/QsCompiler/QirGeneration/README.md index 6e105b176f..e5c1565458 100644 --- a/src/QsCompiler/QirGeneration/README.md +++ b/src/QsCompiler/QirGeneration/README.md @@ -13,7 +13,7 @@ To enable QIR emission, open the project file in a text editor and add the follo ``` If the project builds successfully, the .ll file containing QIR can be found in `qir` folder in the project folder. Alternatively, the folder path can be specified via the `QirOutputPath` project property. The project file should look similar to this: ``` - + Exe netcoreapp3.1 diff --git a/src/QsCompiler/TestTargets/Libraries/Library1/Library1.csproj b/src/QsCompiler/TestTargets/Libraries/Library1/Library1.csproj index 9e09c64f53..6af260881f 100644 --- a/src/QsCompiler/TestTargets/Libraries/Library1/Library1.csproj +++ b/src/QsCompiler/TestTargets/Libraries/Library1/Library1.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/QsCompiler/TestTargets/Libraries/Library2/Library2.csproj b/src/QsCompiler/TestTargets/Libraries/Library2/Library2.csproj index 9e09c64f53..6af260881f 100644 --- a/src/QsCompiler/TestTargets/Libraries/Library2/Library2.csproj +++ b/src/QsCompiler/TestTargets/Libraries/Library2/Library2.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/QsCompiler/TestTargets/Simulation/Example/Example.csproj b/src/QsCompiler/TestTargets/Simulation/Example/Example.csproj index 8b32800176..a290a4cb20 100644 --- a/src/QsCompiler/TestTargets/Simulation/Example/Example.csproj +++ b/src/QsCompiler/TestTargets/Simulation/Example/Example.csproj @@ -1,4 +1,4 @@ - + Detailed Exe diff --git a/src/QsCompiler/TestTargets/Simulation/Target/QirExecution.cs b/src/QsCompiler/TestTargets/Simulation/Target/QirExecution.cs index 639c27612f..3b9ede2fbd 100644 --- a/src/QsCompiler/TestTargets/Simulation/Target/QirExecution.cs +++ b/src/QsCompiler/TestTargets/Simulation/Target/QirExecution.cs @@ -13,7 +13,7 @@ namespace Microsoft.Quantum.QsCompiler.Testing.Qir public static class JitCompilation { [DllImport("Microsoft.Quantum.Qir.QSharp.Core", ExactSpelling = true, CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] - public static extern IntPtr CreateFullstateSimulator(long seed); + public static extern IntPtr CreateFullstateSimulatorC(long seed); [DllImport("Microsoft.Quantum.Qir.Runtime", ExactSpelling = true, CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl)] public static extern void InitializeQirContext(IntPtr driver, bool trackAllocatedObjects); @@ -33,7 +33,7 @@ public static void BuildAndRun(string pathToBitcode, params string[] functionNam // To get this line to work, I had to change the CreateFullstateSimulator API to use raw pointers instead of shared pointers, // and I had to update both calls to be "extern 'C'" otherwise name mangling makes then impossible to call here. // This should be revised more broadly as we move the runtime to a C-style API for ABI compatibility across langauges. - InitializeQirContext(CreateFullstateSimulator(0), true); + InitializeQirContext(CreateFullstateSimulatorC(0), true); if (!File.Exists(pathToBitcode)) { diff --git a/src/QsCompiler/TestTargets/Simulation/Target/Simulation.csproj b/src/QsCompiler/TestTargets/Simulation/Target/Simulation.csproj index 074993f0fc..3c9e7ad084 100644 --- a/src/QsCompiler/TestTargets/Simulation/Target/Simulation.csproj +++ b/src/QsCompiler/TestTargets/Simulation/Target/Simulation.csproj @@ -21,8 +21,8 @@ - - + + diff --git a/src/QsCompiler/Tests.Compiler/Tests.Compiler.fsproj b/src/QsCompiler/Tests.Compiler/Tests.Compiler.fsproj index 78b3f12f13..2ae76ed453 100644 --- a/src/QsCompiler/Tests.Compiler/Tests.Compiler.fsproj +++ b/src/QsCompiler/Tests.Compiler/Tests.Compiler.fsproj @@ -563,8 +563,8 @@ - - + + diff --git a/src/QuantumSdk/DefaultItems/DefaultItems.props.v.template b/src/QuantumSdk/DefaultItems/DefaultItems.props.v.template index 5a5c8b4209..195f63598b 100644 --- a/src/QuantumSdk/DefaultItems/DefaultItems.props.v.template +++ b/src/QuantumSdk/DefaultItems/DefaultItems.props.v.template @@ -31,6 +31,7 @@ Normal true + false true true true diff --git a/src/QuantumSdk/DefaultItems/DefaultItems.targets b/src/QuantumSdk/DefaultItems/DefaultItems.targets index ba34b7f008..8dadc79de8 100644 --- a/src/QuantumSdk/DefaultItems/DefaultItems.targets +++ b/src/QuantumSdk/DefaultItems/DefaultItems.targets @@ -30,6 +30,7 @@ + HoneywellProcessor IonQProcessor QCIProcessor @@ -38,13 +39,19 @@ Possible values must match 'ionq*', 'honeywell*', 'qci*', 'microsoft.simulator*', or 'Any'. The execution target for a Q# library needs to be 'Any'. + + HoneywellQirProcessor + QCIQirProcessor - Type1 + Type1 Type2 - Type3 + Type3 Default Default @@ -71,6 +78,7 @@ true false false + true $([System.String]::Copy('$(AssemblyName)').Replace(' ','')) @@ -96,7 +104,7 @@ - + @@ -107,17 +115,26 @@ <_ResolvedTargetPackageReference Include="$(%(_TargetPackageReferencePathProperty.Identity))" /> - - + + + + + + + + diff --git a/src/QuantumSdk/Sdk/Sdk.props b/src/QuantumSdk/Sdk/Sdk.props index 69d01b573b..fb5c96b619 100644 --- a/src/QuantumSdk/Sdk/Sdk.props +++ b/src/QuantumSdk/Sdk/Sdk.props @@ -23,43 +23,42 @@ - - - - - - - - + + + + + + + + + + + - - - - - @@ -68,11 +67,11 @@ + Include="Microsoft.Quantum.Runtime.Core" Version="0.20.2110171573" IsImplicitlyDefined="true" /> + Include="Microsoft.Quantum.EntryPointDriver" Version="0.20.2110171573" IsImplicitlyDefined="true" /> diff --git a/src/QuantumSdk/Sdk/Sdk.targets b/src/QuantumSdk/Sdk/Sdk.targets index 2ccfa9e219..0230516a19 100644 --- a/src/QuantumSdk/Sdk/Sdk.targets +++ b/src/QuantumSdk/Sdk/Sdk.targets @@ -43,7 +43,7 @@ @@ -67,7 +67,6 @@ - @@ -78,9 +77,7 @@ - + <_NewLine>%0D%0A <_NewLineIndent>$(_NewLine)%20%20%20%20 <_QscCommandProjFlag>--proj$(_NewLineIndent)"$([System.IO.Path]::GetFullPath('$(PathCompatibleAssemblyName)'))" @@ -94,7 +91,7 @@ <_QscCommandReferencesFlag Condition="@(ResolvedQSharpReferences->Count()) > 0">$(_NewLine)--references$(_NewLineIndent)"@(ResolvedQSharpReferences,'"$(_NewLineIndent)"')" <_QscCommandLoadFlag Condition="@(_PrioritizedResolvedQscReferences->Count()) > 0">$(_NewLine)--load$(_NewLineIndent)"@(_PrioritizedResolvedQscReferences,'"$(_NewLineIndent)"')" <_QscCommandRuntimeFlag>$(_NewLine)--runtime$(_NewLineIndent)$(ResolvedRuntimeCapabilities) - <_QscCommandSkipMonomorphization Condition="'$(ResolvedRuntimeCapabilities)' == 'FullComputation' And $(CSharpGeneration) And '$(ResolvedProcessorArchitecture)' != 'MicrosoftSimulator'">$(_NewLine)--skip-monomorphization + <_QscCommandSkipMonomorphization Condition="'$(ResolvedRuntimeCapabilities)' == 'FullComputation' And $(CSharpGeneration) And !$(EnableQirSubmission)">$(_NewLine)--skip-monomorphization <_QscCommandPerfDataGenerationFlag Condition="$(PerfDataGeneration)">$(_NewLine)--perf$(_NewLineIndent)$(PerfDataOutputPath) <_QscCommandTargetDecompositionsFlag Condition="@(ResolvedTargetSpecificDecompositions->Count()) > 0">$(_NewLine)--target-specific-decompositions$(_NewLineIndent)"@(ResolvedTargetSpecificDecompositions,'"$(_NewLineIndent)"')" <_QscPackageLoadFallbackFoldersFlag Condition="@(ResolvedPackageLoadFallbackFolders->Count()) > 0">$(_NewLine)--package-load-fallback-folders$(_NewLineIndent)"@(ResolvedPackageLoadFallbackFolders,'"$(_NewLineIndent)"')" @@ -160,13 +157,13 @@ - <_DefaultEntryPoint Condition="$(QirGeneration) And '$(CSharpGeneration)' != 'true' And @(Compile->Count()) == 0">$(GeneratedFilesOutputPath)Main.cs + <_DefaultEntryPoint Condition="$(QirGeneration) And !$(CSharpGeneration) And @(Compile->Count()) == 0">$(GeneratedFilesOutputPath)Main.cs <_GeneratedBinary>$(GeneratedFilesOutputPath)$(PathCompatibleAssemblyName) - +