Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion images/iqsharp-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ ENV PATH=$PATH:${HOME}/dotnet:${HOME}/.dotnet/tools \
# Install IQ# and the project templates, using the NuGet packages from the
# build context.
ARG IQSHARP_VERSION
RUN dotnet new -i "Microsoft.Quantum.ProjectTemplates::0.10.2001.525-beta" && \
RUN dotnet new -i "Microsoft.Quantum.ProjectTemplates::0.11.2006.2203-beta" && \
dotnet tool install \
--global \
Microsoft.Quantum.IQSharp \
Expand Down
3 changes: 1 addition & 2 deletions src/Core/Compiler/CompilerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,9 @@ private AssemblyInfo BuildAssembly(ImmutableDictionary<Uri, string> sources, Com
{
// Generate C# simulation code from Q# syntax tree and convert it into C# syntax trees:
var trees = new List<CodeAnalysis.SyntaxTree>();
NonNullable<string> GetFileId(Uri uri) => CompilationUnitManager.TryGetFileId(uri, out var id) ? id : NonNullable<string>.New(uri.AbsolutePath);
foreach (var file in sources.Keys)
{
var sourceFile = GetFileId(file);
var sourceFile = CompilationUnitManager.GetFileId(file);
var codegenContext = string.IsNullOrEmpty(executionTarget)
? CodegenContext.Create(qsCompilation.Namespaces)
: CodegenContext.Create(qsCompilation.Namespaces, new Dictionary<string, string>() { { AssemblyConstants.ExecutionTarget, executionTarget } });
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.0.0" />
<PackageReference Include="Microsoft.Quantum.Compiler" Version="0.12.20062505-beta" />
<PackageReference Include="Microsoft.Quantum.CsharpGeneration" Version="0.12.20062505-beta" />
<PackageReference Include="Microsoft.Quantum.Simulators" Version="0.12.20062505-beta" />
<PackageReference Include="Microsoft.Quantum.Compiler" Version="0.11.2006.2203-beta" />
<PackageReference Include="Microsoft.Quantum.CsharpGeneration" Version="0.11.2006.2203-beta" />
<PackageReference Include="Microsoft.Quantum.Simulators" Version="0.11.2006.2203-beta" />
<PackageReference Include="NuGet.Resolver" Version="5.1.0" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
</ItemGroup>
Expand Down
8 changes: 6 additions & 2 deletions src/Core/Snippets/Snippets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using System.Runtime.Loader;
using Microsoft.Extensions.Logging;
using Microsoft.Quantum.IQSharp.Common;
using Microsoft.Quantum.QsCompiler.CompilationBuilder;

namespace Microsoft.Quantum.IQSharp
{
Expand Down Expand Up @@ -162,10 +163,13 @@ Snippet populate(Snippet s) =>
{
id = string.IsNullOrWhiteSpace(s.id) ? Guid.NewGuid().ToString() : s.id,
code = s.code,
warnings = logger.Logs.Where(m => m.Source == s.Uri.AbsolutePath).Select(logger.Format).ToArray(),
warnings = logger.Logs
.Where(m => m.Source == CompilationUnitManager.GetFileId(s.Uri).Value)
.Select(logger.Format)
.ToArray(),
Elements = assembly?.SyntaxTree?
.SelectMany(ns => ns.Elements)
.Where(c => c.SourceFile() == s.Uri.AbsolutePath)
.Where(c => c.SourceFile() == CompilationUnitManager.GetFileId(s.Uri).Value)
.ToArray()
};

Expand Down
31 changes: 15 additions & 16 deletions src/Tool/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,25 @@
},
"AllowedHosts": "*",
"DefaultPackageVersions": [
"Microsoft.Quantum.Compiler::0.12.20062505-beta",
"Microsoft.Quantum.Compiler::0.11.2006.2203-beta",

"Microsoft.Quantum.CsharpGeneration::0.12.20062505-beta",
"Microsoft.Quantum.Development.Kit::0.12.20062505-beta",
"Microsoft.Quantum.Simulators::0.12.20062505-beta",
"Microsoft.Quantum.Xunit::0.12.20062505-beta",
"Microsoft.Quantum.CsharpGeneration::0.11.2006.2203-beta",
"Microsoft.Quantum.Development.Kit::0.11.2006.2203-beta",
"Microsoft.Quantum.Simulators::0.11.2006.2203-beta",
"Microsoft.Quantum.Xunit::0.11.2006.2203-beta",

"Microsoft.Quantum.Standard::0.12.20062505-beta",
"Microsoft.Quantum.Chemistry::0.12.20062505-beta",
"Microsoft.Quantum.Chemistry.Jupyter::0.12.20062505-beta",
"Microsoft.Quantum.MachineLearning::0.12.20062505-beta",
"Microsoft.Quantum.Numerics::0.12.20062505-beta",
"Microsoft.Quantum.Standard::0.11.2006.2203-beta",
"Microsoft.Quantum.Chemistry::0.11.2006.2203-beta",
"Microsoft.Quantum.Chemistry.Jupyter::0.11.2006.2203-beta",
"Microsoft.Quantum.MachineLearning::0.11.2006.2203-beta",
"Microsoft.Quantum.Numerics::0.11.2006.2203-beta",

"Microsoft.Quantum.Katas::0.12.20062505-beta",
"Microsoft.Quantum.Katas::0.11.2006.2203-beta",

"Microsoft.Quantum.Research::0.12.20062505-beta",

"Microsoft.Quantum.Research::0.11.2006.2203-beta",

"Microsoft.Quantum.Providers.IonQ::0.12.20062505-beta",
"Microsoft.Quantum.Providers.Honeywell::0.12.20062505-beta",
"Microsoft.Quantum.Providers.QCI::0.12.20062505-beta"
"Microsoft.Quantum.Providers.IonQ::0.11.2006.2203-beta",
"Microsoft.Quantum.Providers.Honeywell::0.11.2006.2203-beta",
"Microsoft.Quantum.Providers.QCI::0.11.2006.2203-beta"
]
}