From c804d4f7a79aa4e0306541d799281f6954af2146 Mon Sep 17 00:00:00 2001 From: Ryan Shaffer Date: Mon, 13 Apr 2020 13:07:50 -0700 Subject: [PATCH 01/13] Fix case consistency in test namespace --- src/Tests/HttpServerIntegrationTests.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Tests/HttpServerIntegrationTests.cs b/src/Tests/HttpServerIntegrationTests.cs index 61eddced03..10534f5a4f 100644 --- a/src/Tests/HttpServerIntegrationTests.cs +++ b/src/Tests/HttpServerIntegrationTests.cs @@ -9,9 +9,8 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Tests.IQSharp; -namespace Tests.IQsharp +namespace Tests.IQSharp { [TestClass] public class HttpServerIntegrationTests From d9afad7d2dcc6fbf55c7c00e44855573b8d35ff7 Mon Sep 17 00:00:00 2001 From: Ryan Shaffer Date: Mon, 13 Apr 2020 13:09:03 -0700 Subject: [PATCH 02/13] Enforce exact match for %magic command names --- src/Jupyter/Magic/Resolution/MagicResolver.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Jupyter/Magic/Resolution/MagicResolver.cs b/src/Jupyter/Magic/Resolution/MagicResolver.cs index 3335c59dec..4c624d884f 100644 --- a/src/Jupyter/Magic/Resolution/MagicResolver.cs +++ b/src/Jupyter/Magic/Resolution/MagicResolver.cs @@ -80,7 +80,7 @@ public MagicSymbol Resolve(string symbolName) foreach (var magic in FindAllMagicSymbols()) { - if (symbolName.StartsWith(magic.Name)) + if (symbolName == magic.Name) { this.logger.LogDebug($"Using magic {magic.Name}"); return magic; From c757aa65c2ed9dabbc6ad8ae1972fd8bb8aa72e7 Mon Sep 17 00:00:00 2001 From: Ryan Shaffer Date: Mon, 13 Apr 2020 13:10:05 -0700 Subject: [PATCH 03/13] Make Extensions.Dedent() publicly accessible --- src/Jupyter/Extensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Jupyter/Extensions.cs b/src/Jupyter/Extensions.cs index a4ccf50cd6..2b53b49399 100644 --- a/src/Jupyter/Extensions.cs +++ b/src/Jupyter/Extensions.cs @@ -175,7 +175,7 @@ public static T WithStackTraceDisplay(this T simulator, IChannel channel) /// Removes common indents from each line in a string, /// similarly to Python's textwrap.dedent() function. /// - internal static string Dedent(this string text) + public static string Dedent(this string text) { // First, start by finding the length of common indents, // disregarding lines that are only whitespace. From 8b931bb20516a2a1566a43dbcda63d4c8e271d86 Mon Sep 17 00:00:00 2001 From: Ryan Shaffer Date: Mon, 13 Apr 2020 14:25:00 -0700 Subject: [PATCH 04/13] Move Extensions.Dedent() to core project --- src/Core/Extensions/String.cs | 38 +++++++++++++++++++++++++++++++++++ src/Jupyter/Extensions.cs | 27 ------------------------- 2 files changed, 38 insertions(+), 27 deletions(-) create mode 100644 src/Core/Extensions/String.cs diff --git a/src/Core/Extensions/String.cs b/src/Core/Extensions/String.cs new file mode 100644 index 0000000000..ea85828f63 --- /dev/null +++ b/src/Core/Extensions/String.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Text.RegularExpressions; + +namespace Microsoft.Quantum.IQSharp +{ + public static partial class Extensions + { + /// + /// Removes common indents from each line in a string, + /// similarly to Python's textwrap.dedent() function. + /// + public static string Dedent(this string text) + { + // First, start by finding the length of common indents, + // disregarding lines that are only whitespace. + var leadingWhitespaceRegex = new Regex(@"^[ \t]*"); + var minWhitespace = int.MaxValue; + foreach (var line in text.Split("\n")) + { + if (!string.IsNullOrWhiteSpace(line)) + { + var match = leadingWhitespaceRegex.Match(line); + minWhitespace = match.Success + ? System.Math.Min(minWhitespace, match.Value.Length) + : minWhitespace = 0; + } + } + + // We can use that to build a new regex that strips + // out common indenting. + var leftTrimRegex = new Regex(@$"^[ \t]{{{minWhitespace}}}", RegexOptions.Multiline); + return leftTrimRegex.Replace(text, ""); + } + } +} diff --git a/src/Jupyter/Extensions.cs b/src/Jupyter/Extensions.cs index 2b53b49399..4c03f98166 100644 --- a/src/Jupyter/Extensions.cs +++ b/src/Jupyter/Extensions.cs @@ -170,32 +170,5 @@ public static T WithStackTraceDisplay(this T simulator, IChannel channel) }; return simulator; } - - /// - /// Removes common indents from each line in a string, - /// similarly to Python's textwrap.dedent() function. - /// - public static string Dedent(this string text) - { - // First, start by finding the length of common indents, - // disregarding lines that are only whitespace. - var leadingWhitespaceRegex = new Regex(@"^[ \t]*"); - var minWhitespace = int.MaxValue; - foreach (var line in text.Split("\n")) - { - if (!string.IsNullOrWhiteSpace(line)) - { - var match = leadingWhitespaceRegex.Match(line); - minWhitespace = match.Success - ? System.Math.Min(minWhitespace, match.Value.Length) - : minWhitespace = 0; - } - } - - // We can use that to build a new regex that strips - // out common indenting. - var leftTrimRegex = new Regex(@$"^[ \t]{{{minWhitespace}}}", RegexOptions.Multiline); - return leftTrimRegex.Replace(text, ""); - } } } From 7e5f3f62417f0e7cc5cf46abbe518a6cc7ec6144 Mon Sep 17 00:00:00 2001 From: Ryan Shaffer Date: Mon, 13 Apr 2020 15:14:00 -0700 Subject: [PATCH 05/13] Add AzureClient project to iqsharp solution --- iqsharp.sln | 37 ++++++++++++++++++++++-------- src/AzureClient/AzureClient.csproj | 28 ++++++++++++++++++++++ 2 files changed, 55 insertions(+), 10 deletions(-) create mode 100644 src/AzureClient/AzureClient.csproj diff --git a/iqsharp.sln b/iqsharp.sln index 2d4bdef234..952bf41100 100644 --- a/iqsharp.sln +++ b/iqsharp.sln @@ -1,17 +1,19 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29920.165 MinimumVisualStudioVersion = 15.0.26124.0 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jupyter", "src\Jupyter\Jupyter.csproj", "{B6F42099-DACD-472F-866C-BEF92DDDF754}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Jupyter", "src\Jupyter\Jupyter.csproj", "{B6F42099-DACD-472F-866C-BEF92DDDF754}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core", "src\Core\Core.csproj", "{0ACA57A6-A8F6-497C-85D3-D547433BFACB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core", "src\Core\Core.csproj", "{0ACA57A6-A8F6-497C-85D3-D547433BFACB}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.IQsharp", "src\Tests\Tests.IQsharp.csproj", "{756BE082-2E89-47F0-A48A-D7E762B0A82E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.IQsharp", "src\Tests\Tests.IQsharp.csproj", "{756BE082-2E89-47F0-A48A-D7E762B0A82E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tool", "src\Tool\Tool.csproj", "{7EB9C7E8-7D40-432E-9857-1DD6301B9F4A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tool", "src\Tool\Tool.csproj", "{7EB9C7E8-7D40-432E-9857-1DD6301B9F4A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Web", "src\Web\Web.csproj", "{6431E92B-12AA-432C-8D53-C9A7A54BA21B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web", "src\Web\Web.csproj", "{6431E92B-12AA-432C-8D53-C9A7A54BA21B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AzureClient", "src\AzureClient\AzureClient.csproj", "{E7B60C94-B666-4024-B53E-D12C142DE8DC}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -22,9 +24,6 @@ Global Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {B6F42099-DACD-472F-866C-BEF92DDDF754}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B6F42099-DACD-472F-866C-BEF92DDDF754}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -86,5 +85,23 @@ Global {6431E92B-12AA-432C-8D53-C9A7A54BA21B}.Release|x64.Build.0 = Release|Any CPU {6431E92B-12AA-432C-8D53-C9A7A54BA21B}.Release|x86.ActiveCfg = Release|Any CPU {6431E92B-12AA-432C-8D53-C9A7A54BA21B}.Release|x86.Build.0 = Release|Any CPU + {E7B60C94-B666-4024-B53E-D12C142DE8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E7B60C94-B666-4024-B53E-D12C142DE8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E7B60C94-B666-4024-B53E-D12C142DE8DC}.Debug|x64.ActiveCfg = Debug|Any CPU + {E7B60C94-B666-4024-B53E-D12C142DE8DC}.Debug|x64.Build.0 = Debug|Any CPU + {E7B60C94-B666-4024-B53E-D12C142DE8DC}.Debug|x86.ActiveCfg = Debug|Any CPU + {E7B60C94-B666-4024-B53E-D12C142DE8DC}.Debug|x86.Build.0 = Debug|Any CPU + {E7B60C94-B666-4024-B53E-D12C142DE8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E7B60C94-B666-4024-B53E-D12C142DE8DC}.Release|Any CPU.Build.0 = Release|Any CPU + {E7B60C94-B666-4024-B53E-D12C142DE8DC}.Release|x64.ActiveCfg = Release|Any CPU + {E7B60C94-B666-4024-B53E-D12C142DE8DC}.Release|x64.Build.0 = Release|Any CPU + {E7B60C94-B666-4024-B53E-D12C142DE8DC}.Release|x86.ActiveCfg = Release|Any CPU + {E7B60C94-B666-4024-B53E-D12C142DE8DC}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {9B439141-9EFD-47B2-BD10-41BD0C96316A} EndGlobalSection EndGlobal diff --git a/src/AzureClient/AzureClient.csproj b/src/AzureClient/AzureClient.csproj new file mode 100644 index 0000000000..830944146b --- /dev/null +++ b/src/AzureClient/AzureClient.csproj @@ -0,0 +1,28 @@ + + + + netstandard2.1 + x64 + Microsoft.Quantum.IQSharp.AzureClient + Microsoft.Quantum.IQSharp.AzureClient + true + + + + + + + + + + + + + + + + + + + + From a0023f2f6bbee985054adf62a3e0eaa9018c9acb Mon Sep 17 00:00:00 2001 From: Ryan Shaffer Date: Mon, 13 Apr 2020 15:15:12 -0700 Subject: [PATCH 06/13] Add AzureClient project dependencies and update package versions to be consistent --- src/Core/Core.csproj | 6 +++--- src/Jupyter/Jupyter.csproj | 3 ++- src/Tool/Tool.csproj | 1 + src/Tool/appsettings.json | 20 ++++++++++---------- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/Core/Core.csproj b/src/Core/Core.csproj index 3e8942e5af..dba9a8f51a 100644 --- a/src/Core/Core.csproj +++ b/src/Core/Core.csproj @@ -34,9 +34,9 @@ - - - + + + diff --git a/src/Jupyter/Jupyter.csproj b/src/Jupyter/Jupyter.csproj index 4fd43c8606..78d0fe8e13 100644 --- a/src/Jupyter/Jupyter.csproj +++ b/src/Jupyter/Jupyter.csproj @@ -22,11 +22,12 @@ - + + diff --git a/src/Tool/Tool.csproj b/src/Tool/Tool.csproj index ea89459038..14df53a843 100644 --- a/src/Tool/Tool.csproj +++ b/src/Tool/Tool.csproj @@ -36,6 +36,7 @@ + diff --git a/src/Tool/appsettings.json b/src/Tool/appsettings.json index 68275089e3..71f5f2f0b5 100644 --- a/src/Tool/appsettings.json +++ b/src/Tool/appsettings.json @@ -6,18 +6,18 @@ }, "AllowedHosts": "*", "DefaultPackageVersions": [ - "Microsoft.Quantum.Compiler::0.10.2003.1102-beta", + "Microsoft.Quantum.Compiler::0.11.2004.1014-beta", - "Microsoft.Quantum.CsharpGeneration::0.10.2003.1102-beta", - "Microsoft.Quantum.Development.Kit::0.10.2003.1102-beta", - "Microsoft.Quantum.Simulators::0.10.2003.1102-beta", - "Microsoft.Quantum.Xunit::0.10.2003.1102-beta", + "Microsoft.Quantum.CsharpGeneration::0.11.2004.1014-beta", + "Microsoft.Quantum.SDK::0.11.2004.1014-beta", + "Microsoft.Quantum.Simulators::0.11.2004.1014-beta", + "Microsoft.Quantum.Xunit::0.11.2004.1014-beta", - "Microsoft.Quantum.Standard::0.10.2003.1102-beta", - "Microsoft.Quantum.Chemistry::0.10.2003.1102-beta", - "Microsoft.Quantum.Chemistry.Jupyter::0.10.2003.1102-beta", - "Microsoft.Quantum.Numerics::0.10.2003.1102-beta", + "Microsoft.Quantum.Standard::0.11.2004.1014-beta", + "Microsoft.Quantum.Chemistry::0.11.2004.1014-beta", + "Microsoft.Quantum.Chemistry.Jupyter::0.11.2004.1014-beta", + "Microsoft.Quantum.Numerics::0.11.2004.1014-beta", - "Microsoft.Quantum.Research::0.10.2003.1102-beta" + "Microsoft.Quantum.Research::0.11.2004.1014-beta" ] } From e424eeddf64d189775fa989ed3db265c5a81e017 Mon Sep 17 00:00:00 2001 From: Ryan Shaffer Date: Mon, 13 Apr 2020 15:17:03 -0700 Subject: [PATCH 07/13] Add AzureClient class and register as magic symbol provider --- src/AzureClient/AzureClient.cs | 23 +++++++++++++++++++ src/AzureClient/Extensions.cs | 21 +++++++++++++++++ src/AzureClient/IAzureClient.cs | 16 +++++++++++++ src/Jupyter/Magic/Resolution/MagicResolver.cs | 13 ++++++++--- src/Tool/Startup.cs | 2 ++ 5 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 src/AzureClient/AzureClient.cs create mode 100644 src/AzureClient/Extensions.cs create mode 100644 src/AzureClient/IAzureClient.cs diff --git a/src/AzureClient/AzureClient.cs b/src/AzureClient/AzureClient.cs new file mode 100644 index 0000000000..8293fd7b65 --- /dev/null +++ b/src/AzureClient/AzureClient.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Microsoft.Jupyter.Core; +using System.Threading.Tasks; + +using Microsoft.Identity.Client; +using Microsoft.Identity.Client.Extensions.Msal; +using Microsoft.WindowsAzure.Storage; +using System.Linq; +using System.IO; +using Microsoft.Azure.Quantum; +using Microsoft.Azure.Quantum.Client; +using Microsoft.Azure.Quantum.Client.Models; +using Microsoft.Quantum.Runtime; + +namespace Microsoft.Quantum.IQSharp.AzureClient +{ + /// + public class AzureClient : IAzureClient + { + } +} diff --git a/src/AzureClient/Extensions.cs b/src/AzureClient/Extensions.cs new file mode 100644 index 0000000000..11453c042d --- /dev/null +++ b/src/AzureClient/Extensions.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Microsoft.Extensions.DependencyInjection; + +namespace Microsoft.Quantum.IQSharp.AzureClient +{ + /// + /// Extension methods to be used with various IQ# and AzureClient objects. + /// + public static class Extensions + { + /// + /// Adds services required for the AzureClient to a given service collection. + /// + public static void AddAzureClient(this IServiceCollection services) + { + services.AddSingleton(); + } + } +} diff --git a/src/AzureClient/IAzureClient.cs b/src/AzureClient/IAzureClient.cs new file mode 100644 index 0000000000..c4dc183ea4 --- /dev/null +++ b/src/AzureClient/IAzureClient.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Microsoft.Jupyter.Core; +using System.Threading.Tasks; + +namespace Microsoft.Quantum.IQSharp.AzureClient +{ + /// + /// This service is capable of connecting to Azure Quantum workspace + /// and submitting jobs. + /// + public interface IAzureClient + { + } +} diff --git a/src/Jupyter/Magic/Resolution/MagicResolver.cs b/src/Jupyter/Magic/Resolution/MagicResolver.cs index 4c624d884f..d183ead5c9 100644 --- a/src/Jupyter/Magic/Resolution/MagicResolver.cs +++ b/src/Jupyter/Magic/Resolution/MagicResolver.cs @@ -8,6 +8,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Jupyter.Core; +using Microsoft.Quantum.IQSharp.AzureClient; using Microsoft.Quantum.IQSharp.Common; using Newtonsoft.Json; @@ -22,7 +23,7 @@ namespace Microsoft.Quantum.IQSharp.Jupyter /// public class MagicSymbolResolver : IMagicSymbolResolver { - private AssemblyInfo kernelAssembly; + private AssemblyInfo[] kernelAssemblies; private Dictionary cache; private IServiceProvider services; private IReferences references; @@ -38,7 +39,10 @@ public MagicSymbolResolver(IServiceProvider services, ILogger(); this.logger = logger; - this.kernelAssembly = new AssemblyInfo(typeof(MagicSymbolResolver).Assembly); + this.kernelAssemblies = new[] { + new AssemblyInfo(typeof(MagicSymbolResolver).Assembly), + new AssemblyInfo(typeof(AzureClient.AzureClient).Assembly) + }; this.services = services; this.references = services.GetService(); } @@ -50,7 +54,10 @@ public MagicSymbolResolver(IServiceProvider services, ILogger private IEnumerable RelevantAssemblies() { - yield return this.kernelAssembly; + foreach (var asm in this.kernelAssemblies) + { + yield return asm; + } foreach (var asm in references.Assemblies) { diff --git a/src/Tool/Startup.cs b/src/Tool/Startup.cs index cb4cfa4150..c278f30269 100644 --- a/src/Tool/Startup.cs +++ b/src/Tool/Startup.cs @@ -5,6 +5,7 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.DependencyInjection; using Microsoft.Quantum.IQSharp.Jupyter; +using Microsoft.Quantum.IQSharp.AzureClient; using System; namespace Microsoft.Quantum.IQSharp @@ -24,6 +25,7 @@ public virtual void ConfigureServices(IServiceCollection services) services.AddSingleton(typeof(ITelemetryService), GetTelemetryServiceType()); services.AddIQSharp(); services.AddIQSharpKernel(); + services.AddAzureClient(); var assembly = typeof(PackagesController).Assembly; services.AddControllers() From dfc62ab9a6ecc8a93bbc2fb324e3717e6b5e9006 Mon Sep 17 00:00:00 2001 From: Ryan Shaffer Date: Wed, 15 Apr 2020 13:27:29 -0700 Subject: [PATCH 08/13] Add #nullable enable to new files --- src/AzureClient/AzureClient.cs | 7 ++++++- src/AzureClient/Extensions.cs | 7 ++++++- src/AzureClient/IAzureClient.cs | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/AzureClient/AzureClient.cs b/src/AzureClient/AzureClient.cs index 8293fd7b65..99626db950 100644 --- a/src/AzureClient/AzureClient.cs +++ b/src/AzureClient/AzureClient.cs @@ -1,4 +1,9 @@ -using System; +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable enable + +using System; using System.Collections.Generic; using System.Text; using Microsoft.Jupyter.Core; diff --git a/src/AzureClient/Extensions.cs b/src/AzureClient/Extensions.cs index 11453c042d..fbfe0a4a8e 100644 --- a/src/AzureClient/Extensions.cs +++ b/src/AzureClient/Extensions.cs @@ -1,4 +1,9 @@ -using System; +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable enable + +using System; using System.Collections.Generic; using System.Text; using Microsoft.Extensions.DependencyInjection; diff --git a/src/AzureClient/IAzureClient.cs b/src/AzureClient/IAzureClient.cs index c4dc183ea4..19da6a27df 100644 --- a/src/AzureClient/IAzureClient.cs +++ b/src/AzureClient/IAzureClient.cs @@ -1,4 +1,9 @@ -using System; +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable enable + +using System; using System.Collections.Generic; using System.Text; using Microsoft.Jupyter.Core; From 7d7bcc3fb08ae0b8b19a7d1760cd314dfa2b7e50 Mon Sep 17 00:00:00 2001 From: Ryan Shaffer Date: Wed, 15 Apr 2020 16:23:39 -0700 Subject: [PATCH 09/13] Add empty AzureClientTests --- src/Tests/AzureClientTests.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/Tests/AzureClientTests.cs diff --git a/src/Tests/AzureClientTests.cs b/src/Tests/AzureClientTests.cs new file mode 100644 index 0000000000..ba18985f1c --- /dev/null +++ b/src/Tests/AzureClientTests.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable enable + +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.Quantum.IQSharp.AzureClient; +using System.Linq; +using System.Collections.Generic; + +namespace Tests.IQSharp +{ + [TestClass] + public class AzureClientTests + { + [TestMethod] + public void TestNothing() + { + Assert.IsTrue(true); + } + } +} From 8d2b0eb99e4d89fac116fa62f6d204c2c8eecd58 Mon Sep 17 00:00:00 2001 From: Ryan Shaffer Date: Thu, 16 Apr 2020 16:34:31 -0700 Subject: [PATCH 10/13] Update a few package references --- src/AzureClient/AzureClient.cs | 1 - src/AzureClient/AzureClient.csproj | 3 +-- src/Core/Core.csproj | 4 ++-- src/Jupyter/Jupyter.csproj | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/AzureClient/AzureClient.cs b/src/AzureClient/AzureClient.cs index 99626db950..64faa81fda 100644 --- a/src/AzureClient/AzureClient.cs +++ b/src/AzureClient/AzureClient.cs @@ -11,7 +11,6 @@ using Microsoft.Identity.Client; using Microsoft.Identity.Client.Extensions.Msal; -using Microsoft.WindowsAzure.Storage; using System.Linq; using System.IO; using Microsoft.Azure.Quantum; diff --git a/src/AzureClient/AzureClient.csproj b/src/AzureClient/AzureClient.csproj index 830944146b..b8613eec35 100644 --- a/src/AzureClient/AzureClient.csproj +++ b/src/AzureClient/AzureClient.csproj @@ -16,9 +16,8 @@ - + - diff --git a/src/Core/Core.csproj b/src/Core/Core.csproj index dba9a8f51a..e5e7581f63 100644 --- a/src/Core/Core.csproj +++ b/src/Core/Core.csproj @@ -32,8 +32,8 @@ - - + + diff --git a/src/Jupyter/Jupyter.csproj b/src/Jupyter/Jupyter.csproj index 78d0fe8e13..87afc0d1ea 100644 --- a/src/Jupyter/Jupyter.csproj +++ b/src/Jupyter/Jupyter.csproj @@ -22,7 +22,7 @@ - + From 0c5681ac6d7cd94abc6b3ab4c1af8b0bd8ffd842 Mon Sep 17 00:00:00 2001 From: Ryan Shaffer Date: Thu, 16 Apr 2020 17:39:30 -0700 Subject: [PATCH 11/13] Update IAzureClient API docs Co-Authored-By: Chris Granade --- src/AzureClient/IAzureClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AzureClient/IAzureClient.cs b/src/AzureClient/IAzureClient.cs index 19da6a27df..8efd69e5a7 100644 --- a/src/AzureClient/IAzureClient.cs +++ b/src/AzureClient/IAzureClient.cs @@ -12,7 +12,7 @@ namespace Microsoft.Quantum.IQSharp.AzureClient { /// - /// This service is capable of connecting to Azure Quantum workspace + /// This service is capable of connecting to Azure Quantum workspaces /// and submitting jobs. /// public interface IAzureClient From 65ccb8c3af00c37ed788360adeb4b11128bebf62 Mon Sep 17 00:00:00 2001 From: Ryan Shaffer Date: Thu, 16 Apr 2020 17:40:07 -0700 Subject: [PATCH 12/13] Update new array syntax Co-Authored-By: Chris Granade --- src/Jupyter/Magic/Resolution/MagicResolver.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Jupyter/Magic/Resolution/MagicResolver.cs b/src/Jupyter/Magic/Resolution/MagicResolver.cs index d183ead5c9..d96b95fb1a 100644 --- a/src/Jupyter/Magic/Resolution/MagicResolver.cs +++ b/src/Jupyter/Magic/Resolution/MagicResolver.cs @@ -39,7 +39,8 @@ public MagicSymbolResolver(IServiceProvider services, ILogger(); this.logger = logger; - this.kernelAssemblies = new[] { + this.kernelAssemblies = new[] + { new AssemblyInfo(typeof(MagicSymbolResolver).Assembly), new AssemblyInfo(typeof(AzureClient.AzureClient).Assembly) }; From ae883cb8bfeb852ab6ffd4c2364280fc1ec71ef1 Mon Sep 17 00:00:00 2001 From: Ryan Shaffer Date: Thu, 16 Apr 2020 17:44:02 -0700 Subject: [PATCH 13/13] Use Microsoft.Quantum.Development.Kit package --- src/Tool/appsettings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tool/appsettings.json b/src/Tool/appsettings.json index 71f5f2f0b5..ca473b2635 100644 --- a/src/Tool/appsettings.json +++ b/src/Tool/appsettings.json @@ -9,7 +9,7 @@ "Microsoft.Quantum.Compiler::0.11.2004.1014-beta", "Microsoft.Quantum.CsharpGeneration::0.11.2004.1014-beta", - "Microsoft.Quantum.SDK::0.11.2004.1014-beta", + "Microsoft.Quantum.Development.Kit::0.11.2004.1014-beta", "Microsoft.Quantum.Simulators::0.11.2004.1014-beta", "Microsoft.Quantum.Xunit::0.11.2004.1014-beta",