From 0997916e719885ce74fb18ac8c3541884c76772b Mon Sep 17 00:00:00 2001 From: Sarah Marshall <33814365+samarsha@users.noreply.github.com> Date: Mon, 6 Jul 2020 10:56:53 -0700 Subject: [PATCH 01/32] Use a default target when submitting to Azure Quantum (#290) * Use a default target when submitting to Azure Quantum * Update doc comments * Move settings.Target null check to switch case Co-authored-by: bettinaheim <34236215+bettinaheim@users.noreply.github.com> --- src/Simulation/CsharpGeneration/EntryPoint.fs | 21 ++- .../EntryPointDriver.Tests/Tests.fs | 128 +++++++++++++++--- src/Simulation/EntryPointDriver/Azure.cs | 14 +- src/Simulation/EntryPointDriver/Driver.cs | 22 +-- .../EntryPointDriver/DriverSettings.cs | 2 +- .../EntryPointDriver/IEntryPoint.cs | 5 + 6 files changed, 148 insertions(+), 44 deletions(-) diff --git a/src/Simulation/CsharpGeneration/EntryPoint.fs b/src/Simulation/CsharpGeneration/EntryPoint.fs index 8906a7403c7..f359f26f1f3 100644 --- a/src/Simulation/CsharpGeneration/EntryPoint.fs +++ b/src/Simulation/CsharpGeneration/EntryPoint.fs @@ -133,21 +133,28 @@ let private mainMethod context entryPoint = let private entryPointClass context entryPoint = let callableName, argTypeName, returnTypeName = callableTypeNames context entryPoint let property name typeName value = ``property-arrow_get`` typeName name [``public``] get (``=>`` value) - let summaryProperty = property "Summary" "string" (literal ((PrintSummary entryPoint.Documentation false).Trim ())) + let summaryProperty = + (PrintSummary entryPoint.Documentation false).Trim () + |> literal + |> property "Summary" "string" let parameters = parameters context entryPoint.Documentation entryPoint.ArgumentTuple let defaultSimulator = context.assemblyConstants.TryGetValue AssemblyConstants.DefaultSimulator - |> snd - |> (fun value -> if String.IsNullOrWhiteSpace value then AssemblyConstants.QuantumSimulator else value) - let defaultSimulatorNameProperty = property "DefaultSimulatorName" "string" (literal defaultSimulator) + |> fun (_, value) -> if String.IsNullOrWhiteSpace value then AssemblyConstants.QuantumSimulator else value + let defaultSimulatorNameProperty = literal defaultSimulator |> property "DefaultSimulatorName" "string" + let defaultExecutionTargetProperty = + context.assemblyConstants.TryGetValue AssemblyConstants.ExecutionTarget + |> (fun (_, value) -> if value = null then "" else value) + |> literal + |> property "DefaultExecutionTarget" "string" let infoProperty = - property "Info" - (sprintf "EntryPointInfo<%s, %s>" argTypeName returnTypeName) - (ident callableName <|.|> ident "Info") + property "Info" (sprintf "EntryPointInfo<%s, %s>" argTypeName returnTypeName) + (ident callableName <|.|> ident "Info") let members : MemberDeclarationSyntax list = [ summaryProperty parameterOptionsProperty parameters defaultSimulatorNameProperty + defaultExecutionTargetProperty infoProperty customSimulatorFactory defaultSimulator createArgument context entryPoint diff --git a/src/Simulation/EntryPointDriver.Tests/Tests.fs b/src/Simulation/EntryPointDriver.Tests/Tests.fs index 9d3c9c5d0aa..0059809c97b 100644 --- a/src/Simulation/EntryPointDriver.Tests/Tests.fs +++ b/src/Simulation/EntryPointDriver.Tests/Tests.fs @@ -4,6 +4,7 @@ module Microsoft.Quantum.EntryPointDriver.Tests open System +open System.Collections.Generic open System.Collections.Immutable open System.Globalization open System.IO @@ -59,14 +60,9 @@ let private compileQsharp source = Assert.Empty errors compilation.BuiltCompilation -/// Generates C# source code from the compiled Q# syntax tree. The given default simulator is set as an assembly -/// constant. -let private generateCsharp defaultSimulator (compilation : QsCompilation) = - let assemblyConstants = - match defaultSimulator with - | Some simulator -> ImmutableDictionary.Empty.Add (AssemblyConstants.DefaultSimulator, simulator) - | None -> ImmutableDictionary.Empty - let context = CodegenContext.Create (compilation, assemblyConstants) +/// Generates C# source code from the compiled Q# syntax tree using the given assembly constants. +let private generateCsharp constants (compilation : QsCompilation) = + let context = CodegenContext.Create (compilation, constants) let entryPoint = context.allCallables.[Seq.exactlyOne compilation.EntryPoints] [ SimulationCode.generate (NonNullable<_>.New testFile) context @@ -112,12 +108,12 @@ let private compileCsharp (sources : string seq) = Assert.Equal (0L, stream.Seek (0L, SeekOrigin.Begin)) Assembly.Load (stream.ToArray ()) -/// The assembly for the given test case and default simulator. -let private testAssembly testNum defaultSimulator = +/// The assembly for the given test case assembly constants. +let private testAssembly testNum constants = testNum |> testCase |> compileQsharp - |> generateCsharp defaultSimulator + |> generateCsharp constants |> compileCsharp /// Runs the entry point in the assembly with the given command-line arguments, and returns the output, errors, and exit @@ -164,17 +160,26 @@ let private failsWith expected (assembly, args) = Assert.True (0 <> exitCode, sprintf "Expected non-zero exit code, but got 0 with:\n\n%s\n\n%s" error out) Assert.StartsWith (normalize expected, normalize (error + out)) -/// A tuple of the test assembly and arguments using the standard default simulator. The tuple can be passed to yields -/// or fails. -let private test testNum = - let assembly = testAssembly testNum None +/// A tuple of the test assembly and arguments using the given assembly constants. The tuple can be passed to yields or +/// fails. +let private testWithConstants constants testNum = + let assembly = testAssembly testNum constants fun args -> assembly, Array.ofList args +/// A tuple of the test assembly and arguments with no assembly constants. The tuple can be passed to yields or fails. +let private test = testWithConstants ImmutableDictionary.Empty + /// A tuple of the test assembly and arguments using the given default simulator. The tuple can be passed to yields or /// fails. -let private testWith testNum defaultSimulator = - let assembly = testAssembly testNum (Some defaultSimulator) - fun args -> assembly, Array.ofList args +let private testWithSim defaultSimulator = + ImmutableDictionary.CreateRange [KeyValuePair (AssemblyConstants.DefaultSimulator, defaultSimulator)] + |> testWithConstants + +/// A tuple of the test assembly and arguments using the given default target. The tuple can be passed to yields or +/// fails. +let private testWithTarget defaultTarget = + ImmutableDictionary.CreateRange [KeyValuePair (AssemblyConstants.ExecutionTarget, defaultTarget)] + |> testWithConstants /// Standard command-line arguments for the "submit" command without specifying a target. let private submitWithoutTarget = @@ -509,7 +514,7 @@ let ``Rejects unknown simulator`` () = [] let ``Supports default standard simulator`` () = - let given = testWith 32 AssemblyConstants.ResourcesEstimator + let given = testWithSim AssemblyConstants.ResourcesEstimator 32 given ["--use-h"; "false"] |> yields resourceSummary given ["--simulator"; AssemblyConstants.QuantumSimulator; "--use-h"; "false"] |> yields "Hello, World!" @@ -517,7 +522,7 @@ let ``Supports default standard simulator`` () = let ``Supports default custom simulator`` () = // This is not really a "custom" simulator, but the driver does not recognize the fully-qualified name of the // standard simulators, so it is treated as one. - let given = testWith 32 typeof.FullName + let given = testWithSim typeof.FullName 32 given ["--use-h"; "false"] |> yields "Hello, World!" given ["--use-h"; "true"] |> fails given ["--simulator"; typeof.FullName; "--use-h"; "false"] |> yields "Hello, World!" @@ -547,10 +552,30 @@ let ``Submit uses default values`` () = let given = test 1 given (submitWithNothingTarget @ ["--verbose"]) |> yields "The friendly URI for viewing job results is not available yet. Showing the job ID instead. + Subscription: mySubscription + Resource Group: myResourceGroup + Workspace: myWorkspace Target: test.nothing + Storage: + AAD Token: + Base URI: + Job Name: + Shots: 500 + Output: FriendlyUri + Dry Run: False + Verbose: True + + 00000000-0000-0000-0000-0000000000000" + +[] +let ``Submit uses default values with default target`` () = + let given = testWithTarget "test.nothing" 1 + given (submitWithoutTarget @ ["--verbose"]) + |> yields "The friendly URI for viewing job results is not available yet. Showing the job ID instead. Subscription: mySubscription Resource Group: myResourceGroup Workspace: myWorkspace + Target: test.nothing Storage: AAD Token: Base URI: @@ -579,10 +604,42 @@ let ``Submit allows overriding default values`` () = "750" ]) |> yields "The friendly URI for viewing job results is not available yet. Showing the job ID instead. + Subscription: mySubscription + Resource Group: myResourceGroup + Workspace: myWorkspace Target: test.nothing + Storage: myStorage + AAD Token: myToken + Base URI: myBaseUri + Job Name: myJobName + Shots: 750 + Output: FriendlyUri + Dry Run: False + Verbose: True + + 00000000-0000-0000-0000-0000000000000" + +[] +let ``Submit allows overriding default values with default target`` () = + let given = testWithTarget "foo.target" 1 + given (submitWithNothingTarget @ [ + "--verbose" + "--storage" + "myStorage" + "--aad-token" + "myToken" + "--base-uri" + "myBaseUri" + "--job-name" + "myJobName" + "--shots" + "750" + ]) + |> yields "The friendly URI for viewing job results is not available yet. Showing the job ID instead. Subscription: mySubscription Resource Group: myResourceGroup Workspace: myWorkspace + Target: test.nothing Storage: myStorage AAD Token: myToken Base URI: myBaseUri @@ -685,10 +742,10 @@ let ``Shows help text for submit command`` () = %s submit [options] Options: - --target (REQUIRED) The target device ID. --subscription (REQUIRED) The subscription ID. --resource-group (REQUIRED) The resource group name. --workspace (REQUIRED) The workspace name. + --target (REQUIRED) The target device ID. --storage The storage account connection string. --aad-token The Azure Active Directory authentication token. --base-uri The base URI of the Azure Quantum endpoint. @@ -701,6 +758,33 @@ let ``Shows help text for submit command`` () = --pauli (REQUIRED) The name of a Pauli matrix. --my-cool-bool (REQUIRED) A neat bit. -?, -h, --help Show help and usage information" - let given = test 33 given ["submit"; "--help"] |> yields message + +[] +let ``Shows help text for submit command with default target`` () = + let name = Path.GetFileNameWithoutExtension (Assembly.GetEntryAssembly().Location) + let message = + name + |> sprintf "Usage: + %s submit [options] + + Options: + --subscription (REQUIRED) The subscription ID. + --resource-group (REQUIRED) The resource group name. + --workspace (REQUIRED) The workspace name. + --target The target device ID. + --storage The storage account connection string. + --aad-token The Azure Active Directory authentication token. + --base-uri The base URI of the Azure Quantum endpoint. + --job-name The name of the submitted job. + --shots The number of times the program is executed on the target machine. + --output The information to show in the output after the job is submitted. + --dry-run Validate the program and options, but do not submit to Azure Quantum. + --verbose Show additional information about the submission. + -n (REQUIRED) A number. + --pauli (REQUIRED) The name of a Pauli matrix. + --my-cool-bool (REQUIRED) A neat bit. + -?, -h, --help Show help and usage information" + let given = testWithTarget "foo.target" 33 + given ["submit"; "--help"] |> yields message diff --git a/src/Simulation/EntryPointDriver/Azure.cs b/src/Simulation/EntryPointDriver/Azure.cs index 0f3b3a91e77..2f53a878836 100644 --- a/src/Simulation/EntryPointDriver/Azure.cs +++ b/src/Simulation/EntryPointDriver/Azure.cs @@ -150,9 +150,11 @@ private static void DisplayError(string summary, string message) /// Creates a quantum machine based on the Azure Quantum submission settings. /// /// The Azure Quantum submission settings. + /// Thrown if .Target is null. /// A quantum machine. private static IQuantumMachine? CreateMachine(AzureSettings settings) => settings.Target switch { + null => throw new ArgumentNullException(nameof(settings), "Target is null."), NothingMachine.TargetId => new NothingMachine(), ErrorMachine.TargetId => new ErrorMachine(), _ => QuantumMachineFactory.CreateMachine(settings.CreateWorkspace(), settings.Target, settings.Storage) @@ -190,11 +192,6 @@ internal enum OutputFormat /// internal sealed class AzureSettings { - /// - /// The target device ID. - /// - public string? Target { get; set; } - /// /// The subscription ID. /// @@ -210,6 +207,11 @@ internal sealed class AzureSettings /// public string? Workspace { get; set; } + /// + /// The target device ID. + /// + public string? Target { get; set; } + /// /// The storage account connection string. /// @@ -261,10 +263,10 @@ AadToken is null public override string ToString() => string.Join(System.Environment.NewLine, - $"Target: {Target}", $"Subscription: {Subscription}", $"Resource Group: {ResourceGroup}", $"Workspace: {Workspace}", + $"Target: {Target}", $"Storage: {Storage}", $"AAD Token: {AadToken}", $"Base URI: {BaseUri}", diff --git a/src/Simulation/EntryPointDriver/Driver.cs b/src/Simulation/EntryPointDriver/Driver.cs index 13a836e85f2..3ecbb770a3f 100644 --- a/src/Simulation/EntryPointDriver/Driver.cs +++ b/src/Simulation/EntryPointDriver/Driver.cs @@ -40,6 +40,11 @@ public sealed class Driver where TCallable : AbstractCalla /// private OptionInfo SimulatorOption { get; } + /// + /// The target option. + /// + private OptionInfo TargetOption { get; } + /// /// Creates a new driver for the entry point. /// @@ -49,6 +54,7 @@ public Driver(DriverSettings settings, IEntryPoint entryPoint) { this.settings = settings; this.entryPoint = entryPoint; + SimulatorOption = new OptionInfo( settings.SimulatorOptionAliases, entryPoint.DefaultSimulatorName, @@ -60,6 +66,12 @@ public Driver(DriverSettings settings, IEntryPoint entryPoint) settings.ResourcesEstimatorName, entryPoint.DefaultSimulatorName }); + + var targetAliases = ImmutableList.Create("--target"); + const string targetDescription = "The target device ID."; + TargetOption = string.IsNullOrWhiteSpace(entryPoint.DefaultExecutionTarget) + ? new OptionInfo(targetAliases, targetDescription) + : new OptionInfo(targetAliases, entryPoint.DefaultExecutionTarget, targetDescription); } /// @@ -80,10 +92,10 @@ public async Task Run(string[] args) IsHidden = true, Handler = CommandHandler.Create(Submit) }; - AddOptionIfAvailable(submit, TargetOption); AddOptionIfAvailable(submit, SubscriptionOption); AddOptionIfAvailable(submit, ResourceGroupOption); AddOptionIfAvailable(submit, WorkspaceOption); + AddOptionIfAvailable(submit, TargetOption); AddOptionIfAvailable(submit, StorageOption); AddOptionIfAvailable(submit, AadTokenOption); AddOptionIfAvailable(submit, BaseUriOption); @@ -132,10 +144,10 @@ await Simulation.Simulate( private async Task Submit(ParseResult parseResult, AzureSettings azureSettings) => await Azure.Submit(entryPoint, parseResult, new AzureSettings { - Target = azureSettings.Target, Subscription = azureSettings.Subscription, ResourceGroup = azureSettings.ResourceGroup, Workspace = azureSettings.Workspace, + Target = DefaultIfShadowed(TargetOption, azureSettings.Target), Storage = DefaultIfShadowed(StorageOption, azureSettings.Storage), AadToken = DefaultIfShadowed(AadTokenOption, azureSettings.AadToken), BaseUri = DefaultIfShadowed(BaseUriOption, azureSettings.BaseUri), @@ -205,12 +217,6 @@ internal static class Driver { // TODO: Define the aliases as constants. - /// - /// The target option. - /// - internal static readonly OptionInfo TargetOption = new OptionInfo( - ImmutableList.Create("--target"), "The target device ID."); - /// /// The subscription option. /// diff --git a/src/Simulation/EntryPointDriver/DriverSettings.cs b/src/Simulation/EntryPointDriver/DriverSettings.cs index 4b513cf50e4..17ec8e551a3 100644 --- a/src/Simulation/EntryPointDriver/DriverSettings.cs +++ b/src/Simulation/EntryPointDriver/DriverSettings.cs @@ -3,7 +3,7 @@ namespace Microsoft.Quantum.EntryPointDriver { /// - /// Settings for the entry point driver. + /// General settings for the entry point driver that do not depend on the entry point or compilation target. /// public sealed class DriverSettings { diff --git a/src/Simulation/EntryPointDriver/IEntryPoint.cs b/src/Simulation/EntryPointDriver/IEntryPoint.cs index b06f3e7c016..1018fc10f89 100644 --- a/src/Simulation/EntryPointDriver/IEntryPoint.cs +++ b/src/Simulation/EntryPointDriver/IEntryPoint.cs @@ -35,6 +35,11 @@ public interface IEntryPoint /// string DefaultSimulatorName { get; } + /// + /// The default execution target when to use when submitting the entry point to Azure Quantum. + /// + string DefaultExecutionTarget { get; } + /// /// Additional information about the entry point. /// From d160a887e2d4809ec47ac89b5261965b2ab52251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Zaragoza=20Cort=C3=A9s?= Date: Mon, 6 Jul 2020 19:21:44 -0700 Subject: [PATCH 02/32] Implement friendly URI option for Azure quantum machines (#294) * Implemented friendly uri option in azure quantum. * Fixed tests. * Fixed tests after nerge conflict. Co-authored-by: bettinaheim <34236215+bettinaheim@users.noreply.github.com> --- .../JobManagement/CloudJob.cs | 13 +++++++- .../JobManagement/Workspace.cs | 6 ++++ .../EntryPointDriver.Tests/Tests.fs | 32 +++++++------------ src/Simulation/EntryPointDriver/Azure.cs | 19 ++++++++--- 4 files changed, 45 insertions(+), 25 deletions(-) diff --git a/src/Azure/Azure.Quantum.Client/JobManagement/CloudJob.cs b/src/Azure/Azure.Quantum.Client/JobManagement/CloudJob.cs index 746de8c57b1..bfc879eb9d2 100644 --- a/src/Azure/Azure.Quantum.Client/JobManagement/CloudJob.cs +++ b/src/Azure/Azure.Quantum.Client/JobManagement/CloudJob.cs @@ -60,7 +60,7 @@ public CloudJob(IWorkspace workspace, JobDetails jobDetails) /// /// Gets an URI to access the job. /// - public Uri Uri => throw new NotImplementedException(); + public Uri Uri => GenerateUri(); /// /// Gets the workspace. @@ -91,5 +91,16 @@ public async Task CancelAsync(CancellationToken cancellationToken = default) CloudJob job = (CloudJob)await this.Workspace.CancelJobAsync(this.Details.Id, cancellationToken); this.Details = job.Details; } + + private Uri GenerateUri() + { + if (!(this.Workspace is Workspace cloudWorkspace)) + { + throw new NotSupportedException($"{typeof(CloudJob)}'s Workspace is not of type {typeof(Workspace)} and does not have enough data to generate URI"); + } + + var uriStr = $"https://ms.portal.azure.com/#@microsoft.onmicrosoft.com/resource/subscriptions/{cloudWorkspace.SubscriptionId}/resourceGroups/{cloudWorkspace.ResourceGroupName}/providers/Microsoft.Quantum/Workspaces/{cloudWorkspace.WorkspaceName}/job_management?microsoft_azure_quantum_jobid={Id}"; + return new Uri(uriStr); + } } } diff --git a/src/Azure/Azure.Quantum.Client/JobManagement/Workspace.cs b/src/Azure/Azure.Quantum.Client/JobManagement/Workspace.cs index c123010c18b..f37ed454817 100644 --- a/src/Azure/Azure.Quantum.Client/JobManagement/Workspace.cs +++ b/src/Azure/Azure.Quantum.Client/JobManagement/Workspace.cs @@ -114,6 +114,12 @@ private Workspace( } } + public string ResourceGroupName { get => resourceGroupName; } + + public string SubscriptionId { get => subscriptionId; } + + public string WorkspaceName { get => workspaceName; } + /// /// Gets or sets the jobs client. /// Internal only. diff --git a/src/Simulation/EntryPointDriver.Tests/Tests.fs b/src/Simulation/EntryPointDriver.Tests/Tests.fs index 0059809c97b..7206cf9f44e 100644 --- a/src/Simulation/EntryPointDriver.Tests/Tests.fs +++ b/src/Simulation/EntryPointDriver.Tests/Tests.fs @@ -471,8 +471,7 @@ let ``Shadows --shots`` () = given ["--shots"; "7"] |> yields "7" given (submitWithNothingTarget @ ["--shots"; "7"]) |> yields "Warning: Option --shots is overridden by an entry point parameter name. Using default value 500. - The friendly URI for viewing job results is not available yet. Showing the job ID instead. - 00000000-0000-0000-0000-0000000000000" + https://www.example.com/00000000-0000-0000-0000-0000000000000" // Simulators @@ -539,8 +538,7 @@ let ``Supports default custom simulator`` () = let ``Submit can submit a job`` () = let given = test 1 given submitWithNothingTarget - |> yields "The friendly URI for viewing job results is not available yet. Showing the job ID instead. - 00000000-0000-0000-0000-0000000000000" + |> yields "https://www.example.com/00000000-0000-0000-0000-0000000000000" [] let ``Submit can show only the ID`` () = @@ -551,8 +549,7 @@ let ``Submit can show only the ID`` () = let ``Submit uses default values`` () = let given = test 1 given (submitWithNothingTarget @ ["--verbose"]) - |> yields "The friendly URI for viewing job results is not available yet. Showing the job ID instead. - Subscription: mySubscription + |> yields "Subscription: mySubscription Resource Group: myResourceGroup Workspace: myWorkspace Target: test.nothing @@ -565,14 +562,13 @@ let ``Submit uses default values`` () = Dry Run: False Verbose: True - 00000000-0000-0000-0000-0000000000000" + https://www.example.com/00000000-0000-0000-0000-0000000000000" [] let ``Submit uses default values with default target`` () = let given = testWithTarget "test.nothing" 1 given (submitWithoutTarget @ ["--verbose"]) - |> yields "The friendly URI for viewing job results is not available yet. Showing the job ID instead. - Subscription: mySubscription + |> yields "Subscription: mySubscription Resource Group: myResourceGroup Workspace: myWorkspace Target: test.nothing @@ -585,7 +581,7 @@ let ``Submit uses default values with default target`` () = Dry Run: False Verbose: True - 00000000-0000-0000-0000-0000000000000" + https://www.example.com/00000000-0000-0000-0000-0000000000000" [] let ``Submit allows overriding default values`` () = @@ -603,8 +599,7 @@ let ``Submit allows overriding default values`` () = "--shots" "750" ]) - |> yields "The friendly URI for viewing job results is not available yet. Showing the job ID instead. - Subscription: mySubscription + |> yields "Subscription: mySubscription Resource Group: myResourceGroup Workspace: myWorkspace Target: test.nothing @@ -617,7 +612,7 @@ let ``Submit allows overriding default values`` () = Dry Run: False Verbose: True - 00000000-0000-0000-0000-0000000000000" + https://www.example.com/00000000-0000-0000-0000-0000000000000" [] let ``Submit allows overriding default values with default target`` () = @@ -635,8 +630,7 @@ let ``Submit allows overriding default values with default target`` () = "--shots" "750" ]) - |> yields "The friendly URI for viewing job results is not available yet. Showing the job ID instead. - Subscription: mySubscription + |> yields "Subscription: mySubscription Resource Group: myResourceGroup Workspace: myWorkspace Target: test.nothing @@ -649,14 +643,13 @@ let ``Submit allows overriding default values with default target`` () = Dry Run: False Verbose: True - 00000000-0000-0000-0000-0000000000000" + https://www.example.com/00000000-0000-0000-0000-0000000000000" [] let ``Submit requires a positive number of shots`` () = let given = test 1 given (submitWithNothingTarget @ ["--shots"; "1"]) - |> yields "The friendly URI for viewing job results is not available yet. Showing the job ID instead. - 00000000-0000-0000-0000-0000000000000" + |> yields "https://www.example.com/00000000-0000-0000-0000-0000000000000" given (submitWithNothingTarget @ ["--shots"; "0"]) |> fails given (submitWithNothingTarget @ ["--shots"; "-1"]) |> fails @@ -691,8 +684,7 @@ let ``Submit has required options`` () = for args in powerSet allArgs do given (commandName :: List.concat args) |> if List.length args = List.length allArgs - then yields "The friendly URI for viewing job results is not available yet. Showing the job ID instead. - 00000000-0000-0000-0000-0000000000000" + then yields "https://www.example.com/00000000-0000-0000-0000-0000000000000" else fails [] diff --git a/src/Simulation/EntryPointDriver/Azure.cs b/src/Simulation/EntryPointDriver/Azure.cs index 2f53a878836..541e939b1b0 100644 --- a/src/Simulation/EntryPointDriver/Azure.cs +++ b/src/Simulation/EntryPointDriver/Azure.cs @@ -121,10 +121,21 @@ private static void DisplayJob(IQuantumMachineJob job, OutputFormat format) switch (format) { case OutputFormat.FriendlyUri: - // TODO: - DisplayWithColor(ConsoleColor.Yellow, Console.Error, - "The friendly URI for viewing job results is not available yet. Showing the job ID instead."); - Console.WriteLine(job.Id); + try + { + Console.WriteLine(job.Uri); + } + catch (Exception ex) + { + DisplayWithColor( + ConsoleColor.Yellow, + Console.Error, + $"The friendly URI for viewing job results could not be obtained.{System.Environment.NewLine}" + + $"Error details: {ex.Message}" + + $"Showing the job ID instead."); + + Console.WriteLine(job.Id); + } break; case OutputFormat.Id: Console.WriteLine(job.Id); From 2f9c6f21d569fdfea14ec18450462a8ae136c2be Mon Sep 17 00:00:00 2001 From: Scott Carda <55811729+ScottCarda-MS@users.noreply.github.com> Date: Tue, 7 Jul 2020 13:30:17 -0700 Subject: [PATCH 03/32] Simulator Classical Control Execution Tests (#297) Added execution test projects for various simulators. Added tests to check measurements on qubits work. Added tests for conditions on measurement results. --- Simulation.sln | 935 ++++++++++-------- .../ClassicallyControlledSupportTests.qs | 746 ++++++++++++++ .../HoneywellExe/HoneywellExe.csproj | 25 + .../HoneywellExe/MeasurementSupportTests.qs | 30 + .../TestProjects/IonQExe/IonQExe.csproj | 25 + .../IonQExe/MeasurementSupportTests.qs | 30 + .../ClassicallyControlledSupportTests.qs | 746 ++++++++++++++ .../QCIExe/MeasurementSupportTests.qs | 30 + .../TestProjects/QCIExe/QCIExe.csproj | 25 + .../TestProjects/UnitTests/Hello.qs | 32 +- .../UnitTests/HoneywellSimulation.qs | 335 +++++++ .../TestProjects/UnitTests/IonQSimulation.qs | 20 + .../TestProjects/UnitTests/QCISimulation.qs | 335 +++++++ .../TestProjects/UnitTests/UnitTests.csproj | 3 + .../Tests.Microsoft.Quantum.Simulators.csproj | 2 +- 15 files changed, 2863 insertions(+), 456 deletions(-) create mode 100644 src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/ClassicallyControlledSupportTests.qs create mode 100644 src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj create mode 100644 src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/MeasurementSupportTests.qs create mode 100644 src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj create mode 100644 src/Simulation/Simulators.Tests/TestProjects/IonQExe/MeasurementSupportTests.qs create mode 100644 src/Simulation/Simulators.Tests/TestProjects/QCIExe/ClassicallyControlledSupportTests.qs create mode 100644 src/Simulation/Simulators.Tests/TestProjects/QCIExe/MeasurementSupportTests.qs create mode 100644 src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj create mode 100644 src/Simulation/Simulators.Tests/TestProjects/UnitTests/HoneywellSimulation.qs create mode 100644 src/Simulation/Simulators.Tests/TestProjects/UnitTests/IonQSimulation.qs create mode 100644 src/Simulation/Simulators.Tests/TestProjects/UnitTests/QCISimulation.qs diff --git a/Simulation.sln b/Simulation.sln index 0abbff54fdc..b22a08046ff 100644 --- a/Simulation.sln +++ b/Simulation.sln @@ -1,439 +1,496 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28809.33 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Quantum.Runtime.Core", "src\Simulation\Core\Microsoft.Quantum.Runtime.Core.csproj", "{E9123D45-C1B0-4462-8810-D26ED6D31944}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime", "src\Simulation\QCTraceSimulator\Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj", "{058CB08D-BFA7-41E2-BE6B-0A0A72054F91}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Quantum.Simulation.Common", "src\Simulation\Common\Microsoft.Quantum.Simulation.Common.csproj", "{8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Quantum.Simulators", "src\Simulation\Simulators\Microsoft.Quantum.Simulators.csproj", "{72B7E75C-D305-45BD-929E-C86298AAA8DE}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime", "src\Simulation\QCTraceSimulator.Tests\Tests.Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj", "{DD50D2D9-2765-449B-8C4B-835A428E160D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.Microsoft.Quantum.Simulators", "src\Simulation\Simulators.Tests\Tests.Microsoft.Quantum.Simulators.csproj", "{23461B29-F9DE-4F5B-BC30-50BBE1A10B48}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "simulation", "simulation", "{34D419E9-CCF1-4E48-9FA4-3AD4B86BEEB4}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Quantum.QSharp.Core", "src\Simulation\QsharpCore\Microsoft.Quantum.QSharp.Core.csproj", "{A6C5BA7A-DF6F-476F-9106-95905932B810}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "xunit", "xunit", "{34117E2A-DEDC-4274-AAA4-3C61ACF86284}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "core", "core", "{03736C2E-DB2A-46A9-B7B2-C1216BDECB4F}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Quantum.Xunit", "src\Xunit\Microsoft.Quantum.Xunit.csproj", "{ECFE1CE8-46A1-4D14-99D6-AAF76B704638}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "generation", "generation", "{A567C185-A429-418B-AFDE-6F1785BA4A77}" -EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Tests.CsharpGeneration", "src\Simulation\CsharpGeneration.Tests\Tests.CsharpGeneration.fsproj", "{10D7C395-4F79-4DAF-9289-A4B8FAF6183A}" -EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Microsoft.Quantum.RoslynWrapper", "src\Simulation\RoslynWrapper\Microsoft.Quantum.RoslynWrapper.fsproj", "{618FBF9D-4EF3-435D-9728-81C726236668}" -EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Tests.RoslynWrapper", "src\Simulation\RoslynWrapper.Tests\Tests.RoslynWrapper.fsproj", "{48206BD6-48DD-4442-A395-3A6594E4C9C6}" -EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Microsoft.Quantum.CsharpGeneration", "src\Simulation\CsharpGeneration\Microsoft.Quantum.CsharpGeneration.fsproj", "{B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestProjects", "TestProjects", "{09C842CB-930C-4C7D-AD5F-E30DE4A55820}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QsharpExe", "src\Simulation\Simulators.Tests\TestProjects\QsharpExe\QsharpExe.csproj", "{2F5796A7-4AF8-4B78-928A-0A3A80752F9D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Quantum.EntryPointDriver", "src\Simulation\EntryPointDriver\Microsoft.Quantum.EntryPointDriver.csproj", "{944FE7EF-9220-4CC6-BB20-CE517195B922}" -EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Tests.Microsoft.Quantum.EntryPointDriver", "src\Simulation\EntryPointDriver.Tests\Tests.Microsoft.Quantum.EntryPointDriver.fsproj", "{E2F30496-19D8-46A8-9BC0-26936FFE70D2}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Library1", "src\Simulation\Simulators.Tests\TestProjects\Library1\Library1.csproj", "{7256B986-6705-42FC-9F57-485D72D9DE51}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Library2", "src\Simulation\Simulators.Tests\TestProjects\Library2\Library2.csproj", "{A85277B3-4E07-4E15-8F0C-07CC855A3BCB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Library with Spaces", "src\Simulation\Simulators.Tests\TestProjects\Library with Spaces\Library with Spaces.csproj", "{418E79F7-9FCF-4128-AA35-1334A685377D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests", "src\Simulation\Simulators.Tests\TestProjects\UnitTests\UnitTests.csproj", "{46278108-D247-4EFC-AC34-23D4A676F62F}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Azure", "Azure", "{37CDC768-16D4-4574-8553-07D99D0A72F7}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Quantum.Client", "src\Azure\Azure.Quantum.Client\Microsoft.Azure.Quantum.Client.csproj", "{7F05FD87-A2FB-4915-A988-4EF92AB82179}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Quantum.Client.Test", "src\Azure\Azure.Quantum.Client.Test\Microsoft.Azure.Quantum.Client.Test.csproj", "{4858E5E3-23FA-4928-B99A-54065875A2B9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - MinSizeRel|Any CPU = MinSizeRel|Any CPU - MinSizeRel|x64 = MinSizeRel|x64 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - RelWithDebInfo|Any CPU = RelWithDebInfo|Any CPU - RelWithDebInfo|x64 = RelWithDebInfo|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E9123D45-C1B0-4462-8810-D26ED6D31944}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E9123D45-C1B0-4462-8810-D26ED6D31944}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E9123D45-C1B0-4462-8810-D26ED6D31944}.Debug|x64.ActiveCfg = Debug|Any CPU - {E9123D45-C1B0-4462-8810-D26ED6D31944}.Debug|x64.Build.0 = Debug|Any CPU - {E9123D45-C1B0-4462-8810-D26ED6D31944}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU - {E9123D45-C1B0-4462-8810-D26ED6D31944}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU - {E9123D45-C1B0-4462-8810-D26ED6D31944}.MinSizeRel|x64.ActiveCfg = Release|Any CPU - {E9123D45-C1B0-4462-8810-D26ED6D31944}.MinSizeRel|x64.Build.0 = Release|Any CPU - {E9123D45-C1B0-4462-8810-D26ED6D31944}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E9123D45-C1B0-4462-8810-D26ED6D31944}.Release|Any CPU.Build.0 = Release|Any CPU - {E9123D45-C1B0-4462-8810-D26ED6D31944}.Release|x64.ActiveCfg = Release|Any CPU - {E9123D45-C1B0-4462-8810-D26ED6D31944}.Release|x64.Build.0 = Release|Any CPU - {E9123D45-C1B0-4462-8810-D26ED6D31944}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {E9123D45-C1B0-4462-8810-D26ED6D31944}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {E9123D45-C1B0-4462-8810-D26ED6D31944}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {E9123D45-C1B0-4462-8810-D26ED6D31944}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.Debug|Any CPU.Build.0 = Debug|Any CPU - {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.Debug|x64.ActiveCfg = Debug|Any CPU - {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.Debug|x64.Build.0 = Debug|Any CPU - {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU - {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU - {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.MinSizeRel|x64.ActiveCfg = Release|Any CPU - {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.MinSizeRel|x64.Build.0 = Release|Any CPU - {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.Release|Any CPU.ActiveCfg = Release|Any CPU - {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.Release|Any CPU.Build.0 = Release|Any CPU - {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.Release|x64.ActiveCfg = Release|Any CPU - {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.Release|x64.Build.0 = Release|Any CPU - {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.Debug|x64.ActiveCfg = Debug|Any CPU - {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.Debug|x64.Build.0 = Debug|Any CPU - {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU - {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU - {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.MinSizeRel|x64.ActiveCfg = Release|Any CPU - {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.MinSizeRel|x64.Build.0 = Release|Any CPU - {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.Release|Any CPU.Build.0 = Release|Any CPU - {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.Release|x64.ActiveCfg = Release|Any CPU - {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.Release|x64.Build.0 = Release|Any CPU - {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {72B7E75C-D305-45BD-929E-C86298AAA8DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {72B7E75C-D305-45BD-929E-C86298AAA8DE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {72B7E75C-D305-45BD-929E-C86298AAA8DE}.Debug|x64.ActiveCfg = Debug|Any CPU - {72B7E75C-D305-45BD-929E-C86298AAA8DE}.Debug|x64.Build.0 = Debug|Any CPU - {72B7E75C-D305-45BD-929E-C86298AAA8DE}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU - {72B7E75C-D305-45BD-929E-C86298AAA8DE}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU - {72B7E75C-D305-45BD-929E-C86298AAA8DE}.MinSizeRel|x64.ActiveCfg = Release|Any CPU - {72B7E75C-D305-45BD-929E-C86298AAA8DE}.MinSizeRel|x64.Build.0 = Release|Any CPU - {72B7E75C-D305-45BD-929E-C86298AAA8DE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {72B7E75C-D305-45BD-929E-C86298AAA8DE}.Release|Any CPU.Build.0 = Release|Any CPU - {72B7E75C-D305-45BD-929E-C86298AAA8DE}.Release|x64.ActiveCfg = Release|Any CPU - {72B7E75C-D305-45BD-929E-C86298AAA8DE}.Release|x64.Build.0 = Release|Any CPU - {72B7E75C-D305-45BD-929E-C86298AAA8DE}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {72B7E75C-D305-45BD-929E-C86298AAA8DE}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {72B7E75C-D305-45BD-929E-C86298AAA8DE}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {72B7E75C-D305-45BD-929E-C86298AAA8DE}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {DD50D2D9-2765-449B-8C4B-835A428E160D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DD50D2D9-2765-449B-8C4B-835A428E160D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DD50D2D9-2765-449B-8C4B-835A428E160D}.Debug|x64.ActiveCfg = Debug|Any CPU - {DD50D2D9-2765-449B-8C4B-835A428E160D}.Debug|x64.Build.0 = Debug|Any CPU - {DD50D2D9-2765-449B-8C4B-835A428E160D}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU - {DD50D2D9-2765-449B-8C4B-835A428E160D}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU - {DD50D2D9-2765-449B-8C4B-835A428E160D}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU - {DD50D2D9-2765-449B-8C4B-835A428E160D}.MinSizeRel|x64.Build.0 = Debug|Any CPU - {DD50D2D9-2765-449B-8C4B-835A428E160D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DD50D2D9-2765-449B-8C4B-835A428E160D}.Release|Any CPU.Build.0 = Release|Any CPU - {DD50D2D9-2765-449B-8C4B-835A428E160D}.Release|x64.ActiveCfg = Release|Any CPU - {DD50D2D9-2765-449B-8C4B-835A428E160D}.Release|x64.Build.0 = Release|Any CPU - {DD50D2D9-2765-449B-8C4B-835A428E160D}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {DD50D2D9-2765-449B-8C4B-835A428E160D}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {DD50D2D9-2765-449B-8C4B-835A428E160D}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {DD50D2D9-2765-449B-8C4B-835A428E160D}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.Debug|Any CPU.Build.0 = Debug|Any CPU - {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.Debug|x64.ActiveCfg = Debug|Any CPU - {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.Debug|x64.Build.0 = Debug|Any CPU - {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU - {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU - {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU - {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.MinSizeRel|x64.Build.0 = Debug|Any CPU - {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.Release|Any CPU.ActiveCfg = Release|Any CPU - {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.Release|Any CPU.Build.0 = Release|Any CPU - {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.Release|x64.ActiveCfg = Release|Any CPU - {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.Release|x64.Build.0 = Release|Any CPU - {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {A6C5BA7A-DF6F-476F-9106-95905932B810}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A6C5BA7A-DF6F-476F-9106-95905932B810}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A6C5BA7A-DF6F-476F-9106-95905932B810}.Debug|x64.ActiveCfg = Debug|Any CPU - {A6C5BA7A-DF6F-476F-9106-95905932B810}.Debug|x64.Build.0 = Debug|Any CPU - {A6C5BA7A-DF6F-476F-9106-95905932B810}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU - {A6C5BA7A-DF6F-476F-9106-95905932B810}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU - {A6C5BA7A-DF6F-476F-9106-95905932B810}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU - {A6C5BA7A-DF6F-476F-9106-95905932B810}.MinSizeRel|x64.Build.0 = Debug|Any CPU - {A6C5BA7A-DF6F-476F-9106-95905932B810}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A6C5BA7A-DF6F-476F-9106-95905932B810}.Release|Any CPU.Build.0 = Release|Any CPU - {A6C5BA7A-DF6F-476F-9106-95905932B810}.Release|x64.ActiveCfg = Release|Any CPU - {A6C5BA7A-DF6F-476F-9106-95905932B810}.Release|x64.Build.0 = Release|Any CPU - {A6C5BA7A-DF6F-476F-9106-95905932B810}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {A6C5BA7A-DF6F-476F-9106-95905932B810}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {A6C5BA7A-DF6F-476F-9106-95905932B810}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {A6C5BA7A-DF6F-476F-9106-95905932B810}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.Debug|x64.ActiveCfg = Debug|Any CPU - {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.Debug|x64.Build.0 = Debug|Any CPU - {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU - {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU - {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU - {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.MinSizeRel|x64.Build.0 = Debug|Any CPU - {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.Release|Any CPU.Build.0 = Release|Any CPU - {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.Release|x64.ActiveCfg = Release|Any CPU - {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.Release|x64.Build.0 = Release|Any CPU - {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.Debug|x64.ActiveCfg = Debug|Any CPU - {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.Debug|x64.Build.0 = Debug|Any CPU - {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU - {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU - {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU - {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.MinSizeRel|x64.Build.0 = Debug|Any CPU - {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.Release|Any CPU.Build.0 = Release|Any CPU - {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.Release|x64.ActiveCfg = Release|Any CPU - {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.Release|x64.Build.0 = Release|Any CPU - {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {618FBF9D-4EF3-435D-9728-81C726236668}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {618FBF9D-4EF3-435D-9728-81C726236668}.Debug|Any CPU.Build.0 = Debug|Any CPU - {618FBF9D-4EF3-435D-9728-81C726236668}.Debug|x64.ActiveCfg = Debug|Any CPU - {618FBF9D-4EF3-435D-9728-81C726236668}.Debug|x64.Build.0 = Debug|Any CPU - {618FBF9D-4EF3-435D-9728-81C726236668}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU - {618FBF9D-4EF3-435D-9728-81C726236668}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU - {618FBF9D-4EF3-435D-9728-81C726236668}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU - {618FBF9D-4EF3-435D-9728-81C726236668}.MinSizeRel|x64.Build.0 = Debug|Any CPU - {618FBF9D-4EF3-435D-9728-81C726236668}.Release|Any CPU.ActiveCfg = Release|Any CPU - {618FBF9D-4EF3-435D-9728-81C726236668}.Release|Any CPU.Build.0 = Release|Any CPU - {618FBF9D-4EF3-435D-9728-81C726236668}.Release|x64.ActiveCfg = Release|Any CPU - {618FBF9D-4EF3-435D-9728-81C726236668}.Release|x64.Build.0 = Release|Any CPU - {618FBF9D-4EF3-435D-9728-81C726236668}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {618FBF9D-4EF3-435D-9728-81C726236668}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {618FBF9D-4EF3-435D-9728-81C726236668}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {618FBF9D-4EF3-435D-9728-81C726236668}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {48206BD6-48DD-4442-A395-3A6594E4C9C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {48206BD6-48DD-4442-A395-3A6594E4C9C6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {48206BD6-48DD-4442-A395-3A6594E4C9C6}.Debug|x64.ActiveCfg = Debug|Any CPU - {48206BD6-48DD-4442-A395-3A6594E4C9C6}.Debug|x64.Build.0 = Debug|Any CPU - {48206BD6-48DD-4442-A395-3A6594E4C9C6}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU - {48206BD6-48DD-4442-A395-3A6594E4C9C6}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU - {48206BD6-48DD-4442-A395-3A6594E4C9C6}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU - {48206BD6-48DD-4442-A395-3A6594E4C9C6}.MinSizeRel|x64.Build.0 = Debug|Any CPU - {48206BD6-48DD-4442-A395-3A6594E4C9C6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {48206BD6-48DD-4442-A395-3A6594E4C9C6}.Release|Any CPU.Build.0 = Release|Any CPU - {48206BD6-48DD-4442-A395-3A6594E4C9C6}.Release|x64.ActiveCfg = Release|Any CPU - {48206BD6-48DD-4442-A395-3A6594E4C9C6}.Release|x64.Build.0 = Release|Any CPU - {48206BD6-48DD-4442-A395-3A6594E4C9C6}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {48206BD6-48DD-4442-A395-3A6594E4C9C6}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {48206BD6-48DD-4442-A395-3A6594E4C9C6}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {48206BD6-48DD-4442-A395-3A6594E4C9C6}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.Debug|x64.ActiveCfg = Debug|Any CPU - {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.Debug|x64.Build.0 = Debug|Any CPU - {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU - {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU - {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU - {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.MinSizeRel|x64.Build.0 = Debug|Any CPU - {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.Release|Any CPU.Build.0 = Release|Any CPU - {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.Release|x64.ActiveCfg = Release|Any CPU - {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.Release|x64.Build.0 = Release|Any CPU - {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.Debug|x64.ActiveCfg = Debug|Any CPU - {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.Debug|x64.Build.0 = Debug|Any CPU - {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU - {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU - {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU - {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.MinSizeRel|x64.Build.0 = Debug|Any CPU - {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.Release|Any CPU.Build.0 = Release|Any CPU - {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.Release|x64.ActiveCfg = Release|Any CPU - {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.Release|x64.Build.0 = Release|Any CPU - {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {944FE7EF-9220-4CC6-BB20-CE517195B922}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {944FE7EF-9220-4CC6-BB20-CE517195B922}.Debug|Any CPU.Build.0 = Debug|Any CPU - {944FE7EF-9220-4CC6-BB20-CE517195B922}.Debug|x64.ActiveCfg = Debug|Any CPU - {944FE7EF-9220-4CC6-BB20-CE517195B922}.Debug|x64.Build.0 = Debug|Any CPU - {944FE7EF-9220-4CC6-BB20-CE517195B922}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU - {944FE7EF-9220-4CC6-BB20-CE517195B922}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU - {944FE7EF-9220-4CC6-BB20-CE517195B922}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU - {944FE7EF-9220-4CC6-BB20-CE517195B922}.MinSizeRel|x64.Build.0 = Debug|Any CPU - {944FE7EF-9220-4CC6-BB20-CE517195B922}.Release|Any CPU.ActiveCfg = Release|Any CPU - {944FE7EF-9220-4CC6-BB20-CE517195B922}.Release|Any CPU.Build.0 = Release|Any CPU - {944FE7EF-9220-4CC6-BB20-CE517195B922}.Release|x64.ActiveCfg = Release|Any CPU - {944FE7EF-9220-4CC6-BB20-CE517195B922}.Release|x64.Build.0 = Release|Any CPU - {944FE7EF-9220-4CC6-BB20-CE517195B922}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU - {944FE7EF-9220-4CC6-BB20-CE517195B922}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU - {944FE7EF-9220-4CC6-BB20-CE517195B922}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU - {944FE7EF-9220-4CC6-BB20-CE517195B922}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU - {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.Debug|x64.ActiveCfg = Debug|Any CPU - {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.Debug|x64.Build.0 = Debug|Any CPU - {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU - {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU - {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU - {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.MinSizeRel|x64.Build.0 = Debug|Any CPU - {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.Release|Any CPU.Build.0 = Release|Any CPU - {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.Release|x64.ActiveCfg = Release|Any CPU - {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.Release|x64.Build.0 = Release|Any CPU - {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU - {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU - {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU - {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU - {7256B986-6705-42FC-9F57-485D72D9DE51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7256B986-6705-42FC-9F57-485D72D9DE51}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7256B986-6705-42FC-9F57-485D72D9DE51}.Debug|x64.ActiveCfg = Debug|Any CPU - {7256B986-6705-42FC-9F57-485D72D9DE51}.Debug|x64.Build.0 = Debug|Any CPU - {7256B986-6705-42FC-9F57-485D72D9DE51}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU - {7256B986-6705-42FC-9F57-485D72D9DE51}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU - {7256B986-6705-42FC-9F57-485D72D9DE51}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU - {7256B986-6705-42FC-9F57-485D72D9DE51}.MinSizeRel|x64.Build.0 = Debug|Any CPU - {7256B986-6705-42FC-9F57-485D72D9DE51}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7256B986-6705-42FC-9F57-485D72D9DE51}.Release|Any CPU.Build.0 = Release|Any CPU - {7256B986-6705-42FC-9F57-485D72D9DE51}.Release|x64.ActiveCfg = Release|Any CPU - {7256B986-6705-42FC-9F57-485D72D9DE51}.Release|x64.Build.0 = Release|Any CPU - {7256B986-6705-42FC-9F57-485D72D9DE51}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {7256B986-6705-42FC-9F57-485D72D9DE51}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {7256B986-6705-42FC-9F57-485D72D9DE51}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {7256B986-6705-42FC-9F57-485D72D9DE51}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.Debug|x64.ActiveCfg = Debug|Any CPU - {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.Debug|x64.Build.0 = Debug|Any CPU - {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU - {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU - {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU - {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.MinSizeRel|x64.Build.0 = Debug|Any CPU - {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.Release|Any CPU.Build.0 = Release|Any CPU - {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.Release|x64.ActiveCfg = Release|Any CPU - {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.Release|x64.Build.0 = Release|Any CPU - {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {46278108-D247-4EFC-AC34-23D4A676F62F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {46278108-D247-4EFC-AC34-23D4A676F62F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {46278108-D247-4EFC-AC34-23D4A676F62F}.Debug|x64.ActiveCfg = Debug|Any CPU - {46278108-D247-4EFC-AC34-23D4A676F62F}.Debug|x64.Build.0 = Debug|Any CPU - {46278108-D247-4EFC-AC34-23D4A676F62F}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU - {46278108-D247-4EFC-AC34-23D4A676F62F}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU - {46278108-D247-4EFC-AC34-23D4A676F62F}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU - {46278108-D247-4EFC-AC34-23D4A676F62F}.MinSizeRel|x64.Build.0 = Debug|Any CPU - {46278108-D247-4EFC-AC34-23D4A676F62F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {46278108-D247-4EFC-AC34-23D4A676F62F}.Release|Any CPU.Build.0 = Release|Any CPU - {46278108-D247-4EFC-AC34-23D4A676F62F}.Release|x64.ActiveCfg = Release|Any CPU - {46278108-D247-4EFC-AC34-23D4A676F62F}.Release|x64.Build.0 = Release|Any CPU - {46278108-D247-4EFC-AC34-23D4A676F62F}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {46278108-D247-4EFC-AC34-23D4A676F62F}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {46278108-D247-4EFC-AC34-23D4A676F62F}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {46278108-D247-4EFC-AC34-23D4A676F62F}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {418E79F7-9FCF-4128-AA35-1334A685377D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {418E79F7-9FCF-4128-AA35-1334A685377D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {418E79F7-9FCF-4128-AA35-1334A685377D}.Debug|x64.ActiveCfg = Debug|Any CPU - {418E79F7-9FCF-4128-AA35-1334A685377D}.Debug|x64.Build.0 = Debug|Any CPU - {418E79F7-9FCF-4128-AA35-1334A685377D}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU - {418E79F7-9FCF-4128-AA35-1334A685377D}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU - {418E79F7-9FCF-4128-AA35-1334A685377D}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU - {418E79F7-9FCF-4128-AA35-1334A685377D}.MinSizeRel|x64.Build.0 = Debug|Any CPU - {418E79F7-9FCF-4128-AA35-1334A685377D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {418E79F7-9FCF-4128-AA35-1334A685377D}.Release|Any CPU.Build.0 = Release|Any CPU - {418E79F7-9FCF-4128-AA35-1334A685377D}.Release|x64.ActiveCfg = Release|Any CPU - {418E79F7-9FCF-4128-AA35-1334A685377D}.Release|x64.Build.0 = Release|Any CPU - {418E79F7-9FCF-4128-AA35-1334A685377D}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU - {418E79F7-9FCF-4128-AA35-1334A685377D}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU - {418E79F7-9FCF-4128-AA35-1334A685377D}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU - {418E79F7-9FCF-4128-AA35-1334A685377D}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU - {7F05FD87-A2FB-4915-A988-4EF92AB82179}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7F05FD87-A2FB-4915-A988-4EF92AB82179}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7F05FD87-A2FB-4915-A988-4EF92AB82179}.Debug|x64.ActiveCfg = Debug|Any CPU - {7F05FD87-A2FB-4915-A988-4EF92AB82179}.Debug|x64.Build.0 = Debug|Any CPU - {7F05FD87-A2FB-4915-A988-4EF92AB82179}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU - {7F05FD87-A2FB-4915-A988-4EF92AB82179}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU - {7F05FD87-A2FB-4915-A988-4EF92AB82179}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU - {7F05FD87-A2FB-4915-A988-4EF92AB82179}.MinSizeRel|x64.Build.0 = Debug|Any CPU - {7F05FD87-A2FB-4915-A988-4EF92AB82179}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7F05FD87-A2FB-4915-A988-4EF92AB82179}.Release|Any CPU.Build.0 = Release|Any CPU - {7F05FD87-A2FB-4915-A988-4EF92AB82179}.Release|x64.ActiveCfg = Release|Any CPU - {7F05FD87-A2FB-4915-A988-4EF92AB82179}.Release|x64.Build.0 = Release|Any CPU - {7F05FD87-A2FB-4915-A988-4EF92AB82179}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {7F05FD87-A2FB-4915-A988-4EF92AB82179}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {7F05FD87-A2FB-4915-A988-4EF92AB82179}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {7F05FD87-A2FB-4915-A988-4EF92AB82179}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - {4858E5E3-23FA-4928-B99A-54065875A2B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4858E5E3-23FA-4928-B99A-54065875A2B9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4858E5E3-23FA-4928-B99A-54065875A2B9}.Debug|x64.ActiveCfg = Debug|Any CPU - {4858E5E3-23FA-4928-B99A-54065875A2B9}.Debug|x64.Build.0 = Debug|Any CPU - {4858E5E3-23FA-4928-B99A-54065875A2B9}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU - {4858E5E3-23FA-4928-B99A-54065875A2B9}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU - {4858E5E3-23FA-4928-B99A-54065875A2B9}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU - {4858E5E3-23FA-4928-B99A-54065875A2B9}.MinSizeRel|x64.Build.0 = Debug|Any CPU - {4858E5E3-23FA-4928-B99A-54065875A2B9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4858E5E3-23FA-4928-B99A-54065875A2B9}.Release|Any CPU.Build.0 = Release|Any CPU - {4858E5E3-23FA-4928-B99A-54065875A2B9}.Release|x64.ActiveCfg = Release|Any CPU - {4858E5E3-23FA-4928-B99A-54065875A2B9}.Release|x64.Build.0 = Release|Any CPU - {4858E5E3-23FA-4928-B99A-54065875A2B9}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU - {4858E5E3-23FA-4928-B99A-54065875A2B9}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU - {4858E5E3-23FA-4928-B99A-54065875A2B9}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU - {4858E5E3-23FA-4928-B99A-54065875A2B9}.RelWithDebInfo|x64.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {E9123D45-C1B0-4462-8810-D26ED6D31944} = {03736C2E-DB2A-46A9-B7B2-C1216BDECB4F} - {058CB08D-BFA7-41E2-BE6B-0A0A72054F91} = {34D419E9-CCF1-4E48-9FA4-3AD4B86BEEB4} - {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445} = {34D419E9-CCF1-4E48-9FA4-3AD4B86BEEB4} - {72B7E75C-D305-45BD-929E-C86298AAA8DE} = {34D419E9-CCF1-4E48-9FA4-3AD4B86BEEB4} - {DD50D2D9-2765-449B-8C4B-835A428E160D} = {34D419E9-CCF1-4E48-9FA4-3AD4B86BEEB4} - {23461B29-F9DE-4F5B-BC30-50BBE1A10B48} = {34D419E9-CCF1-4E48-9FA4-3AD4B86BEEB4} - {A6C5BA7A-DF6F-476F-9106-95905932B810} = {03736C2E-DB2A-46A9-B7B2-C1216BDECB4F} - {ECFE1CE8-46A1-4D14-99D6-AAF76B704638} = {34117E2A-DEDC-4274-AAA4-3C61ACF86284} - {10D7C395-4F79-4DAF-9289-A4B8FAF6183A} = {A567C185-A429-418B-AFDE-6F1785BA4A77} - {618FBF9D-4EF3-435D-9728-81C726236668} = {A567C185-A429-418B-AFDE-6F1785BA4A77} - {48206BD6-48DD-4442-A395-3A6594E4C9C6} = {A567C185-A429-418B-AFDE-6F1785BA4A77} - {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC} = {A567C185-A429-418B-AFDE-6F1785BA4A77} - {09C842CB-930C-4C7D-AD5F-E30DE4A55820} = {34D419E9-CCF1-4E48-9FA4-3AD4B86BEEB4} - {2F5796A7-4AF8-4B78-928A-0A3A80752F9D} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} - {944FE7EF-9220-4CC6-BB20-CE517195B922} = {A567C185-A429-418B-AFDE-6F1785BA4A77} - {E2F30496-19D8-46A8-9BC0-26936FFE70D2} = {A567C185-A429-418B-AFDE-6F1785BA4A77} - {7256B986-6705-42FC-9F57-485D72D9DE51} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} - {A85277B3-4E07-4E15-8F0C-07CC855A3BCB} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} - {46278108-D247-4EFC-AC34-23D4A676F62F} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} - {418E79F7-9FCF-4128-AA35-1334A685377D} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} - {7F05FD87-A2FB-4915-A988-4EF92AB82179} = {37CDC768-16D4-4574-8553-07D99D0A72F7} - {4858E5E3-23FA-4928-B99A-54065875A2B9} = {37CDC768-16D4-4574-8553-07D99D0A72F7} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {929C0464-86D8-4F70-8835-0A5EAF930821} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28809.33 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Quantum.Runtime.Core", "src\Simulation\Core\Microsoft.Quantum.Runtime.Core.csproj", "{E9123D45-C1B0-4462-8810-D26ED6D31944}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime", "src\Simulation\QCTraceSimulator\Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj", "{058CB08D-BFA7-41E2-BE6B-0A0A72054F91}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Quantum.Simulation.Common", "src\Simulation\Common\Microsoft.Quantum.Simulation.Common.csproj", "{8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Quantum.Simulators", "src\Simulation\Simulators\Microsoft.Quantum.Simulators.csproj", "{72B7E75C-D305-45BD-929E-C86298AAA8DE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime", "src\Simulation\QCTraceSimulator.Tests\Tests.Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj", "{DD50D2D9-2765-449B-8C4B-835A428E160D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests.Microsoft.Quantum.Simulators", "src\Simulation\Simulators.Tests\Tests.Microsoft.Quantum.Simulators.csproj", "{23461B29-F9DE-4F5B-BC30-50BBE1A10B48}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "simulation", "simulation", "{34D419E9-CCF1-4E48-9FA4-3AD4B86BEEB4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Quantum.QSharp.Core", "src\Simulation\QsharpCore\Microsoft.Quantum.QSharp.Core.csproj", "{A6C5BA7A-DF6F-476F-9106-95905932B810}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "xunit", "xunit", "{34117E2A-DEDC-4274-AAA4-3C61ACF86284}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "core", "core", "{03736C2E-DB2A-46A9-B7B2-C1216BDECB4F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Quantum.Xunit", "src\Xunit\Microsoft.Quantum.Xunit.csproj", "{ECFE1CE8-46A1-4D14-99D6-AAF76B704638}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "generation", "generation", "{A567C185-A429-418B-AFDE-6F1785BA4A77}" +EndProject +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Tests.CsharpGeneration", "src\Simulation\CsharpGeneration.Tests\Tests.CsharpGeneration.fsproj", "{10D7C395-4F79-4DAF-9289-A4B8FAF6183A}" +EndProject +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Microsoft.Quantum.RoslynWrapper", "src\Simulation\RoslynWrapper\Microsoft.Quantum.RoslynWrapper.fsproj", "{618FBF9D-4EF3-435D-9728-81C726236668}" +EndProject +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Tests.RoslynWrapper", "src\Simulation\RoslynWrapper.Tests\Tests.RoslynWrapper.fsproj", "{48206BD6-48DD-4442-A395-3A6594E4C9C6}" +EndProject +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Microsoft.Quantum.CsharpGeneration", "src\Simulation\CsharpGeneration\Microsoft.Quantum.CsharpGeneration.fsproj", "{B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestProjects", "TestProjects", "{09C842CB-930C-4C7D-AD5F-E30DE4A55820}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QsharpExe", "src\Simulation\Simulators.Tests\TestProjects\QsharpExe\QsharpExe.csproj", "{2F5796A7-4AF8-4B78-928A-0A3A80752F9D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Quantum.EntryPointDriver", "src\Simulation\EntryPointDriver\Microsoft.Quantum.EntryPointDriver.csproj", "{944FE7EF-9220-4CC6-BB20-CE517195B922}" +EndProject +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Tests.Microsoft.Quantum.EntryPointDriver", "src\Simulation\EntryPointDriver.Tests\Tests.Microsoft.Quantum.EntryPointDriver.fsproj", "{E2F30496-19D8-46A8-9BC0-26936FFE70D2}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Library1", "src\Simulation\Simulators.Tests\TestProjects\Library1\Library1.csproj", "{7256B986-6705-42FC-9F57-485D72D9DE51}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Library2", "src\Simulation\Simulators.Tests\TestProjects\Library2\Library2.csproj", "{A85277B3-4E07-4E15-8F0C-07CC855A3BCB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Library with Spaces", "src\Simulation\Simulators.Tests\TestProjects\Library with Spaces\Library with Spaces.csproj", "{418E79F7-9FCF-4128-AA35-1334A685377D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests", "src\Simulation\Simulators.Tests\TestProjects\UnitTests\UnitTests.csproj", "{46278108-D247-4EFC-AC34-23D4A676F62F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Azure", "Azure", "{37CDC768-16D4-4574-8553-07D99D0A72F7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Quantum.Client", "src\Azure\Azure.Quantum.Client\Microsoft.Azure.Quantum.Client.csproj", "{7F05FD87-A2FB-4915-A988-4EF92AB82179}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Quantum.Client.Test", "src\Azure\Azure.Quantum.Client.Test\Microsoft.Azure.Quantum.Client.Test.csproj", "{4858E5E3-23FA-4928-B99A-54065875A2B9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HoneywellExe", "src\Simulation\Simulators.Tests\TestProjects\HoneywellExe\HoneywellExe.csproj", "{1448512E-132F-4DA8-BCBA-D98F16B31600}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IonQExe", "src\Simulation\Simulators.Tests\TestProjects\IonQExe\IonQExe.csproj", "{55833C6C-6E91-4413-9F77-96B3A09666B8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QCIExe", "src\Simulation\Simulators.Tests\TestProjects\QCIExe\QCIExe.csproj", "{C015FF41-9A51-4AF0-AEFC-2547D596B10A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + MinSizeRel|Any CPU = MinSizeRel|Any CPU + MinSizeRel|x64 = MinSizeRel|x64 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + RelWithDebInfo|Any CPU = RelWithDebInfo|Any CPU + RelWithDebInfo|x64 = RelWithDebInfo|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E9123D45-C1B0-4462-8810-D26ED6D31944}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E9123D45-C1B0-4462-8810-D26ED6D31944}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E9123D45-C1B0-4462-8810-D26ED6D31944}.Debug|x64.ActiveCfg = Debug|Any CPU + {E9123D45-C1B0-4462-8810-D26ED6D31944}.Debug|x64.Build.0 = Debug|Any CPU + {E9123D45-C1B0-4462-8810-D26ED6D31944}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU + {E9123D45-C1B0-4462-8810-D26ED6D31944}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU + {E9123D45-C1B0-4462-8810-D26ED6D31944}.MinSizeRel|x64.ActiveCfg = Release|Any CPU + {E9123D45-C1B0-4462-8810-D26ED6D31944}.MinSizeRel|x64.Build.0 = Release|Any CPU + {E9123D45-C1B0-4462-8810-D26ED6D31944}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E9123D45-C1B0-4462-8810-D26ED6D31944}.Release|Any CPU.Build.0 = Release|Any CPU + {E9123D45-C1B0-4462-8810-D26ED6D31944}.Release|x64.ActiveCfg = Release|Any CPU + {E9123D45-C1B0-4462-8810-D26ED6D31944}.Release|x64.Build.0 = Release|Any CPU + {E9123D45-C1B0-4462-8810-D26ED6D31944}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {E9123D45-C1B0-4462-8810-D26ED6D31944}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {E9123D45-C1B0-4462-8810-D26ED6D31944}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {E9123D45-C1B0-4462-8810-D26ED6D31944}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.Debug|Any CPU.Build.0 = Debug|Any CPU + {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.Debug|x64.ActiveCfg = Debug|Any CPU + {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.Debug|x64.Build.0 = Debug|Any CPU + {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU + {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU + {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.MinSizeRel|x64.ActiveCfg = Release|Any CPU + {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.MinSizeRel|x64.Build.0 = Release|Any CPU + {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.Release|Any CPU.ActiveCfg = Release|Any CPU + {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.Release|Any CPU.Build.0 = Release|Any CPU + {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.Release|x64.ActiveCfg = Release|Any CPU + {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.Release|x64.Build.0 = Release|Any CPU + {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {058CB08D-BFA7-41E2-BE6B-0A0A72054F91}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.Debug|x64.ActiveCfg = Debug|Any CPU + {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.Debug|x64.Build.0 = Debug|Any CPU + {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU + {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU + {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.MinSizeRel|x64.ActiveCfg = Release|Any CPU + {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.MinSizeRel|x64.Build.0 = Release|Any CPU + {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.Release|Any CPU.Build.0 = Release|Any CPU + {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.Release|x64.ActiveCfg = Release|Any CPU + {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.Release|x64.Build.0 = Release|Any CPU + {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {72B7E75C-D305-45BD-929E-C86298AAA8DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {72B7E75C-D305-45BD-929E-C86298AAA8DE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {72B7E75C-D305-45BD-929E-C86298AAA8DE}.Debug|x64.ActiveCfg = Debug|Any CPU + {72B7E75C-D305-45BD-929E-C86298AAA8DE}.Debug|x64.Build.0 = Debug|Any CPU + {72B7E75C-D305-45BD-929E-C86298AAA8DE}.MinSizeRel|Any CPU.ActiveCfg = Release|Any CPU + {72B7E75C-D305-45BD-929E-C86298AAA8DE}.MinSizeRel|Any CPU.Build.0 = Release|Any CPU + {72B7E75C-D305-45BD-929E-C86298AAA8DE}.MinSizeRel|x64.ActiveCfg = Release|Any CPU + {72B7E75C-D305-45BD-929E-C86298AAA8DE}.MinSizeRel|x64.Build.0 = Release|Any CPU + {72B7E75C-D305-45BD-929E-C86298AAA8DE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {72B7E75C-D305-45BD-929E-C86298AAA8DE}.Release|Any CPU.Build.0 = Release|Any CPU + {72B7E75C-D305-45BD-929E-C86298AAA8DE}.Release|x64.ActiveCfg = Release|Any CPU + {72B7E75C-D305-45BD-929E-C86298AAA8DE}.Release|x64.Build.0 = Release|Any CPU + {72B7E75C-D305-45BD-929E-C86298AAA8DE}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {72B7E75C-D305-45BD-929E-C86298AAA8DE}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {72B7E75C-D305-45BD-929E-C86298AAA8DE}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {72B7E75C-D305-45BD-929E-C86298AAA8DE}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {DD50D2D9-2765-449B-8C4B-835A428E160D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DD50D2D9-2765-449B-8C4B-835A428E160D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DD50D2D9-2765-449B-8C4B-835A428E160D}.Debug|x64.ActiveCfg = Debug|Any CPU + {DD50D2D9-2765-449B-8C4B-835A428E160D}.Debug|x64.Build.0 = Debug|Any CPU + {DD50D2D9-2765-449B-8C4B-835A428E160D}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {DD50D2D9-2765-449B-8C4B-835A428E160D}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {DD50D2D9-2765-449B-8C4B-835A428E160D}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {DD50D2D9-2765-449B-8C4B-835A428E160D}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {DD50D2D9-2765-449B-8C4B-835A428E160D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DD50D2D9-2765-449B-8C4B-835A428E160D}.Release|Any CPU.Build.0 = Release|Any CPU + {DD50D2D9-2765-449B-8C4B-835A428E160D}.Release|x64.ActiveCfg = Release|Any CPU + {DD50D2D9-2765-449B-8C4B-835A428E160D}.Release|x64.Build.0 = Release|Any CPU + {DD50D2D9-2765-449B-8C4B-835A428E160D}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {DD50D2D9-2765-449B-8C4B-835A428E160D}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {DD50D2D9-2765-449B-8C4B-835A428E160D}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {DD50D2D9-2765-449B-8C4B-835A428E160D}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.Debug|Any CPU.Build.0 = Debug|Any CPU + {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.Debug|x64.ActiveCfg = Debug|Any CPU + {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.Debug|x64.Build.0 = Debug|Any CPU + {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.Release|Any CPU.ActiveCfg = Release|Any CPU + {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.Release|Any CPU.Build.0 = Release|Any CPU + {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.Release|x64.ActiveCfg = Release|Any CPU + {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.Release|x64.Build.0 = Release|Any CPU + {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {23461B29-F9DE-4F5B-BC30-50BBE1A10B48}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {A6C5BA7A-DF6F-476F-9106-95905932B810}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A6C5BA7A-DF6F-476F-9106-95905932B810}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A6C5BA7A-DF6F-476F-9106-95905932B810}.Debug|x64.ActiveCfg = Debug|Any CPU + {A6C5BA7A-DF6F-476F-9106-95905932B810}.Debug|x64.Build.0 = Debug|Any CPU + {A6C5BA7A-DF6F-476F-9106-95905932B810}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {A6C5BA7A-DF6F-476F-9106-95905932B810}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {A6C5BA7A-DF6F-476F-9106-95905932B810}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {A6C5BA7A-DF6F-476F-9106-95905932B810}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {A6C5BA7A-DF6F-476F-9106-95905932B810}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A6C5BA7A-DF6F-476F-9106-95905932B810}.Release|Any CPU.Build.0 = Release|Any CPU + {A6C5BA7A-DF6F-476F-9106-95905932B810}.Release|x64.ActiveCfg = Release|Any CPU + {A6C5BA7A-DF6F-476F-9106-95905932B810}.Release|x64.Build.0 = Release|Any CPU + {A6C5BA7A-DF6F-476F-9106-95905932B810}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {A6C5BA7A-DF6F-476F-9106-95905932B810}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {A6C5BA7A-DF6F-476F-9106-95905932B810}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {A6C5BA7A-DF6F-476F-9106-95905932B810}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.Debug|x64.ActiveCfg = Debug|Any CPU + {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.Debug|x64.Build.0 = Debug|Any CPU + {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.Release|Any CPU.Build.0 = Release|Any CPU + {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.Release|x64.ActiveCfg = Release|Any CPU + {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.Release|x64.Build.0 = Release|Any CPU + {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {ECFE1CE8-46A1-4D14-99D6-AAF76B704638}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.Debug|x64.ActiveCfg = Debug|Any CPU + {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.Debug|x64.Build.0 = Debug|Any CPU + {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.Release|Any CPU.Build.0 = Release|Any CPU + {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.Release|x64.ActiveCfg = Release|Any CPU + {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.Release|x64.Build.0 = Release|Any CPU + {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {10D7C395-4F79-4DAF-9289-A4B8FAF6183A}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {618FBF9D-4EF3-435D-9728-81C726236668}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {618FBF9D-4EF3-435D-9728-81C726236668}.Debug|Any CPU.Build.0 = Debug|Any CPU + {618FBF9D-4EF3-435D-9728-81C726236668}.Debug|x64.ActiveCfg = Debug|Any CPU + {618FBF9D-4EF3-435D-9728-81C726236668}.Debug|x64.Build.0 = Debug|Any CPU + {618FBF9D-4EF3-435D-9728-81C726236668}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {618FBF9D-4EF3-435D-9728-81C726236668}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {618FBF9D-4EF3-435D-9728-81C726236668}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {618FBF9D-4EF3-435D-9728-81C726236668}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {618FBF9D-4EF3-435D-9728-81C726236668}.Release|Any CPU.ActiveCfg = Release|Any CPU + {618FBF9D-4EF3-435D-9728-81C726236668}.Release|Any CPU.Build.0 = Release|Any CPU + {618FBF9D-4EF3-435D-9728-81C726236668}.Release|x64.ActiveCfg = Release|Any CPU + {618FBF9D-4EF3-435D-9728-81C726236668}.Release|x64.Build.0 = Release|Any CPU + {618FBF9D-4EF3-435D-9728-81C726236668}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {618FBF9D-4EF3-435D-9728-81C726236668}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {618FBF9D-4EF3-435D-9728-81C726236668}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {618FBF9D-4EF3-435D-9728-81C726236668}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {48206BD6-48DD-4442-A395-3A6594E4C9C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {48206BD6-48DD-4442-A395-3A6594E4C9C6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {48206BD6-48DD-4442-A395-3A6594E4C9C6}.Debug|x64.ActiveCfg = Debug|Any CPU + {48206BD6-48DD-4442-A395-3A6594E4C9C6}.Debug|x64.Build.0 = Debug|Any CPU + {48206BD6-48DD-4442-A395-3A6594E4C9C6}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {48206BD6-48DD-4442-A395-3A6594E4C9C6}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {48206BD6-48DD-4442-A395-3A6594E4C9C6}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {48206BD6-48DD-4442-A395-3A6594E4C9C6}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {48206BD6-48DD-4442-A395-3A6594E4C9C6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {48206BD6-48DD-4442-A395-3A6594E4C9C6}.Release|Any CPU.Build.0 = Release|Any CPU + {48206BD6-48DD-4442-A395-3A6594E4C9C6}.Release|x64.ActiveCfg = Release|Any CPU + {48206BD6-48DD-4442-A395-3A6594E4C9C6}.Release|x64.Build.0 = Release|Any CPU + {48206BD6-48DD-4442-A395-3A6594E4C9C6}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {48206BD6-48DD-4442-A395-3A6594E4C9C6}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {48206BD6-48DD-4442-A395-3A6594E4C9C6}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {48206BD6-48DD-4442-A395-3A6594E4C9C6}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.Debug|x64.ActiveCfg = Debug|Any CPU + {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.Debug|x64.Build.0 = Debug|Any CPU + {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.Release|Any CPU.Build.0 = Release|Any CPU + {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.Release|x64.ActiveCfg = Release|Any CPU + {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.Release|x64.Build.0 = Release|Any CPU + {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.Debug|x64.ActiveCfg = Debug|Any CPU + {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.Debug|x64.Build.0 = Debug|Any CPU + {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.Release|Any CPU.Build.0 = Release|Any CPU + {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.Release|x64.ActiveCfg = Release|Any CPU + {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.Release|x64.Build.0 = Release|Any CPU + {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {2F5796A7-4AF8-4B78-928A-0A3A80752F9D}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {944FE7EF-9220-4CC6-BB20-CE517195B922}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {944FE7EF-9220-4CC6-BB20-CE517195B922}.Debug|Any CPU.Build.0 = Debug|Any CPU + {944FE7EF-9220-4CC6-BB20-CE517195B922}.Debug|x64.ActiveCfg = Debug|Any CPU + {944FE7EF-9220-4CC6-BB20-CE517195B922}.Debug|x64.Build.0 = Debug|Any CPU + {944FE7EF-9220-4CC6-BB20-CE517195B922}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {944FE7EF-9220-4CC6-BB20-CE517195B922}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {944FE7EF-9220-4CC6-BB20-CE517195B922}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {944FE7EF-9220-4CC6-BB20-CE517195B922}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {944FE7EF-9220-4CC6-BB20-CE517195B922}.Release|Any CPU.ActiveCfg = Release|Any CPU + {944FE7EF-9220-4CC6-BB20-CE517195B922}.Release|Any CPU.Build.0 = Release|Any CPU + {944FE7EF-9220-4CC6-BB20-CE517195B922}.Release|x64.ActiveCfg = Release|Any CPU + {944FE7EF-9220-4CC6-BB20-CE517195B922}.Release|x64.Build.0 = Release|Any CPU + {944FE7EF-9220-4CC6-BB20-CE517195B922}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU + {944FE7EF-9220-4CC6-BB20-CE517195B922}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU + {944FE7EF-9220-4CC6-BB20-CE517195B922}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU + {944FE7EF-9220-4CC6-BB20-CE517195B922}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU + {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.Debug|x64.ActiveCfg = Debug|Any CPU + {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.Debug|x64.Build.0 = Debug|Any CPU + {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.Release|Any CPU.Build.0 = Release|Any CPU + {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.Release|x64.ActiveCfg = Release|Any CPU + {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.Release|x64.Build.0 = Release|Any CPU + {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU + {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU + {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU + {E2F30496-19D8-46A8-9BC0-26936FFE70D2}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU + {7256B986-6705-42FC-9F57-485D72D9DE51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7256B986-6705-42FC-9F57-485D72D9DE51}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7256B986-6705-42FC-9F57-485D72D9DE51}.Debug|x64.ActiveCfg = Debug|Any CPU + {7256B986-6705-42FC-9F57-485D72D9DE51}.Debug|x64.Build.0 = Debug|Any CPU + {7256B986-6705-42FC-9F57-485D72D9DE51}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {7256B986-6705-42FC-9F57-485D72D9DE51}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {7256B986-6705-42FC-9F57-485D72D9DE51}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {7256B986-6705-42FC-9F57-485D72D9DE51}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {7256B986-6705-42FC-9F57-485D72D9DE51}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7256B986-6705-42FC-9F57-485D72D9DE51}.Release|Any CPU.Build.0 = Release|Any CPU + {7256B986-6705-42FC-9F57-485D72D9DE51}.Release|x64.ActiveCfg = Release|Any CPU + {7256B986-6705-42FC-9F57-485D72D9DE51}.Release|x64.Build.0 = Release|Any CPU + {7256B986-6705-42FC-9F57-485D72D9DE51}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {7256B986-6705-42FC-9F57-485D72D9DE51}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {7256B986-6705-42FC-9F57-485D72D9DE51}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {7256B986-6705-42FC-9F57-485D72D9DE51}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.Debug|x64.ActiveCfg = Debug|Any CPU + {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.Debug|x64.Build.0 = Debug|Any CPU + {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.Release|Any CPU.Build.0 = Release|Any CPU + {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.Release|x64.ActiveCfg = Release|Any CPU + {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.Release|x64.Build.0 = Release|Any CPU + {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {A85277B3-4E07-4E15-8F0C-07CC855A3BCB}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.Debug|x64.ActiveCfg = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.Debug|x64.Build.0 = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.Release|Any CPU.Build.0 = Release|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.Release|x64.ActiveCfg = Release|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.Release|x64.Build.0 = Release|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU + {418E79F7-9FCF-4128-AA35-1334A685377D}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU + {46278108-D247-4EFC-AC34-23D4A676F62F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {46278108-D247-4EFC-AC34-23D4A676F62F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {46278108-D247-4EFC-AC34-23D4A676F62F}.Debug|x64.ActiveCfg = Debug|Any CPU + {46278108-D247-4EFC-AC34-23D4A676F62F}.Debug|x64.Build.0 = Debug|Any CPU + {46278108-D247-4EFC-AC34-23D4A676F62F}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {46278108-D247-4EFC-AC34-23D4A676F62F}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {46278108-D247-4EFC-AC34-23D4A676F62F}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {46278108-D247-4EFC-AC34-23D4A676F62F}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {46278108-D247-4EFC-AC34-23D4A676F62F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {46278108-D247-4EFC-AC34-23D4A676F62F}.Release|Any CPU.Build.0 = Release|Any CPU + {46278108-D247-4EFC-AC34-23D4A676F62F}.Release|x64.ActiveCfg = Release|Any CPU + {46278108-D247-4EFC-AC34-23D4A676F62F}.Release|x64.Build.0 = Release|Any CPU + {46278108-D247-4EFC-AC34-23D4A676F62F}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {46278108-D247-4EFC-AC34-23D4A676F62F}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {46278108-D247-4EFC-AC34-23D4A676F62F}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {46278108-D247-4EFC-AC34-23D4A676F62F}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {7F05FD87-A2FB-4915-A988-4EF92AB82179}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7F05FD87-A2FB-4915-A988-4EF92AB82179}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7F05FD87-A2FB-4915-A988-4EF92AB82179}.Debug|x64.ActiveCfg = Debug|Any CPU + {7F05FD87-A2FB-4915-A988-4EF92AB82179}.Debug|x64.Build.0 = Debug|Any CPU + {7F05FD87-A2FB-4915-A988-4EF92AB82179}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {7F05FD87-A2FB-4915-A988-4EF92AB82179}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {7F05FD87-A2FB-4915-A988-4EF92AB82179}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {7F05FD87-A2FB-4915-A988-4EF92AB82179}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {7F05FD87-A2FB-4915-A988-4EF92AB82179}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7F05FD87-A2FB-4915-A988-4EF92AB82179}.Release|Any CPU.Build.0 = Release|Any CPU + {7F05FD87-A2FB-4915-A988-4EF92AB82179}.Release|x64.ActiveCfg = Release|Any CPU + {7F05FD87-A2FB-4915-A988-4EF92AB82179}.Release|x64.Build.0 = Release|Any CPU + {7F05FD87-A2FB-4915-A988-4EF92AB82179}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {7F05FD87-A2FB-4915-A988-4EF92AB82179}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {7F05FD87-A2FB-4915-A988-4EF92AB82179}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {7F05FD87-A2FB-4915-A988-4EF92AB82179}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {4858E5E3-23FA-4928-B99A-54065875A2B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4858E5E3-23FA-4928-B99A-54065875A2B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4858E5E3-23FA-4928-B99A-54065875A2B9}.Debug|x64.ActiveCfg = Debug|Any CPU + {4858E5E3-23FA-4928-B99A-54065875A2B9}.Debug|x64.Build.0 = Debug|Any CPU + {4858E5E3-23FA-4928-B99A-54065875A2B9}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {4858E5E3-23FA-4928-B99A-54065875A2B9}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {4858E5E3-23FA-4928-B99A-54065875A2B9}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {4858E5E3-23FA-4928-B99A-54065875A2B9}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {4858E5E3-23FA-4928-B99A-54065875A2B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4858E5E3-23FA-4928-B99A-54065875A2B9}.Release|Any CPU.Build.0 = Release|Any CPU + {4858E5E3-23FA-4928-B99A-54065875A2B9}.Release|x64.ActiveCfg = Release|Any CPU + {4858E5E3-23FA-4928-B99A-54065875A2B9}.Release|x64.Build.0 = Release|Any CPU + {4858E5E3-23FA-4928-B99A-54065875A2B9}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {4858E5E3-23FA-4928-B99A-54065875A2B9}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {4858E5E3-23FA-4928-B99A-54065875A2B9}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {4858E5E3-23FA-4928-B99A-54065875A2B9}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.Debug|x64.ActiveCfg = Debug|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.Debug|x64.Build.0 = Debug|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.Release|Any CPU.Build.0 = Release|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.Release|x64.ActiveCfg = Release|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.Release|x64.Build.0 = Release|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {1448512E-132F-4DA8-BCBA-D98F16B31600}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.Debug|x64.ActiveCfg = Debug|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.Debug|x64.Build.0 = Debug|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.Release|Any CPU.Build.0 = Release|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.Release|x64.ActiveCfg = Release|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.Release|x64.Build.0 = Release|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {55833C6C-6E91-4413-9F77-96B3A09666B8}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.Debug|x64.ActiveCfg = Debug|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.Debug|x64.Build.0 = Debug|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.Release|Any CPU.Build.0 = Release|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.Release|x64.ActiveCfg = Release|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.Release|x64.Build.0 = Release|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {E9123D45-C1B0-4462-8810-D26ED6D31944} = {03736C2E-DB2A-46A9-B7B2-C1216BDECB4F} + {058CB08D-BFA7-41E2-BE6B-0A0A72054F91} = {34D419E9-CCF1-4E48-9FA4-3AD4B86BEEB4} + {8EC46ADB-7FAA-49EA-BA63-E7B32C4F4445} = {34D419E9-CCF1-4E48-9FA4-3AD4B86BEEB4} + {72B7E75C-D305-45BD-929E-C86298AAA8DE} = {34D419E9-CCF1-4E48-9FA4-3AD4B86BEEB4} + {DD50D2D9-2765-449B-8C4B-835A428E160D} = {34D419E9-CCF1-4E48-9FA4-3AD4B86BEEB4} + {23461B29-F9DE-4F5B-BC30-50BBE1A10B48} = {34D419E9-CCF1-4E48-9FA4-3AD4B86BEEB4} + {A6C5BA7A-DF6F-476F-9106-95905932B810} = {03736C2E-DB2A-46A9-B7B2-C1216BDECB4F} + {ECFE1CE8-46A1-4D14-99D6-AAF76B704638} = {34117E2A-DEDC-4274-AAA4-3C61ACF86284} + {10D7C395-4F79-4DAF-9289-A4B8FAF6183A} = {A567C185-A429-418B-AFDE-6F1785BA4A77} + {618FBF9D-4EF3-435D-9728-81C726236668} = {A567C185-A429-418B-AFDE-6F1785BA4A77} + {48206BD6-48DD-4442-A395-3A6594E4C9C6} = {A567C185-A429-418B-AFDE-6F1785BA4A77} + {B96E97F4-2DC8-45AC-ADF5-861D0D3073FC} = {A567C185-A429-418B-AFDE-6F1785BA4A77} + {09C842CB-930C-4C7D-AD5F-E30DE4A55820} = {34D419E9-CCF1-4E48-9FA4-3AD4B86BEEB4} + {2F5796A7-4AF8-4B78-928A-0A3A80752F9D} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} + {944FE7EF-9220-4CC6-BB20-CE517195B922} = {A567C185-A429-418B-AFDE-6F1785BA4A77} + {E2F30496-19D8-46A8-9BC0-26936FFE70D2} = {A567C185-A429-418B-AFDE-6F1785BA4A77} + {7256B986-6705-42FC-9F57-485D72D9DE51} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} + {A85277B3-4E07-4E15-8F0C-07CC855A3BCB} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} + {418E79F7-9FCF-4128-AA35-1334A685377D} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} + {46278108-D247-4EFC-AC34-23D4A676F62F} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} + {7F05FD87-A2FB-4915-A988-4EF92AB82179} = {37CDC768-16D4-4574-8553-07D99D0A72F7} + {4858E5E3-23FA-4928-B99A-54065875A2B9} = {37CDC768-16D4-4574-8553-07D99D0A72F7} + {1448512E-132F-4DA8-BCBA-D98F16B31600} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} + {55833C6C-6E91-4413-9F77-96B3A09666B8} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} + {C015FF41-9A51-4AF0-AEFC-2547D596B10A} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {929C0464-86D8-4F70-8835-0A5EAF930821} + EndGlobalSection +EndGlobal diff --git a/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/ClassicallyControlledSupportTests.qs b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/ClassicallyControlledSupportTests.qs new file mode 100644 index 00000000000..7c14d01adcf --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/ClassicallyControlledSupportTests.qs @@ -0,0 +1,746 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.Honeywell.ClassicallyControlledSupportTests { + + open Microsoft.Quantum.Intrinsic; + + operation SubOp1() : Unit { } + operation SubOp2() : Unit { } + operation SubOp3() : Unit { } + + operation SubOpCA1() : Unit is Ctl + Adj { } + operation SubOpCA2() : Unit is Ctl + Adj { } + operation SubOpCA3() : Unit is Ctl + Adj { } + + operation BranchOnMeasurement() : Unit { + using (q = Qubit()) { + H(q); + let r = M(q); + if (r == Zero) { + SubOp1(); + } + Reset(q); + } + } + + operation BasicLift() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + SubOp2(); + SubOp3(); + let temp = 4; + using (q = Qubit()) { + let temp2 = q; + } + } + } + + operation LiftLoops() : Unit { + let r = Zero; + if (r == Zero) { + for (index in 0 .. 3) { + let temp = index; + } + + repeat { + let success = true; + } until (success) + fixup { + let temp2 = 0; + } + } + } + + operation LiftSingleNonCall() : Unit { + let r = Zero; + if (r == Zero) { + let temp = 2; + } + } + + operation DontLiftReturnStatements() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + return (); + } + } + + function SubFunc1() : Unit { } + function SubFunc2() : Unit { } + function SubFunc3() : Unit { } + + function DontLiftFunctions() : Unit { + let r = Zero; + if (r == Zero) { + SubFunc1(); + SubFunc2(); + SubFunc3(); + } + } + + operation LiftSelfContainedMutable() : Unit { + let r = Zero; + if (r == Zero) { + mutable temp = 3; + set temp = 4; + } + } + + operation DontLiftGeneralMutable() : Unit { + let r = Zero; + mutable temp = 3; + if (r == Zero) { + set temp = 4; + } + } + + operation PartiallyResolved<'Q, 'W> (q : 'Q, w : 'W) : Unit { } + + operation ArgumentsPartiallyResolveTypeParameters() : Unit { + let r = Zero; + if (r == Zero) { + PartiallyResolved(1, 1.0); + } + } + + operation LiftFunctorApplication() : Unit { + let r = Zero; + if (r == Zero) { + Adjoint SubOpCA1(); + } + } + + operation PartialApplication(q : Int, w : Double) : Unit { } + + operation LiftPartialApplication() : Unit { + let r = Zero; + if (r == Zero) { + (PartialApplication(1, _))(1.0); + } + } + + operation LiftArrayItemCall() : Unit { + let f = [SubOp1]; + let r = Zero; + if (r == Zero) { + f[0](); + } + } + + operation LiftOneNotBoth() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + SubOp2(); + } + else { + SubOp3(); + } + } + + operation IfInvalid() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + SubOp2(); + return (); + } else { + SubOp2(); + SubOp3(); + } + } + + operation ElseInvalid() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + SubOp2(); + } else { + SubOp2(); + SubOp3(); + return (); + } + } + + operation BothInvalid() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + SubOp2(); + return (); + } else { + SubOp2(); + SubOp3(); + return (); + } + } + + operation ApplyIfZero_Test() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + } + } + + operation ApplyIfOne_Test() : Unit { + let r = Zero; + if (r == One) { + SubOp1(); + } + } + + operation ApplyIfZeroElseOne() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation ApplyIfOneElseZero() : Unit { + let r = Zero; + if (r == One) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation IfElif() : Unit { + let r = Zero; + + if (r == Zero) { + SubOp1(); + } elif (r == One) { + SubOp2(); + } else { + SubOp3(); + } + } + + operation AndCondition() : Unit { + let r = Zero; + if (r == Zero and r == One) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation OrCondition() : Unit { + let r = Zero; + if (r == Zero or r == One) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation ApplyConditionally() : Unit { + let r1 = Zero; + let r2 = Zero; + if (r1 == r2) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation ApplyConditionallyWithNoOp() : Unit { + let r1 = Zero; + let r2 = Zero; + if (r1 == r2) { + SubOp1(); + } + } + + operation InequalityWithApplyConditionally() : Unit { + let r1 = Zero; + let r2 = Zero; + if (r1 != r2) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation InequalityWithApplyIfOneElseZero() : Unit { + let r = Zero; + if (r != Zero) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation InequalityWithApplyIfZeroElseOne() : Unit { + let r = Zero; + if (r != One) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation InequalityWithApplyIfOne() : Unit { + let r = Zero; + if (r != Zero) { + SubOp1(); + } + } + + operation InequalityWithApplyIfZero() : Unit { + let r = Zero; + if (r != One) { + SubOp1(); + } + } + + operation LiteralOnTheLeft() : Unit { + let r = Zero; + if (Zero == r) { + SubOp1(); + } + } + + // ToDo: Uncomment once #17245 is fixed. + //operation GenericsSupport<'A, 'B, 'C>() : Unit { + // let r = Zero; + // + // if (r == Zero) { + // SubOp1(); + // SubOp2(); + // } + //} + + operation WithinBlockSupport() : Unit { + let r = One; + within { + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } apply { + if (r == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation AdjointSupportProvided() : Unit is Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation AdjointSupportSelf() : Unit is Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint self; + } + + operation AdjointSupportInvert() : Unit is Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint invert; + } + + operation ControlledSupportProvided() : Unit is Ctl { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledSupportDistribute() : Unit is Ctl { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled distribute; + } + + operation ControlledAdjointSupportProvided_ProvidedBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint (ctl, ...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportProvided_ProvidedAdjoint() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint (ctl, ...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportProvided_ProvidedControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint (ctl, ...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportProvided_ProvidedAll() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + adjoint (...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + + controlled adjoint (ctl, ...) { + let b = One; + + if (b == One) { + let temp1 = 0; + let temp2 = 0; + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportDistribute_DistributeBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportDistribute_DistributeAdjoint() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportDistribute_DistributeControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportDistribute_DistributeAll() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + adjoint (...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportInvert_InvertBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportInvert_InvertAdjoint() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportInvert_InvertControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportInvert_InvertAll() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + adjoint (...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportSelf_SelfBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint self; + } + + operation ControlledAdjointSupportSelf_SelfControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint self; + } +} \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj new file mode 100644 index 00000000000..4e966759f8d --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj @@ -0,0 +1,25 @@ + + + + Library + netcoreapp3.1 + + false + false + false + true + honeywell.qpu + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/MeasurementSupportTests.qs b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/MeasurementSupportTests.qs new file mode 100644 index 00000000000..9fb25f7d64c --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/MeasurementSupportTests.qs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.Honeywell.MeasurementSupportTests { + + open Microsoft.Quantum.Intrinsic; + + operation MeasureInMiddle() : Unit { + using (qs = Qubit[2]) { + H(qs[0]); + let r1 = M(qs[0]); + H(qs[1]); + let r2 = M(qs[1]); + Reset(qs[0]); + Reset(qs[1]); + } + } + + operation QubitAfterMeasurement() : Unit { + using (q = Qubit()) { + H(q); + let r1 = M(q); + H(q); + let r2 = M(q); + Reset(q); + } + } + +} \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj new file mode 100644 index 00000000000..c9278c38294 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj @@ -0,0 +1,25 @@ + + + + Library + netcoreapp3.1 + + false + false + false + true + ionq.qpu + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/IonQExe/MeasurementSupportTests.qs b/src/Simulation/Simulators.Tests/TestProjects/IonQExe/MeasurementSupportTests.qs new file mode 100644 index 00000000000..7abecd8ec95 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/IonQExe/MeasurementSupportTests.qs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.IonQ.MeasurementSupportTests { + + open Microsoft.Quantum.Intrinsic; + + operation MeasureInMiddle() : Unit { + using (qs = Qubit[2]) { + H(qs[0]); + let r1 = M(qs[0]); + H(qs[1]); + let r2 = M(qs[1]); + Reset(qs[0]); + Reset(qs[1]); + } + } + + operation QubitAfterMeasurement() : Unit { + using (q = Qubit()) { + H(q); + let r1 = M(q); + H(q); + let r2 = M(q); + Reset(q); + } + } + +} \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/QCIExe/ClassicallyControlledSupportTests.qs b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/ClassicallyControlledSupportTests.qs new file mode 100644 index 00000000000..dd229588369 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/ClassicallyControlledSupportTests.qs @@ -0,0 +1,746 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.QCI.ClassicallyControlledSupportTests { + + open Microsoft.Quantum.Intrinsic; + + operation SubOp1() : Unit { } + operation SubOp2() : Unit { } + operation SubOp3() : Unit { } + + operation SubOpCA1() : Unit is Ctl + Adj { } + operation SubOpCA2() : Unit is Ctl + Adj { } + operation SubOpCA3() : Unit is Ctl + Adj { } + + operation BranchOnMeasurement() : Unit { + using (q = Qubit()) { + H(q); + let r = M(q); + if (r == Zero) { + SubOp1(); + } + Reset(q); + } + } + + operation BasicLift() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + SubOp2(); + SubOp3(); + let temp = 4; + using (q = Qubit()) { + let temp2 = q; + } + } + } + + operation LiftLoops() : Unit { + let r = Zero; + if (r == Zero) { + for (index in 0 .. 3) { + let temp = index; + } + + repeat { + let success = true; + } until (success) + fixup { + let temp2 = 0; + } + } + } + + operation LiftSingleNonCall() : Unit { + let r = Zero; + if (r == Zero) { + let temp = 2; + } + } + + operation DontLiftReturnStatements() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + return (); + } + } + + function SubFunc1() : Unit { } + function SubFunc2() : Unit { } + function SubFunc3() : Unit { } + + function DontLiftFunctions() : Unit { + let r = Zero; + if (r == Zero) { + SubFunc1(); + SubFunc2(); + SubFunc3(); + } + } + + operation LiftSelfContainedMutable() : Unit { + let r = Zero; + if (r == Zero) { + mutable temp = 3; + set temp = 4; + } + } + + operation DontLiftGeneralMutable() : Unit { + let r = Zero; + mutable temp = 3; + if (r == Zero) { + set temp = 4; + } + } + + operation PartiallyResolved<'Q, 'W> (q : 'Q, w : 'W) : Unit { } + + operation ArgumentsPartiallyResolveTypeParameters() : Unit { + let r = Zero; + if (r == Zero) { + PartiallyResolved(1, 1.0); + } + } + + operation LiftFunctorApplication() : Unit { + let r = Zero; + if (r == Zero) { + Adjoint SubOpCA1(); + } + } + + operation PartialApplication(q : Int, w : Double) : Unit { } + + operation LiftPartialApplication() : Unit { + let r = Zero; + if (r == Zero) { + (PartialApplication(1, _))(1.0); + } + } + + operation LiftArrayItemCall() : Unit { + let f = [SubOp1]; + let r = Zero; + if (r == Zero) { + f[0](); + } + } + + operation LiftOneNotBoth() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + SubOp2(); + } + else { + SubOp3(); + } + } + + operation IfInvalid() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + SubOp2(); + return (); + } else { + SubOp2(); + SubOp3(); + } + } + + operation ElseInvalid() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + SubOp2(); + } else { + SubOp2(); + SubOp3(); + return (); + } + } + + operation BothInvalid() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + SubOp2(); + return (); + } else { + SubOp2(); + SubOp3(); + return (); + } + } + + operation ApplyIfZero_Test() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + } + } + + operation ApplyIfOne_Test() : Unit { + let r = Zero; + if (r == One) { + SubOp1(); + } + } + + operation ApplyIfZeroElseOne() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation ApplyIfOneElseZero() : Unit { + let r = Zero; + if (r == One) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation IfElif() : Unit { + let r = Zero; + + if (r == Zero) { + SubOp1(); + } elif (r == One) { + SubOp2(); + } else { + SubOp3(); + } + } + + operation AndCondition() : Unit { + let r = Zero; + if (r == Zero and r == One) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation OrCondition() : Unit { + let r = Zero; + if (r == Zero or r == One) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation ApplyConditionally() : Unit { + let r1 = Zero; + let r2 = Zero; + if (r1 == r2) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation ApplyConditionallyWithNoOp() : Unit { + let r1 = Zero; + let r2 = Zero; + if (r1 == r2) { + SubOp1(); + } + } + + operation InequalityWithApplyConditionally() : Unit { + let r1 = Zero; + let r2 = Zero; + if (r1 != r2) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation InequalityWithApplyIfOneElseZero() : Unit { + let r = Zero; + if (r != Zero) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation InequalityWithApplyIfZeroElseOne() : Unit { + let r = Zero; + if (r != One) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation InequalityWithApplyIfOne() : Unit { + let r = Zero; + if (r != Zero) { + SubOp1(); + } + } + + operation InequalityWithApplyIfZero() : Unit { + let r = Zero; + if (r != One) { + SubOp1(); + } + } + + operation LiteralOnTheLeft() : Unit { + let r = Zero; + if (Zero == r) { + SubOp1(); + } + } + + // ToDo: Uncomment once #17245 is fixed. + //operation GenericsSupport<'A, 'B, 'C>() : Unit { + // let r = Zero; + // + // if (r == Zero) { + // SubOp1(); + // SubOp2(); + // } + //} + + operation WithinBlockSupport() : Unit { + let r = One; + within { + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } apply { + if (r == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation AdjointSupportProvided() : Unit is Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation AdjointSupportSelf() : Unit is Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint self; + } + + operation AdjointSupportInvert() : Unit is Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint invert; + } + + operation ControlledSupportProvided() : Unit is Ctl { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledSupportDistribute() : Unit is Ctl { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled distribute; + } + + operation ControlledAdjointSupportProvided_ProvidedBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint (ctl, ...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportProvided_ProvidedAdjoint() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint (ctl, ...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportProvided_ProvidedControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint (ctl, ...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportProvided_ProvidedAll() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + adjoint (...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + + controlled adjoint (ctl, ...) { + let b = One; + + if (b == One) { + let temp1 = 0; + let temp2 = 0; + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportDistribute_DistributeBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportDistribute_DistributeAdjoint() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportDistribute_DistributeControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportDistribute_DistributeAll() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + adjoint (...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportInvert_InvertBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportInvert_InvertAdjoint() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportInvert_InvertControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportInvert_InvertAll() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + adjoint (...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportSelf_SelfBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint self; + } + + operation ControlledAdjointSupportSelf_SelfControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint self; + } +} \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/QCIExe/MeasurementSupportTests.qs b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/MeasurementSupportTests.qs new file mode 100644 index 00000000000..8082db9100b --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/MeasurementSupportTests.qs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.QCI.MeasurementSupportTests { + + open Microsoft.Quantum.Intrinsic; + + operation MeasureInMiddle() : Unit { + using (qs = Qubit[2]) { + H(qs[0]); + let r1 = M(qs[0]); + H(qs[1]); + let r2 = M(qs[1]); + Reset(qs[0]); + Reset(qs[1]); + } + } + + operation QubitAfterMeasurement() : Unit { + using (q = Qubit()) { + H(q); + let r1 = M(q); + H(q); + let r2 = M(q); + Reset(q); + } + } + +} \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj new file mode 100644 index 00000000000..fb279f5a569 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj @@ -0,0 +1,25 @@ + + + + Library + netcoreapp3.1 + + false + false + false + true + qci.qpu + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/Hello.qs b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/Hello.qs index 7d0cd650d94..8e5d87f77a8 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/Hello.qs +++ b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/Hello.qs @@ -1,16 +1,16 @@ -// Used for a unit test; -// do not change the name of this namespace! -namespace Microsoft.Quantum.Library { - - open Microsoft.Quantum.Intrinsic; - - // Used for a unit test; - // do not change the name or namespace of this type! - newtype Token = Unit; - - // Used for a unit test; - // do not change the name or namespace of this callable! - operation Hello(dummy : Token) : Unit { - Message("Hello!"); - } -} +// Used for a unit test; +// do not change the name of this namespace! +namespace Microsoft.Quantum.Library { + + open Microsoft.Quantum.Intrinsic; + + // Used for a unit test; + // do not change the name or namespace of this type! + newtype Token = Unit; + + // Used for a unit test; + // do not change the name or namespace of this callable! + operation Hello(dummy : Token) : Unit { + Message("Hello!"); + } +} \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/HoneywellSimulation.qs b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/HoneywellSimulation.qs new file mode 100644 index 00000000000..c31aef77bcd --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/HoneywellSimulation.qs @@ -0,0 +1,335 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.Honeywell { + open Microsoft.Quantum.Diagnostics; + open Microsoft.Quantum.Simulation.Testing.Honeywell.ClassicallyControlledSupportTests; + open Microsoft.Quantum.Simulation.Testing.Honeywell.MeasurementSupportTests; + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation MeasureInMiddleTest() : Unit { + MeasureInMiddle(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation QubitAfterMeasurementTest() : Unit { + QubitAfterMeasurement(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation BranchOnMeasurementTest() : Unit { + BranchOnMeasurement(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation BasicLiftTest() : Unit { + BasicLift(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftLoopsTest() : Unit { + LiftLoops(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftSingleNonCallTest() : Unit { + LiftSingleNonCall(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation DontLiftReturnStatementsTest() : Unit { + DontLiftReturnStatements(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation DontLiftFunctionsTest() : Unit { + DontLiftFunctions(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftSelfContainedMutableTest() : Unit { + LiftSelfContainedMutable(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation DontLiftGeneralMutableTest() : Unit { + DontLiftGeneralMutable(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ArgumentsPartiallyResolveTypeParametersTest() : Unit { + ArgumentsPartiallyResolveTypeParameters(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftFunctorApplicationTest() : Unit { + LiftFunctorApplication(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftPartialApplicationTest() : Unit { + LiftPartialApplication(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftArrayItemCallTest() : Unit { + LiftArrayItemCall(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftOneNotBothTest() : Unit { + LiftOneNotBoth(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation IfInvalidTest() : Unit { + IfInvalid(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ElseInvalidTest() : Unit { + ElseInvalid(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation BothInvalidTest() : Unit { + BothInvalid(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyIfZeroTest() : Unit { + ApplyIfZero_Test(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyIfOneTest() : Unit { + ApplyIfOne_Test(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyIfZeroElseOneTest() : Unit { + ApplyIfZeroElseOne(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyIfOneElseZeroTest() : Unit { + ApplyIfOneElseZero(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation IfElifTest() : Unit { + IfElif(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation AndConditionTest() : Unit { + AndCondition(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation OrConditionTest() : Unit { + OrCondition(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyConditionallyTest() : Unit { + ApplyConditionally(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyConditionallyWithNoOpTest() : Unit { + ApplyConditionallyWithNoOp(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyConditionallyTest() : Unit { + InequalityWithApplyConditionally(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyIfOneElseZeroTest() : Unit { + InequalityWithApplyIfOneElseZero(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyIfZeroElseOneTest() : Unit { + InequalityWithApplyIfZeroElseOne(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyIfOneTest() : Unit { + InequalityWithApplyIfOne(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyIfZeroTest() : Unit { + InequalityWithApplyIfZero(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiteralOnTheLeftTest() : Unit { + LiteralOnTheLeft(); + } + + // ToDo: Uncomment once #17245 is fixed. + //@Test("QuantumSimulator") + //@Test("ResourcesEstimator") + //operation GenericsSupportTest() : Unit { + // GenericsSupport(); + //} + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation WithinBlockSupportTest() : Unit { + WithinBlockSupport(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation AdjointSupportProvidedTest() : Unit { + AdjointSupportProvided(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation AdjointSupportSelfTest() : Unit { + AdjointSupportSelf(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation AdjointSupportInvertTest() : Unit { + AdjointSupportInvert(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledSupportProvidedTest() : Unit { + ControlledSupportProvided(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledSupportDistributeTest() : Unit { + ControlledSupportDistribute(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportProvided_ProvidedBodyTest() : Unit { + ControlledAdjointSupportProvided_ProvidedBody(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportProvided_ProvidedAdjointTest() : Unit { + ControlledAdjointSupportProvided_ProvidedAdjoint(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportProvided_ProvidedControlledTest() : Unit { + ControlledAdjointSupportProvided_ProvidedControlled(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportProvided_ProvidedAllTest() : Unit { + ControlledAdjointSupportProvided_ProvidedAll(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportDistribute_DistributeBodyTest() : Unit { + ControlledAdjointSupportDistribute_DistributeBody(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportDistribute_DistributeAdjointTest() : Unit { + ControlledAdjointSupportDistribute_DistributeAdjoint(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportDistribute_DistributeControlledTest() : Unit { + ControlledAdjointSupportDistribute_DistributeControlled(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportDistribute_DistributeAllTest() : Unit { + ControlledAdjointSupportDistribute_DistributeAll(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportInvert_InvertBodyTest() : Unit { + ControlledAdjointSupportInvert_InvertBody(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportInvert_InvertAdjointTest() : Unit { + ControlledAdjointSupportInvert_InvertAdjoint(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportInvert_InvertControlledTest() : Unit { + ControlledAdjointSupportInvert_InvertControlled(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportInvert_InvertAllTest() : Unit { + ControlledAdjointSupportInvert_InvertAll(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportSelf_SelfBodyTest() : Unit { + ControlledAdjointSupportSelf_SelfBody(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportSelf_SelfControlledTest() : Unit { + ControlledAdjointSupportSelf_SelfControlled(); + } + +} diff --git a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/IonQSimulation.qs b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/IonQSimulation.qs new file mode 100644 index 00000000000..c64724eb9b9 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/IonQSimulation.qs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.IonQ { + open Microsoft.Quantum.Diagnostics; + open Microsoft.Quantum.Simulation.Testing.IonQ.MeasurementSupportTests; + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation MeasureInMiddleTest() : Unit { + MeasureInMiddle(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation QubitAfterMeasurementTest() : Unit { + QubitAfterMeasurement(); + } +} diff --git a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/QCISimulation.qs b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/QCISimulation.qs new file mode 100644 index 00000000000..fb3f1e89316 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/QCISimulation.qs @@ -0,0 +1,335 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.QCI { + open Microsoft.Quantum.Diagnostics; + open Microsoft.Quantum.Simulation.Testing.QCI.ClassicallyControlledSupportTests; + open Microsoft.Quantum.Simulation.Testing.QCI.MeasurementSupportTests; + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation MeasureInMiddleTest() : Unit { + MeasureInMiddle(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation QubitAfterMeasurementTest() : Unit { + QubitAfterMeasurement(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation BranchOnMeasurementTest() : Unit { + BranchOnMeasurement(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation BasicLiftTest() : Unit { + BasicLift(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftLoopsTest() : Unit { + LiftLoops(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftSingleNonCallTest() : Unit { + LiftSingleNonCall(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation DontLiftReturnStatementsTest() : Unit { + DontLiftReturnStatements(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation DontLiftFunctionsTest() : Unit { + DontLiftFunctions(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftSelfContainedMutableTest() : Unit { + LiftSelfContainedMutable(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation DontLiftGeneralMutableTest() : Unit { + DontLiftGeneralMutable(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ArgumentsPartiallyResolveTypeParametersTest() : Unit { + ArgumentsPartiallyResolveTypeParameters(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftFunctorApplicationTest() : Unit { + LiftFunctorApplication(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftPartialApplicationTest() : Unit { + LiftPartialApplication(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftArrayItemCallTest() : Unit { + LiftArrayItemCall(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftOneNotBothTest() : Unit { + LiftOneNotBoth(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation IfInvalidTest() : Unit { + IfInvalid(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ElseInvalidTest() : Unit { + ElseInvalid(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation BothInvalidTest() : Unit { + BothInvalid(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyIfZeroTest() : Unit { + ApplyIfZero_Test(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyIfOneTest() : Unit { + ApplyIfOne_Test(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyIfZeroElseOneTest() : Unit { + ApplyIfZeroElseOne(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyIfOneElseZeroTest() : Unit { + ApplyIfOneElseZero(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation IfElifTest() : Unit { + IfElif(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation AndConditionTest() : Unit { + AndCondition(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation OrConditionTest() : Unit { + OrCondition(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyConditionallyTest() : Unit { + ApplyConditionally(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyConditionallyWithNoOpTest() : Unit { + ApplyConditionallyWithNoOp(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyConditionallyTest() : Unit { + InequalityWithApplyConditionally(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyIfOneElseZeroTest() : Unit { + InequalityWithApplyIfOneElseZero(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyIfZeroElseOneTest() : Unit { + InequalityWithApplyIfZeroElseOne(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyIfOneTest() : Unit { + InequalityWithApplyIfOne(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyIfZeroTest() : Unit { + InequalityWithApplyIfZero(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiteralOnTheLeftTest() : Unit { + LiteralOnTheLeft(); + } + + // ToDo: Uncomment once #17245 is fixed. + //@Test("QuantumSimulator") + //@Test("ResourcesEstimator") + //operation GenericsSupportTest() : Unit { + // GenericsSupport(); + //} + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation WithinBlockSupportTest() : Unit { + WithinBlockSupport(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation AdjointSupportProvidedTest() : Unit { + AdjointSupportProvided(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation AdjointSupportSelfTest() : Unit { + AdjointSupportSelf(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation AdjointSupportInvertTest() : Unit { + AdjointSupportInvert(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledSupportProvidedTest() : Unit { + ControlledSupportProvided(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledSupportDistributeTest() : Unit { + ControlledSupportDistribute(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportProvided_ProvidedBodyTest() : Unit { + ControlledAdjointSupportProvided_ProvidedBody(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportProvided_ProvidedAdjointTest() : Unit { + ControlledAdjointSupportProvided_ProvidedAdjoint(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportProvided_ProvidedControlledTest() : Unit { + ControlledAdjointSupportProvided_ProvidedControlled(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportProvided_ProvidedAllTest() : Unit { + ControlledAdjointSupportProvided_ProvidedAll(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportDistribute_DistributeBodyTest() : Unit { + ControlledAdjointSupportDistribute_DistributeBody(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportDistribute_DistributeAdjointTest() : Unit { + ControlledAdjointSupportDistribute_DistributeAdjoint(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportDistribute_DistributeControlledTest() : Unit { + ControlledAdjointSupportDistribute_DistributeControlled(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportDistribute_DistributeAllTest() : Unit { + ControlledAdjointSupportDistribute_DistributeAll(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportInvert_InvertBodyTest() : Unit { + ControlledAdjointSupportInvert_InvertBody(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportInvert_InvertAdjointTest() : Unit { + ControlledAdjointSupportInvert_InvertAdjoint(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportInvert_InvertControlledTest() : Unit { + ControlledAdjointSupportInvert_InvertControlled(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportInvert_InvertAllTest() : Unit { + ControlledAdjointSupportInvert_InvertAll(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportSelf_SelfBodyTest() : Unit { + ControlledAdjointSupportSelf_SelfBody(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportSelf_SelfControlledTest() : Unit { + ControlledAdjointSupportSelf_SelfControlled(); + } + +} diff --git a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj index 5057578a2a9..cff781acc39 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj @@ -16,6 +16,9 @@ + + + diff --git a/src/Simulation/Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj b/src/Simulation/Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj index ab4bbc9e837..4396deac881 100644 --- a/src/Simulation/Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj +++ b/src/Simulation/Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj @@ -42,7 +42,7 @@ <_ExeFiles Include="$(_ExeDir)*" /> - + From edc3ad220611e10aed7a66163cad16d28d483cdd Mon Sep 17 00:00:00 2001 From: Scott Carda <55811729+ScottCarda-MS@users.noreply.github.com> Date: Wed, 8 Jul 2020 12:59:40 -0700 Subject: [PATCH 04/32] Remove negative tests from execution testing. (#300) --- .../ClassicallyControlledSupportTests.qs | 1406 ++++++++--------- .../ClassicallyControlledSupportTests.qs | 66 - .../UnitTests/HoneywellSimulation.qs | 36 - .../TestProjects/UnitTests/QCISimulation.qs | 36 - 4 files changed, 670 insertions(+), 874 deletions(-) diff --git a/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/ClassicallyControlledSupportTests.qs b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/ClassicallyControlledSupportTests.qs index 7c14d01adcf..2cd17b39207 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/ClassicallyControlledSupportTests.qs +++ b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/ClassicallyControlledSupportTests.qs @@ -1,19 +1,19 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - - -namespace Microsoft.Quantum.Simulation.Testing.Honeywell.ClassicallyControlledSupportTests { - - open Microsoft.Quantum.Intrinsic; - - operation SubOp1() : Unit { } - operation SubOp2() : Unit { } - operation SubOp3() : Unit { } - - operation SubOpCA1() : Unit is Ctl + Adj { } - operation SubOpCA2() : Unit is Ctl + Adj { } - operation SubOpCA3() : Unit is Ctl + Adj { } - +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.Honeywell.ClassicallyControlledSupportTests { + + open Microsoft.Quantum.Intrinsic; + + operation SubOp1() : Unit { } + operation SubOp2() : Unit { } + operation SubOp3() : Unit { } + + operation SubOpCA1() : Unit is Ctl + Adj { } + operation SubOpCA2() : Unit is Ctl + Adj { } + operation SubOpCA3() : Unit is Ctl + Adj { } + operation BranchOnMeasurement() : Unit { using (q = Qubit()) { H(q); @@ -23,724 +23,658 @@ namespace Microsoft.Quantum.Simulation.Testing.Honeywell.ClassicallyControlledSu } Reset(q); } - } - - operation BasicLift() : Unit { - let r = Zero; - if (r == Zero) { - SubOp1(); - SubOp2(); - SubOp3(); - let temp = 4; - using (q = Qubit()) { - let temp2 = q; - } - } - } - - operation LiftLoops() : Unit { - let r = Zero; - if (r == Zero) { - for (index in 0 .. 3) { - let temp = index; - } - - repeat { - let success = true; - } until (success) - fixup { - let temp2 = 0; - } - } - } - - operation LiftSingleNonCall() : Unit { - let r = Zero; - if (r == Zero) { - let temp = 2; - } - } - - operation DontLiftReturnStatements() : Unit { - let r = Zero; - if (r == Zero) { - SubOp1(); - return (); - } - } - - function SubFunc1() : Unit { } - function SubFunc2() : Unit { } - function SubFunc3() : Unit { } - - function DontLiftFunctions() : Unit { - let r = Zero; - if (r == Zero) { - SubFunc1(); - SubFunc2(); - SubFunc3(); - } - } - - operation LiftSelfContainedMutable() : Unit { - let r = Zero; - if (r == Zero) { - mutable temp = 3; - set temp = 4; - } - } - - operation DontLiftGeneralMutable() : Unit { - let r = Zero; - mutable temp = 3; - if (r == Zero) { - set temp = 4; - } - } - - operation PartiallyResolved<'Q, 'W> (q : 'Q, w : 'W) : Unit { } - - operation ArgumentsPartiallyResolveTypeParameters() : Unit { - let r = Zero; - if (r == Zero) { - PartiallyResolved(1, 1.0); - } - } - - operation LiftFunctorApplication() : Unit { - let r = Zero; - if (r == Zero) { - Adjoint SubOpCA1(); - } - } - - operation PartialApplication(q : Int, w : Double) : Unit { } - - operation LiftPartialApplication() : Unit { - let r = Zero; - if (r == Zero) { - (PartialApplication(1, _))(1.0); - } - } - - operation LiftArrayItemCall() : Unit { - let f = [SubOp1]; - let r = Zero; - if (r == Zero) { - f[0](); - } - } - - operation LiftOneNotBoth() : Unit { - let r = Zero; - if (r == Zero) { - SubOp1(); - SubOp2(); - } - else { - SubOp3(); - } - } - - operation IfInvalid() : Unit { - let r = Zero; - if (r == Zero) { - SubOp1(); - SubOp2(); - return (); - } else { - SubOp2(); - SubOp3(); - } - } - - operation ElseInvalid() : Unit { - let r = Zero; - if (r == Zero) { - SubOp1(); - SubOp2(); - } else { - SubOp2(); - SubOp3(); - return (); - } - } - - operation BothInvalid() : Unit { - let r = Zero; - if (r == Zero) { - SubOp1(); - SubOp2(); - return (); - } else { - SubOp2(); - SubOp3(); - return (); - } - } - - operation ApplyIfZero_Test() : Unit { - let r = Zero; - if (r == Zero) { - SubOp1(); - } - } - - operation ApplyIfOne_Test() : Unit { - let r = Zero; - if (r == One) { - SubOp1(); - } - } - - operation ApplyIfZeroElseOne() : Unit { - let r = Zero; - if (r == Zero) { - SubOp1(); - } else { - SubOp2(); - } - } - - operation ApplyIfOneElseZero() : Unit { - let r = Zero; - if (r == One) { - SubOp1(); - } else { - SubOp2(); - } - } - - operation IfElif() : Unit { - let r = Zero; - - if (r == Zero) { - SubOp1(); - } elif (r == One) { - SubOp2(); - } else { - SubOp3(); - } - } - - operation AndCondition() : Unit { - let r = Zero; - if (r == Zero and r == One) { - SubOp1(); - } else { - SubOp2(); - } - } - - operation OrCondition() : Unit { - let r = Zero; - if (r == Zero or r == One) { - SubOp1(); - } else { - SubOp2(); - } - } - - operation ApplyConditionally() : Unit { - let r1 = Zero; - let r2 = Zero; - if (r1 == r2) { - SubOp1(); - } - else { - SubOp2(); - } - } - - operation ApplyConditionallyWithNoOp() : Unit { - let r1 = Zero; - let r2 = Zero; - if (r1 == r2) { - SubOp1(); - } - } - - operation InequalityWithApplyConditionally() : Unit { - let r1 = Zero; - let r2 = Zero; - if (r1 != r2) { - SubOp1(); - } - else { - SubOp2(); - } - } - - operation InequalityWithApplyIfOneElseZero() : Unit { - let r = Zero; - if (r != Zero) { - SubOp1(); - } - else { - SubOp2(); - } - } - - operation InequalityWithApplyIfZeroElseOne() : Unit { - let r = Zero; - if (r != One) { - SubOp1(); - } - else { - SubOp2(); - } - } - - operation InequalityWithApplyIfOne() : Unit { - let r = Zero; - if (r != Zero) { - SubOp1(); - } - } - - operation InequalityWithApplyIfZero() : Unit { - let r = Zero; - if (r != One) { - SubOp1(); - } - } - - operation LiteralOnTheLeft() : Unit { - let r = Zero; - if (Zero == r) { - SubOp1(); - } - } - - // ToDo: Uncomment once #17245 is fixed. - //operation GenericsSupport<'A, 'B, 'C>() : Unit { - // let r = Zero; - // - // if (r == Zero) { - // SubOp1(); - // SubOp2(); - // } - //} - - operation WithinBlockSupport() : Unit { - let r = One; - within { - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } apply { - if (r == One) { - SubOpCA2(); - SubOpCA3(); - } - } - } - - operation AdjointSupportProvided() : Unit is Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - adjoint (...) { - let w = One; - - if (w == One) { - SubOpCA2(); - SubOpCA3(); - } - } - } - - operation AdjointSupportSelf() : Unit is Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - adjoint self; - } - - operation AdjointSupportInvert() : Unit is Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - adjoint invert; - } - - operation ControlledSupportProvided() : Unit is Ctl { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA2(); - SubOpCA3(); - } - } - } - - operation ControlledSupportDistribute() : Unit is Ctl { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled distribute; - } - - operation ControlledAdjointSupportProvided_ProvidedBody() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled adjoint (ctl, ...) { - let y = One; - - if (y == One) { - SubOpCA2(); - SubOpCA3(); - } - } - } - - operation ControlledAdjointSupportProvided_ProvidedAdjoint() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - adjoint (...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - controlled adjoint (ctl, ...) { - let y = One; - - if (y == One) { - SubOpCA2(); - SubOpCA3(); - } - } - } - - operation ControlledAdjointSupportProvided_ProvidedControlled() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - controlled adjoint (ctl, ...) { - let y = One; - - if (y == One) { - SubOpCA2(); - SubOpCA3(); - } - } - } - - operation ControlledAdjointSupportProvided_ProvidedAll() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - adjoint (...) { - let y = One; - - if (y == One) { - SubOpCA2(); - SubOpCA3(); - } - } - - controlled adjoint (ctl, ...) { - let b = One; - - if (b == One) { - let temp1 = 0; - let temp2 = 0; - SubOpCA3(); - } - } - } - - operation ControlledAdjointSupportDistribute_DistributeBody() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled adjoint distribute; - } - - operation ControlledAdjointSupportDistribute_DistributeAdjoint() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - adjoint (...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - controlled adjoint distribute; - } - - operation ControlledAdjointSupportDistribute_DistributeControlled() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - controlled adjoint distribute; - } - - operation ControlledAdjointSupportDistribute_DistributeAll() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - adjoint (...) { - let y = One; - - if (y == One) { - SubOpCA2(); - SubOpCA3(); - } - } - - controlled adjoint distribute; - } - - operation ControlledAdjointSupportInvert_InvertBody() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled adjoint invert; - } - - operation ControlledAdjointSupportInvert_InvertAdjoint() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - adjoint (...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - controlled adjoint invert; - } - - operation ControlledAdjointSupportInvert_InvertControlled() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - controlled adjoint invert; - } - - operation ControlledAdjointSupportInvert_InvertAll() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - adjoint (...) { - let y = One; - - if (y == One) { - SubOpCA2(); - SubOpCA3(); - } - } - - controlled adjoint invert; - } - - operation ControlledAdjointSupportSelf_SelfBody() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled adjoint self; - } - - operation ControlledAdjointSupportSelf_SelfControlled() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - controlled adjoint self; - } + } + + operation BasicLift() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + SubOp2(); + SubOp3(); + let temp = 4; + using (q = Qubit()) { + let temp2 = q; + } + } + } + + operation LiftLoops() : Unit { + let r = Zero; + if (r == Zero) { + for (index in 0 .. 3) { + let temp = index; + } + + repeat { + let success = true; + } until (success) + fixup { + let temp2 = 0; + } + } + } + + operation LiftSingleNonCall() : Unit { + let r = Zero; + if (r == Zero) { + let temp = 2; + } + } + + operation LiftSelfContainedMutable() : Unit { + let r = Zero; + if (r == Zero) { + mutable temp = 3; + set temp = 4; + } + } + + operation PartiallyResolved<'Q, 'W> (q : 'Q, w : 'W) : Unit { } + + operation ArgumentsPartiallyResolveTypeParameters() : Unit { + let r = Zero; + if (r == Zero) { + PartiallyResolved(1, 1.0); + } + } + + operation LiftFunctorApplication() : Unit { + let r = Zero; + if (r == Zero) { + Adjoint SubOpCA1(); + } + } + + operation PartialApplication(q : Int, w : Double) : Unit { } + + operation LiftPartialApplication() : Unit { + let r = Zero; + if (r == Zero) { + (PartialApplication(1, _))(1.0); + } + } + + operation LiftArrayItemCall() : Unit { + let f = [SubOp1]; + let r = Zero; + if (r == Zero) { + f[0](); + } + } + + operation LiftOneNotBoth() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + SubOp2(); + } + else { + SubOp3(); + } + } + + operation ApplyIfZero_Test() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + } + } + + operation ApplyIfOne_Test() : Unit { + let r = Zero; + if (r == One) { + SubOp1(); + } + } + + operation ApplyIfZeroElseOne() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation ApplyIfOneElseZero() : Unit { + let r = Zero; + if (r == One) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation IfElif() : Unit { + let r = Zero; + + if (r == Zero) { + SubOp1(); + } elif (r == One) { + SubOp2(); + } else { + SubOp3(); + } + } + + operation AndCondition() : Unit { + let r = Zero; + if (r == Zero and r == One) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation OrCondition() : Unit { + let r = Zero; + if (r == Zero or r == One) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation ApplyConditionally() : Unit { + let r1 = Zero; + let r2 = Zero; + if (r1 == r2) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation ApplyConditionallyWithNoOp() : Unit { + let r1 = Zero; + let r2 = Zero; + if (r1 == r2) { + SubOp1(); + } + } + + operation InequalityWithApplyConditionally() : Unit { + let r1 = Zero; + let r2 = Zero; + if (r1 != r2) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation InequalityWithApplyIfOneElseZero() : Unit { + let r = Zero; + if (r != Zero) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation InequalityWithApplyIfZeroElseOne() : Unit { + let r = Zero; + if (r != One) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation InequalityWithApplyIfOne() : Unit { + let r = Zero; + if (r != Zero) { + SubOp1(); + } + } + + operation InequalityWithApplyIfZero() : Unit { + let r = Zero; + if (r != One) { + SubOp1(); + } + } + + operation LiteralOnTheLeft() : Unit { + let r = Zero; + if (Zero == r) { + SubOp1(); + } + } + + // ToDo: Uncomment once #17245 is fixed. + //operation GenericsSupport<'A, 'B, 'C>() : Unit { + // let r = Zero; + // + // if (r == Zero) { + // SubOp1(); + // SubOp2(); + // } + //} + + operation WithinBlockSupport() : Unit { + let r = One; + within { + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } apply { + if (r == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation AdjointSupportProvided() : Unit is Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation AdjointSupportSelf() : Unit is Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint self; + } + + operation AdjointSupportInvert() : Unit is Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint invert; + } + + operation ControlledSupportProvided() : Unit is Ctl { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledSupportDistribute() : Unit is Ctl { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled distribute; + } + + operation ControlledAdjointSupportProvided_ProvidedBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint (ctl, ...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportProvided_ProvidedAdjoint() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint (ctl, ...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportProvided_ProvidedControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint (ctl, ...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportProvided_ProvidedAll() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + adjoint (...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + + controlled adjoint (ctl, ...) { + let b = One; + + if (b == One) { + let temp1 = 0; + let temp2 = 0; + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportDistribute_DistributeBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportDistribute_DistributeAdjoint() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportDistribute_DistributeControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportDistribute_DistributeAll() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + adjoint (...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportInvert_InvertBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportInvert_InvertAdjoint() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportInvert_InvertControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportInvert_InvertAll() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + adjoint (...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportSelf_SelfBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint self; + } + + operation ControlledAdjointSupportSelf_SelfControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint self; + } } \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/QCIExe/ClassicallyControlledSupportTests.qs b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/ClassicallyControlledSupportTests.qs index dd229588369..f6e0979ebf8 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/QCIExe/ClassicallyControlledSupportTests.qs +++ b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/ClassicallyControlledSupportTests.qs @@ -60,27 +60,6 @@ namespace Microsoft.Quantum.Simulation.Testing.QCI.ClassicallyControlledSupportT let temp = 2; } } - - operation DontLiftReturnStatements() : Unit { - let r = Zero; - if (r == Zero) { - SubOp1(); - return (); - } - } - - function SubFunc1() : Unit { } - function SubFunc2() : Unit { } - function SubFunc3() : Unit { } - - function DontLiftFunctions() : Unit { - let r = Zero; - if (r == Zero) { - SubFunc1(); - SubFunc2(); - SubFunc3(); - } - } operation LiftSelfContainedMutable() : Unit { let r = Zero; @@ -90,14 +69,6 @@ namespace Microsoft.Quantum.Simulation.Testing.QCI.ClassicallyControlledSupportT } } - operation DontLiftGeneralMutable() : Unit { - let r = Zero; - mutable temp = 3; - if (r == Zero) { - set temp = 4; - } - } - operation PartiallyResolved<'Q, 'W> (q : 'Q, w : 'W) : Unit { } operation ArgumentsPartiallyResolveTypeParameters() : Unit { @@ -141,43 +112,6 @@ namespace Microsoft.Quantum.Simulation.Testing.QCI.ClassicallyControlledSupportT SubOp3(); } } - - operation IfInvalid() : Unit { - let r = Zero; - if (r == Zero) { - SubOp1(); - SubOp2(); - return (); - } else { - SubOp2(); - SubOp3(); - } - } - - operation ElseInvalid() : Unit { - let r = Zero; - if (r == Zero) { - SubOp1(); - SubOp2(); - } else { - SubOp2(); - SubOp3(); - return (); - } - } - - operation BothInvalid() : Unit { - let r = Zero; - if (r == Zero) { - SubOp1(); - SubOp2(); - return (); - } else { - SubOp2(); - SubOp3(); - return (); - } - } operation ApplyIfZero_Test() : Unit { let r = Zero; diff --git a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/HoneywellSimulation.qs b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/HoneywellSimulation.qs index c31aef77bcd..6082ac038ad 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/HoneywellSimulation.qs +++ b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/HoneywellSimulation.qs @@ -43,30 +43,12 @@ namespace Microsoft.Quantum.Simulation.Testing.Honeywell { LiftSingleNonCall(); } - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation DontLiftReturnStatementsTest() : Unit { - DontLiftReturnStatements(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation DontLiftFunctionsTest() : Unit { - DontLiftFunctions(); - } - @Test("QuantumSimulator") @Test("ResourcesEstimator") operation LiftSelfContainedMutableTest() : Unit { LiftSelfContainedMutable(); } - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation DontLiftGeneralMutableTest() : Unit { - DontLiftGeneralMutable(); - } - @Test("QuantumSimulator") @Test("ResourcesEstimator") operation ArgumentsPartiallyResolveTypeParametersTest() : Unit { @@ -97,24 +79,6 @@ namespace Microsoft.Quantum.Simulation.Testing.Honeywell { LiftOneNotBoth(); } - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation IfInvalidTest() : Unit { - IfInvalid(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ElseInvalidTest() : Unit { - ElseInvalid(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation BothInvalidTest() : Unit { - BothInvalid(); - } - @Test("QuantumSimulator") @Test("ResourcesEstimator") operation ApplyIfZeroTest() : Unit { diff --git a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/QCISimulation.qs b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/QCISimulation.qs index fb3f1e89316..5cc75f4577f 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/QCISimulation.qs +++ b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/QCISimulation.qs @@ -43,30 +43,12 @@ namespace Microsoft.Quantum.Simulation.Testing.QCI { LiftSingleNonCall(); } - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation DontLiftReturnStatementsTest() : Unit { - DontLiftReturnStatements(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation DontLiftFunctionsTest() : Unit { - DontLiftFunctions(); - } - @Test("QuantumSimulator") @Test("ResourcesEstimator") operation LiftSelfContainedMutableTest() : Unit { LiftSelfContainedMutable(); } - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation DontLiftGeneralMutableTest() : Unit { - DontLiftGeneralMutable(); - } - @Test("QuantumSimulator") @Test("ResourcesEstimator") operation ArgumentsPartiallyResolveTypeParametersTest() : Unit { @@ -97,24 +79,6 @@ namespace Microsoft.Quantum.Simulation.Testing.QCI { LiftOneNotBoth(); } - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation IfInvalidTest() : Unit { - IfInvalid(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ElseInvalidTest() : Unit { - ElseInvalid(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation BothInvalidTest() : Unit { - BothInvalid(); - } - @Test("QuantumSimulator") @Test("ResourcesEstimator") operation ApplyIfZeroTest() : Unit { From b351b1b960dc332c00b8303e506cc1126135ed57 Mon Sep 17 00:00:00 2001 From: yusudz <67285049+yusudz@users.noreply.github.com> Date: Thu, 9 Jul 2020 09:06:21 -0700 Subject: [PATCH 05/32] Extends #257 (fixing #256) to QuantumProcessor sim (#302) * Extends #257 (fixing #256) to QuantumProcessorDispatcher sim as well * Pulled SampleDistribution method out to shared utils Co-authored-by: Yury Sudzilouski --- src/Simulation/Common/Utils.cs | 66 ++++++++++++++++++- .../QCTraceSimulator/InterfaceUtils.cs | 14 ---- .../QCTraceSimulator.Primitive.random.cs | 3 +- .../Simulators/QCTraceSimulator/Utils.cs | 50 +------------- .../Simulators/QuantumProcessor/random.cs | 34 +--------- 5 files changed, 70 insertions(+), 97 deletions(-) diff --git a/src/Simulation/Common/Utils.cs b/src/Simulation/Common/Utils.cs index 752c4048dcd..4be748429c7 100644 --- a/src/Simulation/Common/Utils.cs +++ b/src/Simulation/Common/Utils.cs @@ -2,12 +2,14 @@ // Licensed under the MIT License. using Microsoft.Quantum.Simulation.Core; +using System; using System.Collections.Generic; using System.Diagnostics; +using System.Linq; namespace Microsoft.Quantum.Simulation.Common { - public class CommonUtils + public static class CommonUtils { /// /// Removes PauliI terms from observable and corresponding qubits from qubits. @@ -25,7 +27,7 @@ public static void PruneObservable(IQArray observable, IQArray qub /// /// Returns IEnumerable<T> that contains sub-sequence of [i], such that [i] is not equal to . /// - public static IEnumerable PrunedSequence(IQArray sequence, U value, IQArray sequenceToPrune ) + public static IEnumerable PrunedSequence(IQArray sequence, U value, IQArray sequenceToPrune) { for (uint i = 0; i < sequence.Length; ++i) { @@ -63,5 +65,65 @@ public static (long, long) Reduce(long numerator, long denominatorPower) return (numNew, denomPowerNew); } + + /// + /// Takes an array of doubles as + /// input, and returns a randomly-selected index into the array + /// as an `Int`. The probability of selecting a specific index + /// is proportional to the value of the array element at that index. + /// Array elements that are equal to zero are ignored and their indices + /// are never returned.If any array element is less than zero, or if + /// no array element is greater than zero, then the operation fails. + /// As a source of randomness uses a number uniformly distributed between 0 and 1. + /// Used for Quantum.Intrinsic.Random + /// + /// Number between Zero and one, uniformly distributed + public static long SampleDistribution(IQArray unnormalizedDistribution, double uniformZeroOneSample) + { + if (unnormalizedDistribution.Any(prob => prob < 0.0)) + { + throw new ExecutionFailException("Random expects array of non-negative doubles."); + } + + var total = unnormalizedDistribution.Sum(); + if (total == 0) + { + throw new ExecutionFailException("Random expects array of non-negative doubles with positive sum."); + } + + var sample = uniformZeroOneSample * total; + + return unnormalizedDistribution + // Get the unnormalized CDF of the distribution. + .SelectAggregates((double acc, double x) => acc + x) + // Look for the first index at which the CDF is bigger + // than the random sample of 𝑈(0, 1) that we were given + // as a parameter. + .Select((cumulativeProb, idx) => (cumulativeProb, idx)) + .Where(item => item.cumulativeProb >= sample) + // Cast that index to long, and default to returning + // the last item. + .Select( + item => (long)item.idx + ) + .DefaultIfEmpty( + unnormalizedDistribution.Length - 1 + ) + .First(); + } + + internal static IEnumerable SelectAggregates( + this IEnumerable source, + Func aggregate, + TResult initial = default + ) + { + var acc = initial; + foreach (var element in source) + { + acc = aggregate(acc, element); + yield return acc; + } + } } } diff --git a/src/Simulation/Simulators/QCTraceSimulator/InterfaceUtils.cs b/src/Simulation/Simulators/QCTraceSimulator/InterfaceUtils.cs index f3beba01330..b8a4c79c1d8 100644 --- a/src/Simulation/Simulators/QCTraceSimulator/InterfaceUtils.cs +++ b/src/Simulation/Simulators/QCTraceSimulator/InterfaceUtils.cs @@ -74,19 +74,5 @@ public static partial class Extensions { return InterfaceType(t, typeof(IControllable<>)); } - - internal static IEnumerable SelectAggregates( - this IEnumerable source, - Func aggregate, - TResult initial = default - ) - { - var acc = initial; - foreach (var element in source) - { - acc = aggregate(acc, element); - yield return acc; - } - } } } \ No newline at end of file diff --git a/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.Primitive.random.cs b/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.Primitive.random.cs index 1fea9dbfeea..2a5578ed962 100644 --- a/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.Primitive.random.cs +++ b/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.Primitive.random.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using Microsoft.Quantum.Simulation.Common; using Microsoft.Quantum.Simulation.Core; using System; @@ -18,7 +19,7 @@ public TracerRandom(QCTraceSimulatorImpl m) : base(m) public override Func, Int64> Body => (p) => { - return SimulatorsUtils.SampleDistribution(p, core.random.NextDouble()); + return CommonUtils.SampleDistribution(p, core.random.NextDouble()); }; } } diff --git a/src/Simulation/Simulators/QCTraceSimulator/Utils.cs b/src/Simulation/Simulators/QCTraceSimulator/Utils.cs index 9f991e7ed0c..ddeac1ab574 100644 --- a/src/Simulation/Simulators/QCTraceSimulator/Utils.cs +++ b/src/Simulation/Simulators/QCTraceSimulator/Utils.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Microsoft.Quantum.Simulation.Common; using Microsoft.Quantum.Simulation.Core; using Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime; @@ -199,53 +200,4 @@ public static class MetricsCountersNames /// public const string widthCounter = nameof(WidthCounter); } - - static class SimulatorsUtils - { - /// - /// Takes an array of doubles as - /// input, and returns a randomly-selected index into the array - /// as an `Int`. The probability of selecting a specific index - /// is proportional to the value of the array element at that index. - /// Array elements that are equal to zero are ignored and their indices - /// are never returned.If any array element is less than zero, or if - /// no array element is greater than zero, then the operation fails. - /// As a source of randomness uses a number uniformly distributed between 0 and 1. - /// Used for Quantum.Intrinsic.Random - /// - /// Number between Zero and one, uniformly distributed - public static long SampleDistribution(IQArray unnormalizedDistribution, double uniformZeroOneSample) - { - if (unnormalizedDistribution.Any(prob => prob < 0.0)) - { - throw new ExecutionFailException("Random expects array of non-negative doubles."); - } - - var total = unnormalizedDistribution.Sum(); - if (total == 0) - { - throw new ExecutionFailException("Random expects array of non-negative doubles with positive sum."); - } - - var sample = uniformZeroOneSample * total; - - return unnormalizedDistribution - // Get the unnormalized CDF of the distribution. - .SelectAggregates((double acc, double x) => acc + x) - // Look for the first index at which the CDF is bigger - // than the random sample of 𝑈(0, 1) that we were given - // as a parameter. - .Select((cumulativeProb, idx) => (cumulativeProb, idx)) - .Where(item => item.cumulativeProb >= sample) - // Cast that index to long, and default to returning - // the last item. - .Select( - item => (long)item.idx - ) - .DefaultIfEmpty( - unnormalizedDistribution.Length - 1 - ) - .First(); - } - } } diff --git a/src/Simulation/Simulators/QuantumProcessor/random.cs b/src/Simulation/Simulators/QuantumProcessor/random.cs index d9c51cfa202..0b0452c23c8 100644 --- a/src/Simulation/Simulators/QuantumProcessor/random.cs +++ b/src/Simulation/Simulators/QuantumProcessor/random.cs @@ -3,41 +3,13 @@ using Microsoft.Quantum.Simulation.Core; using System; +using System.Linq; +using Microsoft.Quantum.Simulation.Common; namespace Microsoft.Quantum.Simulation.QuantumProcessor { public partial class QuantumProcessorDispatcher { - public static long SampleDistribution(IQArray unnormalizedDistribution, double uniformZeroOneSample) - { - double total = 0.0; - foreach (double prob in unnormalizedDistribution) - { - if (prob < 0) - { - throw new ExecutionFailException("Random expects array of non-negative doubles."); - } - total += prob; - } - - if (total == 0) - { - throw new ExecutionFailException("Random expects array of non-negative doubles with positive sum."); - } - - double sample = uniformZeroOneSample * total; - double sum = unnormalizedDistribution[0]; - for (int i = 0; i < unnormalizedDistribution.Length - 1; ++i) - { - if (sum >= sample) - { - return i; - } - sum += unnormalizedDistribution[i]; - } - return unnormalizedDistribution.Length; - } - public class QuantumProcessorDispatcherRandom : Quantum.Intrinsic.Random { private QuantumProcessorDispatcher Simulator { get; } @@ -48,7 +20,7 @@ public QuantumProcessorDispatcherRandom(QuantumProcessorDispatcher m) : base(m) public override Func, Int64> Body => (p) => { - return SampleDistribution(p, Simulator.random.NextDouble()); + return CommonUtils.SampleDistribution(p, Simulator.random.NextDouble()); }; } } From 2dd60795e3106ea2eb53c4f79fbd35efd1c52a02 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Fri, 10 Jul 2020 11:21:17 -0700 Subject: [PATCH 06/32] Include native files in Simulators project (#305) --- src/Simulation/Common/Simulators.Dev.props | 8 ------ src/Simulation/Native/bootstrap.cmd | 7 +++-- .../Microsoft.Quantum.Simulators.csproj | 26 ++++++++++++++++++- ...crosoft.Quantum.Simulators.nuspec.template | 8 +++--- 4 files changed, 33 insertions(+), 16 deletions(-) diff --git a/src/Simulation/Common/Simulators.Dev.props b/src/Simulation/Common/Simulators.Dev.props index f92092e9568..2c93b5ab65e 100644 --- a/src/Simulation/Common/Simulators.Dev.props +++ b/src/Simulation/Common/Simulators.Dev.props @@ -14,14 +14,6 @@ $(QsimDllWindowsRelease) $(QsimDllWindowsDebug) - - - - Microsoft.Quantum.Simulator.Runtime.dll - PreserveNewest - false - - diff --git a/src/Simulation/Native/bootstrap.cmd b/src/Simulation/Native/bootstrap.cmd index 59903c782db..144b1686a9f 100644 --- a/src/Simulation/Native/bootstrap.cmd +++ b/src/Simulation/Native/bootstrap.cmd @@ -12,10 +12,13 @@ SET DROP_FOLDER=%SYSTEM_DEFAULTWORKINGDIRECTORY%\xplat\src\Simulation\Native\bui DIR %DROP_FOLDER% IF NOT EXIST linux mkdir linux -IF EXIST %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.so copy %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.so linux\Microsoft.Quantum.Simulator.Runtime.dll +IF EXIST %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.so copy %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.so linux\Microsoft.Quantum.Simulator.Runtime.dll IF NOT EXIST osx mkdir osx -IF EXIST %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.dylib copy %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.dylib osx\Microsoft.Quantum.Simulator.Runtime.dll +IF EXIST %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.dylib copy %DROP_FOLDER%\libMicrosoft.Quantum.Simulator.Runtime.dylib osx\Microsoft.Quantum.Simulator.Runtime.dll + +IF NOT EXIST win10 mkdir win10 +IF EXIST %DROP_FOLDER%\Release\Microsoft.Quantum.Simulator.Runtime.dll copy %DROP_FOLDER%\Release\Microsoft.Quantum.Simulator.Runtime.dll win10\Microsoft.Quantum.Simulator.Runtime.dll IF NOT EXIST %BUILD_FOLDER% mkdir %BUILD_FOLDER% pushd %BUILD_FOLDER% diff --git a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj index 8229c9e9bc7..50eef571a8b 100644 --- a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj +++ b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj @@ -23,5 +23,29 @@ - + + + + Microsoft.Quantum.Simulator.Runtime.dll + PreserveNewest + false + + + + runtimes\win-x64\native\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + false + + + runtimes\osx-x64\native\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + false + + + runtimes\linux-x64\native\%(RecursiveDir)%(FileName)%(Extension) + PreserveNewest + false + + + diff --git a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.nuspec.template b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.nuspec.template index 756eaca2e6b..17c71ffae28 100644 --- a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.nuspec.template +++ b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.nuspec.template @@ -17,11 +17,9 @@ - - - - - + + + From ebd5a47fc422c283495091d0aec3438973242a13 Mon Sep 17 00:00:00 2001 From: Scott Carda <55811729+ScottCarda-MS@users.noreply.github.com> Date: Sat, 11 Jul 2020 13:45:31 -0700 Subject: [PATCH 07/32] Generic Parameter Bug Fix (#306) Changed the isGeneric method of the C# generation code to count the length of the type parameter list for a callable. --- .../Circuits/CodegenTests.qs | 5 + .../SimulationCodeTests.fs | 33 +- .../CsharpGeneration/SimulationCode.fs | 8 +- .../ClassicallyControlledSupportTests.qs | 1357 ++++++++--------- .../HoneywellExe/MeasurementSupportTests.qs | 58 +- .../IonQExe/MeasurementSupportTests.qs | 58 +- .../ClassicallyControlledSupportTests.qs | 1357 ++++++++--------- .../QCIExe/MeasurementSupportTests.qs | 58 +- .../UnitTests/HoneywellSimulation.qs | 15 +- .../TestProjects/UnitTests/IonQSimulation.qs | 40 +- .../TestProjects/UnitTests/QCISimulation.qs | 597 ++++---- 11 files changed, 1802 insertions(+), 1784 deletions(-) diff --git a/src/Simulation/CsharpGeneration.Tests/Circuits/CodegenTests.qs b/src/Simulation/CsharpGeneration.Tests/Circuits/CodegenTests.qs index 131e7899e01..a491fe0d43f 100644 --- a/src/Simulation/CsharpGeneration.Tests/Circuits/CodegenTests.qs +++ b/src/Simulation/CsharpGeneration.Tests/Circuits/CodegenTests.qs @@ -1262,6 +1262,11 @@ namespace Microsoft.Quantum.Compiler.Generics { genIter(genU1, a); } + operation genericWithMultipleTypeParams<'A, 'B, 'C>() : Unit { } + + operation callsGenericWithMultipleTypeParams () : Unit { + genericWithMultipleTypeParams(); + } operation composeImpl<'A, 'B> (second : ('A => Unit), first : ('B => 'A), arg : 'B) : Unit { diff --git a/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs b/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs index 90416d37e9e..de97e3aedc8 100644 --- a/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs +++ b/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs @@ -167,6 +167,7 @@ namespace N1 let genMapper = findCallable @"genMapper" let genIter = findCallable @"genIter" let usesGenerics = findCallable @"usesGenerics" + let callsGenericWithMultipleTypeParams = findCallable @"callsGenericWithMultipleTypeParams" let duplicatedDefinitionsCaller = findCallable @"duplicatedDefinitionsCaller" let nestedArgTuple1 = findCallable @"nestedArgTuple1" let nestedArgTuple2 = findCallable @"nestedArgTuple2" @@ -453,6 +454,11 @@ namespace N1 ] |> testOne usesGenerics + [ + ((NSG, "genericWithMultipleTypeParams"), "ICallable") + ] + |> testOne callsGenericWithMultipleTypeParams + [ ((NS2, "Allocate" ), "Allocate") ((NS2, "H" ), "IUnitary") @@ -897,13 +903,18 @@ namespace N1 |> testOne usesGenerics [ - template "Z" "IUnitary" "Microsoft.Quantum.Intrinsic.Z" + template "genericWithMultipleTypeParams" "ICallable" "genericWithMultipleTypeParams<,,>" + ] + |> testOne callsGenericWithMultipleTypeParams + + [ + template "Z" "IUnitary" "Microsoft.Quantum.Intrinsic.Z" "this.self = this;" ] |> testOne selfInvokingOperation [ - template "self" "ICallable" "genRecursion<>" + template "self" "ICallable" "genRecursion<>" ] |> testOne genRecursion @@ -934,6 +945,11 @@ namespace N1 |> List.sort |> testOne usesGenerics + [ + template "genericWithMultipleTypeParams<,,>" + ] + |> testOne callsGenericWithMultipleTypeParams + [ template "composeImpl<,>" ] @@ -979,6 +995,11 @@ namespace N1 ] |> testOne usesGenerics + [ + template "ICallable" "genericWithMultipleTypeParams" + ] + |> testOne callsGenericWithMultipleTypeParams + [ template "IUnitary" "Z" template "IAdjointable" "self" @@ -2502,7 +2523,7 @@ namespace N1 |> testOneClass genCtrl3 AssemblyConstants.HoneywellProcessor """ - [SourceLocation("%%%", OperationFunctor.Body, 1266, 1272)] + [SourceLocation("%%%", OperationFunctor.Body, 1271, 1277)] public partial class composeImpl<__A__, __B__> : Operation<(ICallable,ICallable,__B__), QVoid>, ICallable { public composeImpl(IOperationFactory m) : base(m) @@ -2579,7 +2600,7 @@ namespace N1 [] let ``buildOperationClass - access modifiers`` () = """ -[SourceLocation("%%%", OperationFunctor.Body, 1314, 1316)] +[SourceLocation("%%%", OperationFunctor.Body, 1319, 1321)] internal partial class EmptyInternalFunction : Function, ICallable { public EmptyInternalFunction(IOperationFactory m) : base(m) @@ -2613,7 +2634,7 @@ internal partial class EmptyInternalFunction : Function, ICallable |> testOneClass emptyInternalFunction null """ -[SourceLocation("%%%", OperationFunctor.Body, 1316, 1318)] +[SourceLocation("%%%", OperationFunctor.Body, 1321, 1323)] internal partial class EmptyInternalOperation : Operation, ICallable { public EmptyInternalOperation(IOperationFactory m) : base(m) @@ -2730,7 +2751,7 @@ internal partial class EmptyInternalOperation : Operation, ICallab [] let ``buildOperationClass - concrete functions`` () = """ - [SourceLocation("%%%", OperationFunctor.Body, 1301,1310)] + [SourceLocation("%%%", OperationFunctor.Body, 1306,1315)] public partial class UpdateUdtItems : Function, ICallable { public UpdateUdtItems(IOperationFactorym) : base(m) diff --git a/src/Simulation/CsharpGeneration/SimulationCode.fs b/src/Simulation/CsharpGeneration/SimulationCode.fs index 30e83926c90..30d8bcdd95a 100644 --- a/src/Simulation/CsharpGeneration/SimulationCode.fs +++ b/src/Simulation/CsharpGeneration/SimulationCode.fs @@ -93,9 +93,7 @@ module SimulationCode = let isGeneric context (n: QsQualifiedName) = if context.allCallables.ContainsKey n then let signature = context.allCallables.[n].Signature - let tIn = signature.ArgumentType - let tOut = signature.ReturnType - hasTypeParameters [tIn;tOut] + not signature.TypeParameters.IsEmpty else false @@ -861,9 +859,7 @@ module SimulationCode = let opName = if sameNamespace then n.Name.Value else n.Namespace.Value + "." + n.Name.Value if isGeneric context n then let signature = context.allCallables.[n].Signature - let tIn = signature.ArgumentType - let tOut = signature.ReturnType - let count = (getTypeParameters [tIn;tOut]).Length + let count = signature.TypeParameters.Length sprintf "%s<%s>" opName (String.replicate (count - 1) ",") else opName diff --git a/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/ClassicallyControlledSupportTests.qs b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/ClassicallyControlledSupportTests.qs index 2cd17b39207..34f140ee6b0 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/ClassicallyControlledSupportTests.qs +++ b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/ClassicallyControlledSupportTests.qs @@ -1,680 +1,679 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - - -namespace Microsoft.Quantum.Simulation.Testing.Honeywell.ClassicallyControlledSupportTests { - - open Microsoft.Quantum.Intrinsic; - - operation SubOp1() : Unit { } - operation SubOp2() : Unit { } - operation SubOp3() : Unit { } - - operation SubOpCA1() : Unit is Ctl + Adj { } - operation SubOpCA2() : Unit is Ctl + Adj { } - operation SubOpCA3() : Unit is Ctl + Adj { } - - operation BranchOnMeasurement() : Unit { - using (q = Qubit()) { - H(q); - let r = M(q); - if (r == Zero) { - SubOp1(); - } - Reset(q); - } - } - - operation BasicLift() : Unit { - let r = Zero; - if (r == Zero) { - SubOp1(); - SubOp2(); - SubOp3(); - let temp = 4; - using (q = Qubit()) { - let temp2 = q; - } - } - } - - operation LiftLoops() : Unit { - let r = Zero; - if (r == Zero) { - for (index in 0 .. 3) { - let temp = index; - } - - repeat { - let success = true; - } until (success) - fixup { - let temp2 = 0; - } - } - } - - operation LiftSingleNonCall() : Unit { - let r = Zero; - if (r == Zero) { - let temp = 2; - } - } - - operation LiftSelfContainedMutable() : Unit { - let r = Zero; - if (r == Zero) { - mutable temp = 3; - set temp = 4; - } - } - - operation PartiallyResolved<'Q, 'W> (q : 'Q, w : 'W) : Unit { } - - operation ArgumentsPartiallyResolveTypeParameters() : Unit { - let r = Zero; - if (r == Zero) { - PartiallyResolved(1, 1.0); - } - } - - operation LiftFunctorApplication() : Unit { - let r = Zero; - if (r == Zero) { - Adjoint SubOpCA1(); - } - } - - operation PartialApplication(q : Int, w : Double) : Unit { } - - operation LiftPartialApplication() : Unit { - let r = Zero; - if (r == Zero) { - (PartialApplication(1, _))(1.0); - } - } - - operation LiftArrayItemCall() : Unit { - let f = [SubOp1]; - let r = Zero; - if (r == Zero) { - f[0](); - } - } - - operation LiftOneNotBoth() : Unit { - let r = Zero; - if (r == Zero) { - SubOp1(); - SubOp2(); - } - else { - SubOp3(); - } - } - - operation ApplyIfZero_Test() : Unit { - let r = Zero; - if (r == Zero) { - SubOp1(); - } - } - - operation ApplyIfOne_Test() : Unit { - let r = Zero; - if (r == One) { - SubOp1(); - } - } - - operation ApplyIfZeroElseOne() : Unit { - let r = Zero; - if (r == Zero) { - SubOp1(); - } else { - SubOp2(); - } - } - - operation ApplyIfOneElseZero() : Unit { - let r = Zero; - if (r == One) { - SubOp1(); - } else { - SubOp2(); - } - } - - operation IfElif() : Unit { - let r = Zero; - - if (r == Zero) { - SubOp1(); - } elif (r == One) { - SubOp2(); - } else { - SubOp3(); - } - } - - operation AndCondition() : Unit { - let r = Zero; - if (r == Zero and r == One) { - SubOp1(); - } else { - SubOp2(); - } - } - - operation OrCondition() : Unit { - let r = Zero; - if (r == Zero or r == One) { - SubOp1(); - } else { - SubOp2(); - } - } - - operation ApplyConditionally() : Unit { - let r1 = Zero; - let r2 = Zero; - if (r1 == r2) { - SubOp1(); - } - else { - SubOp2(); - } - } - - operation ApplyConditionallyWithNoOp() : Unit { - let r1 = Zero; - let r2 = Zero; - if (r1 == r2) { - SubOp1(); - } - } - - operation InequalityWithApplyConditionally() : Unit { - let r1 = Zero; - let r2 = Zero; - if (r1 != r2) { - SubOp1(); - } - else { - SubOp2(); - } - } - - operation InequalityWithApplyIfOneElseZero() : Unit { - let r = Zero; - if (r != Zero) { - SubOp1(); - } - else { - SubOp2(); - } - } - - operation InequalityWithApplyIfZeroElseOne() : Unit { - let r = Zero; - if (r != One) { - SubOp1(); - } - else { - SubOp2(); - } - } - - operation InequalityWithApplyIfOne() : Unit { - let r = Zero; - if (r != Zero) { - SubOp1(); - } - } - - operation InequalityWithApplyIfZero() : Unit { - let r = Zero; - if (r != One) { - SubOp1(); - } - } - - operation LiteralOnTheLeft() : Unit { - let r = Zero; - if (Zero == r) { - SubOp1(); - } - } - - // ToDo: Uncomment once #17245 is fixed. - //operation GenericsSupport<'A, 'B, 'C>() : Unit { - // let r = Zero; - // - // if (r == Zero) { - // SubOp1(); - // SubOp2(); - // } - //} - - operation WithinBlockSupport() : Unit { - let r = One; - within { - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } apply { - if (r == One) { - SubOpCA2(); - SubOpCA3(); - } - } - } - - operation AdjointSupportProvided() : Unit is Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - adjoint (...) { - let w = One; - - if (w == One) { - SubOpCA2(); - SubOpCA3(); - } - } - } - - operation AdjointSupportSelf() : Unit is Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - adjoint self; - } - - operation AdjointSupportInvert() : Unit is Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - adjoint invert; - } - - operation ControlledSupportProvided() : Unit is Ctl { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA2(); - SubOpCA3(); - } - } - } - - operation ControlledSupportDistribute() : Unit is Ctl { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled distribute; - } - - operation ControlledAdjointSupportProvided_ProvidedBody() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled adjoint (ctl, ...) { - let y = One; - - if (y == One) { - SubOpCA2(); - SubOpCA3(); - } - } - } - - operation ControlledAdjointSupportProvided_ProvidedAdjoint() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - adjoint (...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - controlled adjoint (ctl, ...) { - let y = One; - - if (y == One) { - SubOpCA2(); - SubOpCA3(); - } - } - } - - operation ControlledAdjointSupportProvided_ProvidedControlled() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - controlled adjoint (ctl, ...) { - let y = One; - - if (y == One) { - SubOpCA2(); - SubOpCA3(); - } - } - } - - operation ControlledAdjointSupportProvided_ProvidedAll() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - adjoint (...) { - let y = One; - - if (y == One) { - SubOpCA2(); - SubOpCA3(); - } - } - - controlled adjoint (ctl, ...) { - let b = One; - - if (b == One) { - let temp1 = 0; - let temp2 = 0; - SubOpCA3(); - } - } - } - - operation ControlledAdjointSupportDistribute_DistributeBody() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled adjoint distribute; - } - - operation ControlledAdjointSupportDistribute_DistributeAdjoint() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - adjoint (...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - controlled adjoint distribute; - } - - operation ControlledAdjointSupportDistribute_DistributeControlled() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - controlled adjoint distribute; - } - - operation ControlledAdjointSupportDistribute_DistributeAll() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - adjoint (...) { - let y = One; - - if (y == One) { - SubOpCA2(); - SubOpCA3(); - } - } - - controlled adjoint distribute; - } - - operation ControlledAdjointSupportInvert_InvertBody() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled adjoint invert; - } - - operation ControlledAdjointSupportInvert_InvertAdjoint() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - adjoint (...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - controlled adjoint invert; - } - - operation ControlledAdjointSupportInvert_InvertControlled() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - controlled adjoint invert; - } - - operation ControlledAdjointSupportInvert_InvertAll() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - adjoint (...) { - let y = One; - - if (y == One) { - SubOpCA2(); - SubOpCA3(); - } - } - - controlled adjoint invert; - } - - operation ControlledAdjointSupportSelf_SelfBody() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled adjoint self; - } - - operation ControlledAdjointSupportSelf_SelfControlled() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - controlled adjoint self; - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.Honeywell.ClassicallyControlledSupportTests { + + open Microsoft.Quantum.Intrinsic; + + operation SubOp1() : Unit { } + operation SubOp2() : Unit { } + operation SubOp3() : Unit { } + + operation SubOpCA1() : Unit is Ctl + Adj { } + operation SubOpCA2() : Unit is Ctl + Adj { } + operation SubOpCA3() : Unit is Ctl + Adj { } + + operation BranchOnMeasurement() : Unit { + using (q = Qubit()) { + H(q); + let r = M(q); + if (r == Zero) { + SubOp1(); + } + Reset(q); + } + } + + operation BasicLift() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + SubOp2(); + SubOp3(); + let temp = 4; + using (q = Qubit()) { + let temp2 = q; + } + } + } + + operation LiftLoops() : Unit { + let r = Zero; + if (r == Zero) { + for (index in 0 .. 3) { + let temp = index; + } + + repeat { + let success = true; + } until (success) + fixup { + let temp2 = 0; + } + } + } + + operation LiftSingleNonCall() : Unit { + let r = Zero; + if (r == Zero) { + let temp = 2; + } + } + + operation LiftSelfContainedMutable() : Unit { + let r = Zero; + if (r == Zero) { + mutable temp = 3; + set temp = 4; + } + } + + operation PartiallyResolved<'Q, 'W> (q : 'Q, w : 'W) : Unit { } + + operation ArgumentsPartiallyResolveTypeParameters() : Unit { + let r = Zero; + if (r == Zero) { + PartiallyResolved(1, 1.0); + } + } + + operation LiftFunctorApplication() : Unit { + let r = Zero; + if (r == Zero) { + Adjoint SubOpCA1(); + } + } + + operation PartialApplication(q : Int, w : Double) : Unit { } + + operation LiftPartialApplication() : Unit { + let r = Zero; + if (r == Zero) { + (PartialApplication(1, _))(1.0); + } + } + + operation LiftArrayItemCall() : Unit { + let f = [SubOp1]; + let r = Zero; + if (r == Zero) { + f[0](); + } + } + + operation LiftOneNotBoth() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + SubOp2(); + } + else { + SubOp3(); + } + } + + operation ApplyIfZero_Test() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + } + } + + operation ApplyIfOne_Test() : Unit { + let r = Zero; + if (r == One) { + SubOp1(); + } + } + + operation ApplyIfZeroElseOne() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation ApplyIfOneElseZero() : Unit { + let r = Zero; + if (r == One) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation IfElif() : Unit { + let r = Zero; + + if (r == Zero) { + SubOp1(); + } elif (r == One) { + SubOp2(); + } else { + SubOp3(); + } + } + + operation AndCondition() : Unit { + let r = Zero; + if (r == Zero and r == One) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation OrCondition() : Unit { + let r = Zero; + if (r == Zero or r == One) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation ApplyConditionally() : Unit { + let r1 = Zero; + let r2 = Zero; + if (r1 == r2) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation ApplyConditionallyWithNoOp() : Unit { + let r1 = Zero; + let r2 = Zero; + if (r1 == r2) { + SubOp1(); + } + } + + operation InequalityWithApplyConditionally() : Unit { + let r1 = Zero; + let r2 = Zero; + if (r1 != r2) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation InequalityWithApplyIfOneElseZero() : Unit { + let r = Zero; + if (r != Zero) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation InequalityWithApplyIfZeroElseOne() : Unit { + let r = Zero; + if (r != One) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation InequalityWithApplyIfOne() : Unit { + let r = Zero; + if (r != Zero) { + SubOp1(); + } + } + + operation InequalityWithApplyIfZero() : Unit { + let r = Zero; + if (r != One) { + SubOp1(); + } + } + + operation LiteralOnTheLeft() : Unit { + let r = Zero; + if (Zero == r) { + SubOp1(); + } + } + + operation GenericsSupport<'A, 'B, 'C>() : Unit { + let r = Zero; + + if (r == Zero) { + SubOp1(); + SubOp2(); + } + } + + operation WithinBlockSupport() : Unit { + let r = One; + within { + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } apply { + if (r == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation AdjointSupportProvided() : Unit is Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation AdjointSupportSelf() : Unit is Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint self; + } + + operation AdjointSupportInvert() : Unit is Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint invert; + } + + operation ControlledSupportProvided() : Unit is Ctl { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledSupportDistribute() : Unit is Ctl { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled distribute; + } + + operation ControlledAdjointSupportProvided_ProvidedBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint (ctl, ...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportProvided_ProvidedAdjoint() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint (ctl, ...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportProvided_ProvidedControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint (ctl, ...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportProvided_ProvidedAll() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + adjoint (...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + + controlled adjoint (ctl, ...) { + let b = One; + + if (b == One) { + let temp1 = 0; + let temp2 = 0; + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportDistribute_DistributeBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportDistribute_DistributeAdjoint() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportDistribute_DistributeControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportDistribute_DistributeAll() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + adjoint (...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportInvert_InvertBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportInvert_InvertAdjoint() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportInvert_InvertControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportInvert_InvertAll() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + adjoint (...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportSelf_SelfBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint self; + } + + operation ControlledAdjointSupportSelf_SelfControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint self; + } } \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/MeasurementSupportTests.qs b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/MeasurementSupportTests.qs index 9fb25f7d64c..38aa57ee876 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/MeasurementSupportTests.qs +++ b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/MeasurementSupportTests.qs @@ -1,30 +1,30 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - - -namespace Microsoft.Quantum.Simulation.Testing.Honeywell.MeasurementSupportTests { - - open Microsoft.Quantum.Intrinsic; - - operation MeasureInMiddle() : Unit { - using (qs = Qubit[2]) { - H(qs[0]); - let r1 = M(qs[0]); - H(qs[1]); - let r2 = M(qs[1]); - Reset(qs[0]); - Reset(qs[1]); - } - } - - operation QubitAfterMeasurement() : Unit { - using (q = Qubit()) { - H(q); - let r1 = M(q); - H(q); - let r2 = M(q); - Reset(q); - } - } - +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.Honeywell.MeasurementSupportTests { + + open Microsoft.Quantum.Intrinsic; + + operation MeasureInMiddle() : Unit { + using (qs = Qubit[2]) { + H(qs[0]); + let r1 = M(qs[0]); + H(qs[1]); + let r2 = M(qs[1]); + Reset(qs[0]); + Reset(qs[1]); + } + } + + operation QubitAfterMeasurement() : Unit { + using (q = Qubit()) { + H(q); + let r1 = M(q); + H(q); + let r2 = M(q); + Reset(q); + } + } + } \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/IonQExe/MeasurementSupportTests.qs b/src/Simulation/Simulators.Tests/TestProjects/IonQExe/MeasurementSupportTests.qs index 7abecd8ec95..f6aa40b1a84 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/IonQExe/MeasurementSupportTests.qs +++ b/src/Simulation/Simulators.Tests/TestProjects/IonQExe/MeasurementSupportTests.qs @@ -1,30 +1,30 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - - -namespace Microsoft.Quantum.Simulation.Testing.IonQ.MeasurementSupportTests { - - open Microsoft.Quantum.Intrinsic; - - operation MeasureInMiddle() : Unit { - using (qs = Qubit[2]) { - H(qs[0]); - let r1 = M(qs[0]); - H(qs[1]); - let r2 = M(qs[1]); - Reset(qs[0]); - Reset(qs[1]); - } - } - - operation QubitAfterMeasurement() : Unit { - using (q = Qubit()) { - H(q); - let r1 = M(q); - H(q); - let r2 = M(q); - Reset(q); - } - } - +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.IonQ.MeasurementSupportTests { + + open Microsoft.Quantum.Intrinsic; + + operation MeasureInMiddle() : Unit { + using (qs = Qubit[2]) { + H(qs[0]); + let r1 = M(qs[0]); + H(qs[1]); + let r2 = M(qs[1]); + Reset(qs[0]); + Reset(qs[1]); + } + } + + operation QubitAfterMeasurement() : Unit { + using (q = Qubit()) { + H(q); + let r1 = M(q); + H(q); + let r2 = M(q); + Reset(q); + } + } + } \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/QCIExe/ClassicallyControlledSupportTests.qs b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/ClassicallyControlledSupportTests.qs index f6e0979ebf8..26a4213a328 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/QCIExe/ClassicallyControlledSupportTests.qs +++ b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/ClassicallyControlledSupportTests.qs @@ -1,680 +1,679 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - - -namespace Microsoft.Quantum.Simulation.Testing.QCI.ClassicallyControlledSupportTests { - - open Microsoft.Quantum.Intrinsic; - - operation SubOp1() : Unit { } - operation SubOp2() : Unit { } - operation SubOp3() : Unit { } - - operation SubOpCA1() : Unit is Ctl + Adj { } - operation SubOpCA2() : Unit is Ctl + Adj { } - operation SubOpCA3() : Unit is Ctl + Adj { } - - operation BranchOnMeasurement() : Unit { - using (q = Qubit()) { - H(q); - let r = M(q); - if (r == Zero) { - SubOp1(); - } - Reset(q); - } - } - - operation BasicLift() : Unit { - let r = Zero; - if (r == Zero) { - SubOp1(); - SubOp2(); - SubOp3(); - let temp = 4; - using (q = Qubit()) { - let temp2 = q; - } - } - } - - operation LiftLoops() : Unit { - let r = Zero; - if (r == Zero) { - for (index in 0 .. 3) { - let temp = index; - } - - repeat { - let success = true; - } until (success) - fixup { - let temp2 = 0; - } - } - } - - operation LiftSingleNonCall() : Unit { - let r = Zero; - if (r == Zero) { - let temp = 2; - } - } - - operation LiftSelfContainedMutable() : Unit { - let r = Zero; - if (r == Zero) { - mutable temp = 3; - set temp = 4; - } - } - - operation PartiallyResolved<'Q, 'W> (q : 'Q, w : 'W) : Unit { } - - operation ArgumentsPartiallyResolveTypeParameters() : Unit { - let r = Zero; - if (r == Zero) { - PartiallyResolved(1, 1.0); - } - } - - operation LiftFunctorApplication() : Unit { - let r = Zero; - if (r == Zero) { - Adjoint SubOpCA1(); - } - } - - operation PartialApplication(q : Int, w : Double) : Unit { } - - operation LiftPartialApplication() : Unit { - let r = Zero; - if (r == Zero) { - (PartialApplication(1, _))(1.0); - } - } - - operation LiftArrayItemCall() : Unit { - let f = [SubOp1]; - let r = Zero; - if (r == Zero) { - f[0](); - } - } - - operation LiftOneNotBoth() : Unit { - let r = Zero; - if (r == Zero) { - SubOp1(); - SubOp2(); - } - else { - SubOp3(); - } - } - - operation ApplyIfZero_Test() : Unit { - let r = Zero; - if (r == Zero) { - SubOp1(); - } - } - - operation ApplyIfOne_Test() : Unit { - let r = Zero; - if (r == One) { - SubOp1(); - } - } - - operation ApplyIfZeroElseOne() : Unit { - let r = Zero; - if (r == Zero) { - SubOp1(); - } else { - SubOp2(); - } - } - - operation ApplyIfOneElseZero() : Unit { - let r = Zero; - if (r == One) { - SubOp1(); - } else { - SubOp2(); - } - } - - operation IfElif() : Unit { - let r = Zero; - - if (r == Zero) { - SubOp1(); - } elif (r == One) { - SubOp2(); - } else { - SubOp3(); - } - } - - operation AndCondition() : Unit { - let r = Zero; - if (r == Zero and r == One) { - SubOp1(); - } else { - SubOp2(); - } - } - - operation OrCondition() : Unit { - let r = Zero; - if (r == Zero or r == One) { - SubOp1(); - } else { - SubOp2(); - } - } - - operation ApplyConditionally() : Unit { - let r1 = Zero; - let r2 = Zero; - if (r1 == r2) { - SubOp1(); - } - else { - SubOp2(); - } - } - - operation ApplyConditionallyWithNoOp() : Unit { - let r1 = Zero; - let r2 = Zero; - if (r1 == r2) { - SubOp1(); - } - } - - operation InequalityWithApplyConditionally() : Unit { - let r1 = Zero; - let r2 = Zero; - if (r1 != r2) { - SubOp1(); - } - else { - SubOp2(); - } - } - - operation InequalityWithApplyIfOneElseZero() : Unit { - let r = Zero; - if (r != Zero) { - SubOp1(); - } - else { - SubOp2(); - } - } - - operation InequalityWithApplyIfZeroElseOne() : Unit { - let r = Zero; - if (r != One) { - SubOp1(); - } - else { - SubOp2(); - } - } - - operation InequalityWithApplyIfOne() : Unit { - let r = Zero; - if (r != Zero) { - SubOp1(); - } - } - - operation InequalityWithApplyIfZero() : Unit { - let r = Zero; - if (r != One) { - SubOp1(); - } - } - - operation LiteralOnTheLeft() : Unit { - let r = Zero; - if (Zero == r) { - SubOp1(); - } - } - - // ToDo: Uncomment once #17245 is fixed. - //operation GenericsSupport<'A, 'B, 'C>() : Unit { - // let r = Zero; - // - // if (r == Zero) { - // SubOp1(); - // SubOp2(); - // } - //} - - operation WithinBlockSupport() : Unit { - let r = One; - within { - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } apply { - if (r == One) { - SubOpCA2(); - SubOpCA3(); - } - } - } - - operation AdjointSupportProvided() : Unit is Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - adjoint (...) { - let w = One; - - if (w == One) { - SubOpCA2(); - SubOpCA3(); - } - } - } - - operation AdjointSupportSelf() : Unit is Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - adjoint self; - } - - operation AdjointSupportInvert() : Unit is Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - adjoint invert; - } - - operation ControlledSupportProvided() : Unit is Ctl { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA2(); - SubOpCA3(); - } - } - } - - operation ControlledSupportDistribute() : Unit is Ctl { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled distribute; - } - - operation ControlledAdjointSupportProvided_ProvidedBody() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled adjoint (ctl, ...) { - let y = One; - - if (y == One) { - SubOpCA2(); - SubOpCA3(); - } - } - } - - operation ControlledAdjointSupportProvided_ProvidedAdjoint() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - adjoint (...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - controlled adjoint (ctl, ...) { - let y = One; - - if (y == One) { - SubOpCA2(); - SubOpCA3(); - } - } - } - - operation ControlledAdjointSupportProvided_ProvidedControlled() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - controlled adjoint (ctl, ...) { - let y = One; - - if (y == One) { - SubOpCA2(); - SubOpCA3(); - } - } - } - - operation ControlledAdjointSupportProvided_ProvidedAll() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - adjoint (...) { - let y = One; - - if (y == One) { - SubOpCA2(); - SubOpCA3(); - } - } - - controlled adjoint (ctl, ...) { - let b = One; - - if (b == One) { - let temp1 = 0; - let temp2 = 0; - SubOpCA3(); - } - } - } - - operation ControlledAdjointSupportDistribute_DistributeBody() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled adjoint distribute; - } - - operation ControlledAdjointSupportDistribute_DistributeAdjoint() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - adjoint (...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - controlled adjoint distribute; - } - - operation ControlledAdjointSupportDistribute_DistributeControlled() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - controlled adjoint distribute; - } - - operation ControlledAdjointSupportDistribute_DistributeAll() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - adjoint (...) { - let y = One; - - if (y == One) { - SubOpCA2(); - SubOpCA3(); - } - } - - controlled adjoint distribute; - } - - operation ControlledAdjointSupportInvert_InvertBody() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled adjoint invert; - } - - operation ControlledAdjointSupportInvert_InvertAdjoint() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - adjoint (...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - controlled adjoint invert; - } - - operation ControlledAdjointSupportInvert_InvertControlled() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - controlled adjoint invert; - } - - operation ControlledAdjointSupportInvert_InvertAll() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - adjoint (...) { - let y = One; - - if (y == One) { - SubOpCA2(); - SubOpCA3(); - } - } - - controlled adjoint invert; - } - - operation ControlledAdjointSupportSelf_SelfBody() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled adjoint self; - } - - operation ControlledAdjointSupportSelf_SelfControlled() : Unit is Ctl + Adj { - body (...) { - let r = Zero; - - if (r == Zero) { - SubOpCA1(); - SubOpCA2(); - } - } - - controlled (ctl, ...) { - let w = One; - - if (w == One) { - SubOpCA3(); - SubOpCA1(); - } - } - - controlled adjoint self; - } +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.QCI.ClassicallyControlledSupportTests { + + open Microsoft.Quantum.Intrinsic; + + operation SubOp1() : Unit { } + operation SubOp2() : Unit { } + operation SubOp3() : Unit { } + + operation SubOpCA1() : Unit is Ctl + Adj { } + operation SubOpCA2() : Unit is Ctl + Adj { } + operation SubOpCA3() : Unit is Ctl + Adj { } + + operation BranchOnMeasurement() : Unit { + using (q = Qubit()) { + H(q); + let r = M(q); + if (r == Zero) { + SubOp1(); + } + Reset(q); + } + } + + operation BasicLift() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + SubOp2(); + SubOp3(); + let temp = 4; + using (q = Qubit()) { + let temp2 = q; + } + } + } + + operation LiftLoops() : Unit { + let r = Zero; + if (r == Zero) { + for (index in 0 .. 3) { + let temp = index; + } + + repeat { + let success = true; + } until (success) + fixup { + let temp2 = 0; + } + } + } + + operation LiftSingleNonCall() : Unit { + let r = Zero; + if (r == Zero) { + let temp = 2; + } + } + + operation LiftSelfContainedMutable() : Unit { + let r = Zero; + if (r == Zero) { + mutable temp = 3; + set temp = 4; + } + } + + operation PartiallyResolved<'Q, 'W> (q : 'Q, w : 'W) : Unit { } + + operation ArgumentsPartiallyResolveTypeParameters() : Unit { + let r = Zero; + if (r == Zero) { + PartiallyResolved(1, 1.0); + } + } + + operation LiftFunctorApplication() : Unit { + let r = Zero; + if (r == Zero) { + Adjoint SubOpCA1(); + } + } + + operation PartialApplication(q : Int, w : Double) : Unit { } + + operation LiftPartialApplication() : Unit { + let r = Zero; + if (r == Zero) { + (PartialApplication(1, _))(1.0); + } + } + + operation LiftArrayItemCall() : Unit { + let f = [SubOp1]; + let r = Zero; + if (r == Zero) { + f[0](); + } + } + + operation LiftOneNotBoth() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + SubOp2(); + } + else { + SubOp3(); + } + } + + operation ApplyIfZero_Test() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + } + } + + operation ApplyIfOne_Test() : Unit { + let r = Zero; + if (r == One) { + SubOp1(); + } + } + + operation ApplyIfZeroElseOne() : Unit { + let r = Zero; + if (r == Zero) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation ApplyIfOneElseZero() : Unit { + let r = Zero; + if (r == One) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation IfElif() : Unit { + let r = Zero; + + if (r == Zero) { + SubOp1(); + } elif (r == One) { + SubOp2(); + } else { + SubOp3(); + } + } + + operation AndCondition() : Unit { + let r = Zero; + if (r == Zero and r == One) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation OrCondition() : Unit { + let r = Zero; + if (r == Zero or r == One) { + SubOp1(); + } else { + SubOp2(); + } + } + + operation ApplyConditionally() : Unit { + let r1 = Zero; + let r2 = Zero; + if (r1 == r2) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation ApplyConditionallyWithNoOp() : Unit { + let r1 = Zero; + let r2 = Zero; + if (r1 == r2) { + SubOp1(); + } + } + + operation InequalityWithApplyConditionally() : Unit { + let r1 = Zero; + let r2 = Zero; + if (r1 != r2) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation InequalityWithApplyIfOneElseZero() : Unit { + let r = Zero; + if (r != Zero) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation InequalityWithApplyIfZeroElseOne() : Unit { + let r = Zero; + if (r != One) { + SubOp1(); + } + else { + SubOp2(); + } + } + + operation InequalityWithApplyIfOne() : Unit { + let r = Zero; + if (r != Zero) { + SubOp1(); + } + } + + operation InequalityWithApplyIfZero() : Unit { + let r = Zero; + if (r != One) { + SubOp1(); + } + } + + operation LiteralOnTheLeft() : Unit { + let r = Zero; + if (Zero == r) { + SubOp1(); + } + } + + operation GenericsSupport<'A, 'B, 'C>() : Unit { + let r = Zero; + + if (r == Zero) { + SubOp1(); + SubOp2(); + } + } + + operation WithinBlockSupport() : Unit { + let r = One; + within { + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } apply { + if (r == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation AdjointSupportProvided() : Unit is Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation AdjointSupportSelf() : Unit is Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint self; + } + + operation AdjointSupportInvert() : Unit is Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint invert; + } + + operation ControlledSupportProvided() : Unit is Ctl { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledSupportDistribute() : Unit is Ctl { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled distribute; + } + + operation ControlledAdjointSupportProvided_ProvidedBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint (ctl, ...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportProvided_ProvidedAdjoint() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint (ctl, ...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportProvided_ProvidedControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint (ctl, ...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportProvided_ProvidedAll() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + adjoint (...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + + controlled adjoint (ctl, ...) { + let b = One; + + if (b == One) { + let temp1 = 0; + let temp2 = 0; + SubOpCA3(); + } + } + } + + operation ControlledAdjointSupportDistribute_DistributeBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportDistribute_DistributeAdjoint() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportDistribute_DistributeControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportDistribute_DistributeAll() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + adjoint (...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + + controlled adjoint distribute; + } + + operation ControlledAdjointSupportInvert_InvertBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportInvert_InvertAdjoint() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + adjoint (...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportInvert_InvertControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportInvert_InvertAll() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + adjoint (...) { + let y = One; + + if (y == One) { + SubOpCA2(); + SubOpCA3(); + } + } + + controlled adjoint invert; + } + + operation ControlledAdjointSupportSelf_SelfBody() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled adjoint self; + } + + operation ControlledAdjointSupportSelf_SelfControlled() : Unit is Ctl + Adj { + body (...) { + let r = Zero; + + if (r == Zero) { + SubOpCA1(); + SubOpCA2(); + } + } + + controlled (ctl, ...) { + let w = One; + + if (w == One) { + SubOpCA3(); + SubOpCA1(); + } + } + + controlled adjoint self; + } } \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/QCIExe/MeasurementSupportTests.qs b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/MeasurementSupportTests.qs index 8082db9100b..62b81376407 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/QCIExe/MeasurementSupportTests.qs +++ b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/MeasurementSupportTests.qs @@ -1,30 +1,30 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - - -namespace Microsoft.Quantum.Simulation.Testing.QCI.MeasurementSupportTests { - - open Microsoft.Quantum.Intrinsic; - - operation MeasureInMiddle() : Unit { - using (qs = Qubit[2]) { - H(qs[0]); - let r1 = M(qs[0]); - H(qs[1]); - let r2 = M(qs[1]); - Reset(qs[0]); - Reset(qs[1]); - } - } - - operation QubitAfterMeasurement() : Unit { - using (q = Qubit()) { - H(q); - let r1 = M(q); - H(q); - let r2 = M(q); - Reset(q); - } - } - +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.QCI.MeasurementSupportTests { + + open Microsoft.Quantum.Intrinsic; + + operation MeasureInMiddle() : Unit { + using (qs = Qubit[2]) { + H(qs[0]); + let r1 = M(qs[0]); + H(qs[1]); + let r2 = M(qs[1]); + Reset(qs[0]); + Reset(qs[1]); + } + } + + operation QubitAfterMeasurement() : Unit { + using (q = Qubit()) { + H(q); + let r1 = M(q); + H(q); + let r2 = M(q); + Reset(q); + } + } + } \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/HoneywellSimulation.qs b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/HoneywellSimulation.qs index 6082ac038ad..5325dca658a 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/HoneywellSimulation.qs +++ b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/HoneywellSimulation.qs @@ -6,13 +6,13 @@ namespace Microsoft.Quantum.Simulation.Testing.Honeywell { open Microsoft.Quantum.Diagnostics; open Microsoft.Quantum.Simulation.Testing.Honeywell.ClassicallyControlledSupportTests; open Microsoft.Quantum.Simulation.Testing.Honeywell.MeasurementSupportTests; - + @Test("QuantumSimulator") @Test("ResourcesEstimator") operation MeasureInMiddleTest() : Unit { MeasureInMiddle(); } - + @Test("QuantumSimulator") @Test("ResourcesEstimator") operation QubitAfterMeasurementTest() : Unit { @@ -169,12 +169,11 @@ namespace Microsoft.Quantum.Simulation.Testing.Honeywell { LiteralOnTheLeft(); } - // ToDo: Uncomment once #17245 is fixed. - //@Test("QuantumSimulator") - //@Test("ResourcesEstimator") - //operation GenericsSupportTest() : Unit { - // GenericsSupport(); - //} + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation GenericsSupportTest() : Unit { + GenericsSupport(); + } @Test("QuantumSimulator") @Test("ResourcesEstimator") diff --git a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/IonQSimulation.qs b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/IonQSimulation.qs index c64724eb9b9..46ae721dce1 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/IonQSimulation.qs +++ b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/IonQSimulation.qs @@ -1,20 +1,20 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - - -namespace Microsoft.Quantum.Simulation.Testing.IonQ { - open Microsoft.Quantum.Diagnostics; - open Microsoft.Quantum.Simulation.Testing.IonQ.MeasurementSupportTests; - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation MeasureInMiddleTest() : Unit { - MeasureInMiddle(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation QubitAfterMeasurementTest() : Unit { - QubitAfterMeasurement(); - } -} +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.IonQ { + open Microsoft.Quantum.Diagnostics; + open Microsoft.Quantum.Simulation.Testing.IonQ.MeasurementSupportTests; + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation MeasureInMiddleTest() : Unit { + MeasureInMiddle(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation QubitAfterMeasurementTest() : Unit { + QubitAfterMeasurement(); + } +} diff --git a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/QCISimulation.qs b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/QCISimulation.qs index 5cc75f4577f..8585758f894 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/QCISimulation.qs +++ b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/QCISimulation.qs @@ -1,299 +1,298 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - - -namespace Microsoft.Quantum.Simulation.Testing.QCI { - open Microsoft.Quantum.Diagnostics; - open Microsoft.Quantum.Simulation.Testing.QCI.ClassicallyControlledSupportTests; - open Microsoft.Quantum.Simulation.Testing.QCI.MeasurementSupportTests; - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation MeasureInMiddleTest() : Unit { - MeasureInMiddle(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation QubitAfterMeasurementTest() : Unit { - QubitAfterMeasurement(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation BranchOnMeasurementTest() : Unit { - BranchOnMeasurement(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation BasicLiftTest() : Unit { - BasicLift(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation LiftLoopsTest() : Unit { - LiftLoops(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation LiftSingleNonCallTest() : Unit { - LiftSingleNonCall(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation LiftSelfContainedMutableTest() : Unit { - LiftSelfContainedMutable(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ArgumentsPartiallyResolveTypeParametersTest() : Unit { - ArgumentsPartiallyResolveTypeParameters(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation LiftFunctorApplicationTest() : Unit { - LiftFunctorApplication(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation LiftPartialApplicationTest() : Unit { - LiftPartialApplication(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation LiftArrayItemCallTest() : Unit { - LiftArrayItemCall(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation LiftOneNotBothTest() : Unit { - LiftOneNotBoth(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ApplyIfZeroTest() : Unit { - ApplyIfZero_Test(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ApplyIfOneTest() : Unit { - ApplyIfOne_Test(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ApplyIfZeroElseOneTest() : Unit { - ApplyIfZeroElseOne(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ApplyIfOneElseZeroTest() : Unit { - ApplyIfOneElseZero(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation IfElifTest() : Unit { - IfElif(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation AndConditionTest() : Unit { - AndCondition(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation OrConditionTest() : Unit { - OrCondition(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ApplyConditionallyTest() : Unit { - ApplyConditionally(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ApplyConditionallyWithNoOpTest() : Unit { - ApplyConditionallyWithNoOp(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation InequalityWithApplyConditionallyTest() : Unit { - InequalityWithApplyConditionally(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation InequalityWithApplyIfOneElseZeroTest() : Unit { - InequalityWithApplyIfOneElseZero(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation InequalityWithApplyIfZeroElseOneTest() : Unit { - InequalityWithApplyIfZeroElseOne(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation InequalityWithApplyIfOneTest() : Unit { - InequalityWithApplyIfOne(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation InequalityWithApplyIfZeroTest() : Unit { - InequalityWithApplyIfZero(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation LiteralOnTheLeftTest() : Unit { - LiteralOnTheLeft(); - } - - // ToDo: Uncomment once #17245 is fixed. - //@Test("QuantumSimulator") - //@Test("ResourcesEstimator") - //operation GenericsSupportTest() : Unit { - // GenericsSupport(); - //} - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation WithinBlockSupportTest() : Unit { - WithinBlockSupport(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation AdjointSupportProvidedTest() : Unit { - AdjointSupportProvided(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation AdjointSupportSelfTest() : Unit { - AdjointSupportSelf(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation AdjointSupportInvertTest() : Unit { - AdjointSupportInvert(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ControlledSupportProvidedTest() : Unit { - ControlledSupportProvided(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ControlledSupportDistributeTest() : Unit { - ControlledSupportDistribute(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ControlledAdjointSupportProvided_ProvidedBodyTest() : Unit { - ControlledAdjointSupportProvided_ProvidedBody(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ControlledAdjointSupportProvided_ProvidedAdjointTest() : Unit { - ControlledAdjointSupportProvided_ProvidedAdjoint(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ControlledAdjointSupportProvided_ProvidedControlledTest() : Unit { - ControlledAdjointSupportProvided_ProvidedControlled(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ControlledAdjointSupportProvided_ProvidedAllTest() : Unit { - ControlledAdjointSupportProvided_ProvidedAll(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ControlledAdjointSupportDistribute_DistributeBodyTest() : Unit { - ControlledAdjointSupportDistribute_DistributeBody(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ControlledAdjointSupportDistribute_DistributeAdjointTest() : Unit { - ControlledAdjointSupportDistribute_DistributeAdjoint(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ControlledAdjointSupportDistribute_DistributeControlledTest() : Unit { - ControlledAdjointSupportDistribute_DistributeControlled(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ControlledAdjointSupportDistribute_DistributeAllTest() : Unit { - ControlledAdjointSupportDistribute_DistributeAll(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ControlledAdjointSupportInvert_InvertBodyTest() : Unit { - ControlledAdjointSupportInvert_InvertBody(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ControlledAdjointSupportInvert_InvertAdjointTest() : Unit { - ControlledAdjointSupportInvert_InvertAdjoint(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ControlledAdjointSupportInvert_InvertControlledTest() : Unit { - ControlledAdjointSupportInvert_InvertControlled(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ControlledAdjointSupportInvert_InvertAllTest() : Unit { - ControlledAdjointSupportInvert_InvertAll(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ControlledAdjointSupportSelf_SelfBodyTest() : Unit { - ControlledAdjointSupportSelf_SelfBody(); - } - - @Test("QuantumSimulator") - @Test("ResourcesEstimator") - operation ControlledAdjointSupportSelf_SelfControlledTest() : Unit { - ControlledAdjointSupportSelf_SelfControlled(); - } - -} +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + + +namespace Microsoft.Quantum.Simulation.Testing.QCI { + open Microsoft.Quantum.Diagnostics; + open Microsoft.Quantum.Simulation.Testing.QCI.ClassicallyControlledSupportTests; + open Microsoft.Quantum.Simulation.Testing.QCI.MeasurementSupportTests; + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation MeasureInMiddleTest() : Unit { + MeasureInMiddle(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation QubitAfterMeasurementTest() : Unit { + QubitAfterMeasurement(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation BranchOnMeasurementTest() : Unit { + BranchOnMeasurement(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation BasicLiftTest() : Unit { + BasicLift(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftLoopsTest() : Unit { + LiftLoops(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftSingleNonCallTest() : Unit { + LiftSingleNonCall(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftSelfContainedMutableTest() : Unit { + LiftSelfContainedMutable(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ArgumentsPartiallyResolveTypeParametersTest() : Unit { + ArgumentsPartiallyResolveTypeParameters(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftFunctorApplicationTest() : Unit { + LiftFunctorApplication(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftPartialApplicationTest() : Unit { + LiftPartialApplication(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftArrayItemCallTest() : Unit { + LiftArrayItemCall(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiftOneNotBothTest() : Unit { + LiftOneNotBoth(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyIfZeroTest() : Unit { + ApplyIfZero_Test(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyIfOneTest() : Unit { + ApplyIfOne_Test(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyIfZeroElseOneTest() : Unit { + ApplyIfZeroElseOne(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyIfOneElseZeroTest() : Unit { + ApplyIfOneElseZero(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation IfElifTest() : Unit { + IfElif(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation AndConditionTest() : Unit { + AndCondition(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation OrConditionTest() : Unit { + OrCondition(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyConditionallyTest() : Unit { + ApplyConditionally(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ApplyConditionallyWithNoOpTest() : Unit { + ApplyConditionallyWithNoOp(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyConditionallyTest() : Unit { + InequalityWithApplyConditionally(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyIfOneElseZeroTest() : Unit { + InequalityWithApplyIfOneElseZero(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyIfZeroElseOneTest() : Unit { + InequalityWithApplyIfZeroElseOne(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyIfOneTest() : Unit { + InequalityWithApplyIfOne(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation InequalityWithApplyIfZeroTest() : Unit { + InequalityWithApplyIfZero(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation LiteralOnTheLeftTest() : Unit { + LiteralOnTheLeft(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation GenericsSupportTest() : Unit { + GenericsSupport(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation WithinBlockSupportTest() : Unit { + WithinBlockSupport(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation AdjointSupportProvidedTest() : Unit { + AdjointSupportProvided(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation AdjointSupportSelfTest() : Unit { + AdjointSupportSelf(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation AdjointSupportInvertTest() : Unit { + AdjointSupportInvert(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledSupportProvidedTest() : Unit { + ControlledSupportProvided(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledSupportDistributeTest() : Unit { + ControlledSupportDistribute(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportProvided_ProvidedBodyTest() : Unit { + ControlledAdjointSupportProvided_ProvidedBody(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportProvided_ProvidedAdjointTest() : Unit { + ControlledAdjointSupportProvided_ProvidedAdjoint(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportProvided_ProvidedControlledTest() : Unit { + ControlledAdjointSupportProvided_ProvidedControlled(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportProvided_ProvidedAllTest() : Unit { + ControlledAdjointSupportProvided_ProvidedAll(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportDistribute_DistributeBodyTest() : Unit { + ControlledAdjointSupportDistribute_DistributeBody(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportDistribute_DistributeAdjointTest() : Unit { + ControlledAdjointSupportDistribute_DistributeAdjoint(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportDistribute_DistributeControlledTest() : Unit { + ControlledAdjointSupportDistribute_DistributeControlled(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportDistribute_DistributeAllTest() : Unit { + ControlledAdjointSupportDistribute_DistributeAll(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportInvert_InvertBodyTest() : Unit { + ControlledAdjointSupportInvert_InvertBody(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportInvert_InvertAdjointTest() : Unit { + ControlledAdjointSupportInvert_InvertAdjoint(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportInvert_InvertControlledTest() : Unit { + ControlledAdjointSupportInvert_InvertControlled(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportInvert_InvertAllTest() : Unit { + ControlledAdjointSupportInvert_InvertAll(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportSelf_SelfBodyTest() : Unit { + ControlledAdjointSupportSelf_SelfBody(); + } + + @Test("QuantumSimulator") + @Test("ResourcesEstimator") + operation ControlledAdjointSupportSelf_SelfControlledTest() : Unit { + ControlledAdjointSupportSelf_SelfControlled(); + } + +} From a2064f723be577928245a5fc1539ff067b038a5f Mon Sep 17 00:00:00 2001 From: "Stefan J. Wernli" Date: Tue, 14 Jul 2020 22:28:32 -0700 Subject: [PATCH 08/32] Update to C++17 (#310) --- src/Simulation/Native/CMakeLists.txt | 2 +- src/Simulation/Native/src/SafeInt.hpp | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/Simulation/Native/CMakeLists.txt b/src/Simulation/Native/CMakeLists.txt index 0d5e14a053c..b9c22c575f7 100644 --- a/src/Simulation/Native/CMakeLists.txt +++ b/src/Simulation/Native/CMakeLists.txt @@ -19,7 +19,7 @@ set(MICROSOFT_QUANTUM_SIMULATOR_VERSION $ENV{ASSEMBLY_VERSION}) set(MICROSOFT_QUANTUM_VERSION_STRING "quarcsw simulator version ${MICROSOFT_QUANTUM_SIMULATOR_VERSION}") MESSAGE(STATUS "QUARCSW version: ${MICROSOFT_QUANTUM_SIMULATOR_VERSION}") -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS) diff --git a/src/Simulation/Native/src/SafeInt.hpp b/src/Simulation/Native/src/SafeInt.hpp index 2c379727044..a2809449911 100644 --- a/src/Simulation/Native/src/SafeInt.hpp +++ b/src/Simulation/Native/src/SafeInt.hpp @@ -47,8 +47,10 @@ Please read the leading comments before using the class. #define CPLUSPLUS_STD CPLUSPLUS_98 #elif __cplusplus < 201402L #define CPLUSPLUS_STD CPLUSPLUS_11 -#else +#elif __cplusplus < 201703L #define CPLUSPLUS_STD CPLUSPLUS_14 +#else +#define CPLUSPLUS_STD CPLUSPLUS_17 #endif #elif SAFEINT_COMPILER == VISUAL_STUDIO_COMPILER @@ -60,10 +62,13 @@ Please read the leading comments before using the class. #elif _MSC_VER < 1910 // VS 2015 #define CPLUSPLUS_STD CPLUSPLUS_11 -#else // VS 2017 or later +#elif _MSC_VER < 1926 // VS 2017 +#define CPLUSPLUS_STD CPLUSPLUS_14 + +#else // VS 2019 or later // Note - there is a __cpp_constexpr test now, but everything prior to VS 2017 reports incorrect values // and this version always supports at least the CPLUSPLUS_14 approach -#define CPLUSPLUS_STD CPLUSPLUS_14 +#define CPLUSPLUS_STD CPLUSPLUS_17 #endif @@ -72,8 +77,8 @@ Please read the leading comments before using the class. #define CPLUSPLUS_STD CPLUSPLUS_98 #endif // Determine C++ support level -#if (SAFEINT_COMPILER == CLANG_COMPILER || SAFEINT_COMPILER == GCC_COMPILER) && CPLUSPLUS_STD < CPLUSPLUS_11 -#error Must compile with --std=c++11, preferably --std=c++14 to use constexpr improvements +#if (SAFEINT_COMPILER == CLANG_COMPILER || SAFEINT_COMPILER == GCC_COMPILER) && CPLUSPLUS_STD < CPLUSPLUS_17 +#error Must compile with --std=c++17 #endif #define CONSTEXPR_NONE 0 From 8342993018a31b2afab50bed67ab69cd36e715ad Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza <43434922+ricardo-espinoza@users.noreply.github.com> Date: Wed, 15 Jul 2020 10:29:34 -0700 Subject: [PATCH 09/32] Replacing deprecated IconUrl with Icon and updating the assets for NuGet packages. (#311) This change includes the following: - NuGet version is updated to 5.6 and the .Net Core SDK to 3.1.300. - The deprecated NuGet property IconUrl is replaced by an embedded icon in the packages themselves. - The asset used as an icon for the packages is a newly created graphic. --- build/assets/qdk-nuget-icon.png | Bin 0 -> 5717 bytes build/steps-init.yml | 8 ++++---- .../Microsoft.Azure.Quantum.Client.csproj | 6 +++++- .../Microsoft.Quantum.Development.Kit.nuspec | 5 +++-- .../Core/Microsoft.Quantum.Runtime.Core.csproj | 6 +++++- ...soft.Quantum.CsharpGeneration.nuspec.template | 5 +++-- .../Microsoft.Quantum.EntryPointDriver.csproj | 6 +++++- .../Microsoft.Quantum.QSharp.Core.csproj | 6 +++++- .../Microsoft.Quantum.Simulators.nuspec.template | 5 +++-- src/Xunit/Microsoft.Quantum.Xunit.nuspec | 8 ++++++-- 10 files changed, 39 insertions(+), 16 deletions(-) create mode 100644 build/assets/qdk-nuget-icon.png diff --git a/build/assets/qdk-nuget-icon.png b/build/assets/qdk-nuget-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ca63d20e32ed90b44af09c7284dfcda94f9c30a8 GIT binary patch literal 5717 zcmV-b7OLrqP)rvF?NS#=6uMq)|AA0at_>K=j_sj} zRM*AIfGZp16$~_OUe!N3s91@m8ivZP5*3M|Qq)%~RR#${+&12cTU#|=nF%FQF>!e$ z?o?KT8JmWP%81#n1#9D7sq^X`53&dl!mlPt_E`|f*l&pY@0{7&ZDwQKY# z<}N-no1a_=kt3o(A}R+#(CC6&>N?Cy4IqS=+H@j%7$3b$M8zNo${oJ7u0zjkdKe)@ zzYwBCL}!VppNQ5C4Gn#ph^j>NJt0I@2qC)QR=WnXMgW8m1tO{wQJ#pl1wkN!AgJDY z>#gHK5b$T~@J~+(A<8T)9lqtRz>F6FAw*UP!5hDii1_UvY^Lg27=j?kvTzU)|5+D8 z6gzX*-Gdn`0DR61Au2?46mR~rAP9=Bj6Dd4fUxXl;b9?a-<@|CW}FuQ)y?XDH;lV= z{C4YH142^dqX2?%R0#27K0bmVsJpxS?!%1I078g7-gXv%9YGKb>TbRY-s~U;nP&AP@VXVC(wbjII^{ob$(V&Obmzd)cCQ z71V)!Ft~8x!VwsivmRY30PyE|Gya=5zQ4bp)&5@+(N32}oA3LBp66AbeDcXz9U)cG zbpjxS_#+}ZM?_nR=$Axv_ohvo4zPvKmOj6zFxsk!_@##L`~AM}mvFokJ-T-1kC76>#JuryGFjA70T4p?MDz!^kDn0Hkd7bDo&aoxB4Ygo z2v6i&%;!8do&_)GdET7z`@`sn00<%06VdmHXaNyjAfm4YLGUjo*Mg=fAPH24eefd) z!u00yIgj`OyLtJ!rs|{6Rsn#~#xB;KM0Ayio(_UwuZ?SCv$OCJ%CHai3=Iv<^L;-L zEm873&x+wVThKNEz{VWKUt6B@rhxkA_(8F!r)THz@bG6>tXOek)v8s_&v`s!5xIt< z&0v))I2V9$amM41KmNT%ix%C3FUg4-hCe@e<;s;{WMpK~$&)7^IC=79#rOSUn$U3+ z@Ql3iTl@O@-W?qsWp{EPLf5f2NvGk=4MZ@fh~kVvnU8<=*=M)o94`94Uxra;4ZO+l z=PNsQ?D+Cyk3DvnV+pwaQPcuhTNBS1AjQ04^XAQE)E{unqJcFlHrKQXCj!taY2$ew z``lT%QM_p|(v0Eze$MxO88gUoL{DBT_ykiMgpCT))&g+7A>tMVcokfLqOMuTn(LtL z*d{4m9*ha;@}JZT7|Ku1>g6D@B1uVIkvx6h7ebWfJ76&{d*uR0bY=W#nDuM*LZQJj(3zvfLtD7FM4D6p1@ z`yFVE5{{Q*QnxNt3&2`n7_|TeHR{;p8RdFg@r+t^2rMLURZECj~Bp_uh08)YxQ7a)?lNxxFv(N;5EKCa&grkiAthjYbSUHbP$xHh{i7DI; z6<)I8xqx&qDZT`q5OY4 z){FYPRj^R`zTX%f9UVJ-`0y9n@O(GG*b7*^c<~CBUUt2pnymsyKmd30JD%r#8AlGg zjit11V;G9-%75;_kJmvfIC0_ldxNdh-`CgoMVr@73S$A_H{bKTg6*IVzLWr}kfcIN55G5P@<#B6BdlDKf)`~U zKz#=gfITLC1xko_1CFU6&OV4c(z*dovVnLDZwl(DUkcuaI?lk<=O2V;P}cZC15E{N zlr-(bwo=h>;VOt36lDCs^E~;CGotdyX*xI@)S*wl80l}f4EGwYS;87qVda-!et9X> zJ)iS;$Ax=M5DxJkK79CGtyUXcv0{Zlq|zud+Ag%EDj09#zv8d!@x@r*d}X}`-uPS3 zojZ5unl)>F;(1=)_U22lHsKU-Hk;i&fByU>$BrG_3ir6{%g&q&fRd&i$49GSyj5-2 z0?_pu{~|QbPX27ws#SY!rJW~KJZj^Rz7p&U=Nqt>>F65@MAedUnNo)L(b}l1+Fy+ge z9!1bHIkLEf^Jm+LTTDWQMxoi9TQ7C%0o%&i9mbEva^;R3^qFlPo#vf za?`YPCtyVY(xz#3gE~s^C}(PEH%mLqV=7`zsnY8vZe3K`xzm-ysRTf77&3L)w7xEW zKMR4XN_Q@_W*(bgu@O;IG*AKB;D%_V?eHzz2cWhopmMl?W1%A+gRubM40O_EqXc!N zHD7lTJW|$c$b=S-g(*#7a-=0e$UacR%58_S0314WXlQI~EbG#sVU>LU{rCTGCX?Cs z(MKPx@9XQ^H!?Evw8Qo42w@ixHQdC1dY<>Li}hqTQ#PAjf91-RgCBnQp)51EQhAgF zrf%T6v9YnwxGZ&+)wh=~U;fU51q=S`>eZ{yz5o9E&Iuymy2|VSfFp<|)yf)c<~MEH z^xU>>+vHJaE$y5HMgrg}PfjvFkVMInf&+itc91&^i)BH)$^7lkh}cm!d~ zDh8;ut2pf(xTdg66$pX_Ywd=i{_6NrxcWA$8b>agEuw-)5=!Aq4t7E%O$4)9@JO|1 z5LParo2lWVn@L6LNT71V#;s5a+vjej%OF(mxqnPNili!2Ip-^gA;i9ct$;H-i?~I#nSG$swwB;Iix76J%;!$$1vF`= zdKhY38a#=3eNfzyD66J4TgbI{d!DyV2_7ZA&b1&2GD-ezC`u?((b~bIq-)wNaB-Rr zmU(i#o$@H)bm`$JR&NVyPHUh{Ci7?f*;{YDwIyU}TSchbc{>Eb8S9wJeBRU3^OfG- z-d~ws%XvM3LY}Y^A2IjeX0=4jHdx*BIsL>FPy8oe`uOqV>)3jCIV?iSNdAofiqNvN z6tH~8EnBu+nwXfFXL_A>5kv@OV8a((=E+q{`hL{R%z#$HDfD}(jv70D0T6v2qJXyox+UDlW*9tVd@KNH$jAr%A;mb(#|&(zUUljHee(GAc$CtbKW|= zNtpF>czF1$Z@>NaBWu>Id4K-=`Kc?9BG!}|s3-{{-h1!8pAHNR9CX#o7wTsE89uJG zvvJgzAmY(SA3ZZLFi>?Vp-{Eu)2B~=9J_r37K3u|9_ z<&`^OzzxpUVN%9%fPsO5)p2p~v{2KuD_5@k_T=Q`QkQvhB~4pexNzY&@v&2mKP4l{ zYX7(Jv6ZxQQluq_kOi8OAR_e_6e^UMPSd)~lQ&7zR>?gacjI|w3#qW)BZ2&*w|ib(ok&A`QQsAjywOb~JQ?AgyPTej>zR|FAiSh-Xx{XEUJ z+A=W&H@uvPz5#-W-**}4;GoXVojd>I{Q2|$P^;DYo`3%N-!FI;DZOZ{Pll z^XJb$`|7K&ejP!ws?-R!!Gg@`^h_pmdv9;=xasAc3qZ)yCJ;o##=%prH)Uzxb=O^a z{;yW69i5z<{HeISl|sR*w+O%TzP)yrVbmX@~d z_G|-!2xARola@aW+XNBXWQYo@mnlJnmZcp|`sfaJN*X*;)=O3R63)8XW@fiZ5Mexq zRUwE_{oJA}f(R4V&$L_!y5nw9z*fn(?)UZi)O$P)K zvAn}+N7Lw{TL~g=h=YS5!fNnHg)(eXzMWHnB3JyrF&c=J<`U!4G&(Tq4B`%!+itt< z?TZ&LKBA+Rbh>RMeBZwvt>XN9PkWyCUEO=tS(D$u1q&AZU~Fvccl!JLxrf24R;!8U z8tZg1DQmL8{WV@le(SdeLEwaxA`D}Kh>I65&T~Br4;})4A;-{kI%F&D9I+m|j^(GG zdTOfCqS0vlqS0vlv#a)Or8$->kY1J_^E1y`f(Qyt(vY3T=*rE?yuIY{v9z8_5K+Q9 zWP8}8L{xJuejIK9oe=~P6&p94Bu#6Yc8*yyma^W)ut^nA_i{81pYtL_f)SN=cB1uC zyMZ=l;ptl1P0Fhax?yD<)-lszlPc8kEfKYh11M={Yu!xEU@Z`2Itwq2r5!4-t|V!{ zN|UCIOFKtxX4*M!KgY^`!t$0$Aa_7 zlmw%wjNBidDFhMWmNDksTc!k$5~*z+*D8FR_`ZMC^Slj8mrbI9RvKgtH_RY<=%I(I z$BrGVD#4`0`36mbh{VT99Gs?uo2X2B?X}l_zH;Tt&AWE(O6*(fAjCWTPx#d#S6w#Y zqz?~^fWTWBO%t)^bYd%$$^1=EPY>50%s07KTM9yyN}X$G&YYPzbLPy!7hinQ8BwyL z1wOz>t5Kq+JyLSDtas*kQjH0rR&6_vx!8F%uiw00(Gf%Ff zRpV%Qm{i)D#DoM9S{_P*HJj!`J9$+eHxJWa4PY z1VBPJPcC6Pag4a;>r6&*!G+Ka zT_XS#lP3=mL>N~dMWNX+Dfv%bP_)ENMzKAGr4_nL03?)3ovAPWrI%iML?MW9;?Jwy zOqVWQnzE{V-{+=_AG)Gwi6Drmx+t=VLRSia1ipmwi4!Mwo<4p0H*2-pJeLF!i0biM zx%`$}Zn;E6Oh`el)UN{d`fVkm=tLYK5!5v8+O=!!NXQBcy(b=|OX zsPaf8*-X&z6kYNTcT@wUB}3G$)Um~FsMF14W8Pufakp{khyXYyh$x{_XTMBAqb{M0 zE}Pg6prnWj>L|}>C3vJFH10Olz-@`P3jp7=i zkGSIZRS6>Y@8ADknrpRP0Lta^#_{p-EiT)gP)GN9ROv7->NJ3wfQ1e?S48wJe0&^hR$Z*Al(Vzu`7Q+DURNZV zc*ZH$b#iiYWMX3C^QPBos{pv1g@-Pi3dj@cas(aSNDwh-vzrMGB_$ZKa^h$sft&n7@sxG>rAf#c?Y>}!gT1h*rWofb9Od&1= z?KG_}iRO$Th_HzygPqchrfG&Gyu)cKkD8%XPzSaNKjWXea$Qw)T{0*X;^o0k^;4%# zEyo!cK$UK=bp}$rO(MIEwD^6KAk^)wb~8mbj=F%;&Y-ji_0^42PR=8mvjU(q zhSkQnTOq`Hgo&3B(HIeJ41&N(gRBnboB*U5!)nsagmaz~L=W)5H6q#@1i{l*A1Vdr zlmOVO@lV1#teo>t;d?%cx4!M?d>p#AD%d8J@GaRaD{saMUaQpxan7HEk@rgktbV)O zHlOB-26*S4cb>cBjyqgU998XugCK|?a1#s#L2$_Snl>@(1)#UL_mv|@jy#I8E$hP~ z6tGdb6dQji2m&{wLM&s}9|3Q^`R4Dr7#1O+^c4&vtox;zviUSuYyi{(2-FDXo3VQ7 zLMhHTgh^kob|c&{ z+S}WE-^9ekxDMOrOv9%F&;+PIkcOTy4eLz6rvfmSK}7!#L|_(caKAZ$00000NkvXX Hu0mjf48QCZ literal 0 HcmV?d00001 diff --git a/build/steps-init.yml b/build/steps-init.yml index befde1b5847..6c5d681bae7 100644 --- a/build/steps-init.yml +++ b/build/steps-init.yml @@ -4,15 +4,15 @@ steps: # Pre-reqs ## - task: NuGetToolInstaller@0 - displayName: 'Use NuGet 5.2.0' + displayName: 'Use NuGet 5.6.0' inputs: - versionSpec: '5.2.0' + versionSpec: '5.6.0' - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 3.1.100' + displayName: 'Use .NET Core SDK 3.1.300' inputs: packageType: sdk - version: '3.1.100' + version: '3.1.300' ## diff --git a/src/Azure/Azure.Quantum.Client/Microsoft.Azure.Quantum.Client.csproj b/src/Azure/Azure.Quantum.Client/Microsoft.Azure.Quantum.Client.csproj index d4b6c807b9e..83a9e34ab8a 100644 --- a/src/Azure/Azure.Quantum.Client/Microsoft.Azure.Quantum.Client.csproj +++ b/src/Azure/Azure.Quantum.Client/Microsoft.Azure.Quantum.Client.csproj @@ -14,7 +14,7 @@ MIT https://github.com/microsoft/qsharp-runtime Azure Quantum Q# Qsharp - https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png + qdk-nuget-icon.png true @@ -46,4 +46,8 @@ + + + + diff --git a/src/Quantum.Development.Kit/Microsoft.Quantum.Development.Kit.nuspec b/src/Quantum.Development.Kit/Microsoft.Quantum.Development.Kit.nuspec index cf33e999c77..42cfd8e8cca 100644 --- a/src/Quantum.Development.Kit/Microsoft.Quantum.Development.Kit.nuspec +++ b/src/Quantum.Development.Kit/Microsoft.Quantum.Development.Kit.nuspec @@ -1,5 +1,5 @@ - + Microsoft.Quantum.Development.Kit $version$ @@ -9,7 +9,7 @@ MIT https://docs.microsoft.com/en-us/quantum - https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png + images\qdk-nuget-icon.png false Provides tools for developing quantum algorithms in the Q# programming language. @@ -30,6 +30,7 @@ + diff --git a/src/Simulation/Core/Microsoft.Quantum.Runtime.Core.csproj b/src/Simulation/Core/Microsoft.Quantum.Runtime.Core.csproj index 4c36d5e4693..550e18196d4 100644 --- a/src/Simulation/Core/Microsoft.Quantum.Runtime.Core.csproj +++ b/src/Simulation/Core/Microsoft.Quantum.Runtime.Core.csproj @@ -13,7 +13,7 @@ See: https://docs.microsoft.com/en-us/quantum/relnotes/ MIT https://github.com/microsoft/qsharp-runtime - https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png + qdk-nuget-icon.png Quantum Q# Qsharp true @@ -25,4 +25,8 @@ + + + + diff --git a/src/Simulation/CsharpGeneration/Microsoft.Quantum.CsharpGeneration.nuspec.template b/src/Simulation/CsharpGeneration/Microsoft.Quantum.CsharpGeneration.nuspec.template index f964fcb499e..bf1d252d914 100644 --- a/src/Simulation/CsharpGeneration/Microsoft.Quantum.CsharpGeneration.nuspec.template +++ b/src/Simulation/CsharpGeneration/Microsoft.Quantum.CsharpGeneration.nuspec.template @@ -1,5 +1,5 @@ - + Microsoft.Quantum.CsharpGeneration $version$ @@ -9,7 +9,7 @@ MIT https://docs.microsoft.com/en-us/quantum - https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png + images\qdk-nuget-icon.png false C# code generation for executing Q# programs on a quantum simulator. @@ -24,5 +24,6 @@ + diff --git a/src/Simulation/EntryPointDriver/Microsoft.Quantum.EntryPointDriver.csproj b/src/Simulation/EntryPointDriver/Microsoft.Quantum.EntryPointDriver.csproj index 2fa2201551c..a506e16a6f9 100644 --- a/src/Simulation/EntryPointDriver/Microsoft.Quantum.EntryPointDriver.csproj +++ b/src/Simulation/EntryPointDriver/Microsoft.Quantum.EntryPointDriver.csproj @@ -16,7 +16,7 @@ See: https://docs.microsoft.com/en-us/quantum/relnotes/ MIT https://github.com/microsoft/qsharp-runtime - https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png + qdk-nuget-icon.png Quantum Q# Qsharp true @@ -34,4 +34,8 @@ + + + + diff --git a/src/Simulation/QsharpCore/Microsoft.Quantum.QSharp.Core.csproj b/src/Simulation/QsharpCore/Microsoft.Quantum.QSharp.Core.csproj index dd9f49c49a8..93ea0e58438 100644 --- a/src/Simulation/QsharpCore/Microsoft.Quantum.QSharp.Core.csproj +++ b/src/Simulation/QsharpCore/Microsoft.Quantum.QSharp.Core.csproj @@ -16,7 +16,7 @@ See: https://docs.microsoft.com/en-us/quantum/relnotes/ MIT https://github.com/microsoft/qsharp-runtime - https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png + qdk-nuget-icon.png Quantum Q# Qsharp true @@ -30,6 +30,10 @@ + + + + diff --git a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.nuspec.template b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.nuspec.template index 17c71ffae28..a6b1ee3819e 100644 --- a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.nuspec.template +++ b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.nuspec.template @@ -1,5 +1,5 @@ - + Microsoft.Quantum.Simulators $version$ @@ -8,7 +8,7 @@ QuantumEngineering, Microsoft MIT https://docs.microsoft.com/en-us/quantum - https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png + images\qdk-nuget-icon.png false Classical simulators of quantum computers for the Q# programming language. See: https://docs.microsoft.com/en-us/quantum/relnotes/ @@ -26,5 +26,6 @@ + diff --git a/src/Xunit/Microsoft.Quantum.Xunit.nuspec b/src/Xunit/Microsoft.Quantum.Xunit.nuspec index c62307ef375..19e612afdfc 100644 --- a/src/Xunit/Microsoft.Quantum.Xunit.nuspec +++ b/src/Xunit/Microsoft.Quantum.Xunit.nuspec @@ -1,5 +1,5 @@ - + $id$ $version$ @@ -9,7 +9,7 @@ MIT https://docs.microsoft.com/en-us/quantum - https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png + images\qdk-nuget-icon.png false Library for testing Q# programs and algorithms using the xUnit framework. @@ -25,4 +25,8 @@ + + + + \ No newline at end of file From b1af02d5e2a2eb234cce2a97633f8ea2269e45af Mon Sep 17 00:00:00 2001 From: Raphael Koh Date: Wed, 15 Jul 2020 18:12:15 -0400 Subject: [PATCH 10/32] Add Runtime Metadata to Operations (#301) --- src/Simulation/Core/AbstractCallable.cs | 8 + .../Core/Generics/GenericCallable.cs | 4 + src/Simulation/Core/Operations/Adjoint.cs | 11 + src/Simulation/Core/Operations/Controlled.cs | 23 +- src/Simulation/Core/Operations/Operation.cs | 10 + .../Core/Operations/OperationPartial.cs | 6 + src/Simulation/Core/RuntimeMetadata.cs | 137 ++++ src/Simulation/Core/TypeExtensions.cs | 54 +- src/Simulation/Core/Udts/UDTPartial.cs | 14 + src/Simulation/QsharpCore/Intrinsic.cs | 79 +++ src/Simulation/QsharpCore/Measurement.cs | 64 ++ .../Circuits/RuntimeMetadataTest.qs | 10 + .../Simulators.Tests/RuntimeMetadataTests.cs | 641 ++++++++++++++++++ .../Simulators.Tests/TypeExtensionsTest.cs | 89 +++ 14 files changed, 1148 insertions(+), 2 deletions(-) create mode 100644 src/Simulation/Core/RuntimeMetadata.cs create mode 100644 src/Simulation/QsharpCore/Intrinsic.cs create mode 100644 src/Simulation/QsharpCore/Measurement.cs create mode 100644 src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs create mode 100644 src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs create mode 100644 src/Simulation/Simulators.Tests/TypeExtensionsTest.cs diff --git a/src/Simulation/Core/AbstractCallable.cs b/src/Simulation/Core/AbstractCallable.cs index dd11d22d7cd..8fc7c712603 100644 --- a/src/Simulation/Core/AbstractCallable.cs +++ b/src/Simulation/Core/AbstractCallable.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#nullable enable + using System.Collections.Generic; namespace Microsoft.Quantum.Simulation.Core @@ -29,6 +31,12 @@ public AbstractCallable(IOperationFactory m) /// public abstract void Init(); + /// + /// Retrieves the runtime metadata of the Operation. If the Operation has no associated + /// runtime metadata, returns null. + /// + public virtual RuntimeMetadata? GetRuntimeMetadata(IApplyData args) => null; + object IApplyData.Value => null; IEnumerable IApplyData.Qubits => null; diff --git a/src/Simulation/Core/Generics/GenericCallable.cs b/src/Simulation/Core/Generics/GenericCallable.cs index e0668b3723f..cdd4ac3fce4 100644 --- a/src/Simulation/Core/Generics/GenericCallable.cs +++ b/src/Simulation/Core/Generics/GenericCallable.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#nullable enable + using System; using System.Collections.Concurrent; using System.Diagnostics; @@ -24,6 +26,8 @@ public partial interface ICallable : IApplyData O Apply(object args); ICallable Partial(object partialTuple); + + RuntimeMetadata? GetRuntimeMetadata(IApplyData args); } /// diff --git a/src/Simulation/Core/Operations/Adjoint.cs b/src/Simulation/Core/Operations/Adjoint.cs index 6db9f4a9f81..8e0efe35ad2 100644 --- a/src/Simulation/Core/Operations/Adjoint.cs +++ b/src/Simulation/Core/Operations/Adjoint.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#nullable enable + using System; using System.Collections.Generic; using System.Diagnostics; @@ -72,6 +74,15 @@ public override void Init() { } public override IApplyData __dataOut(QVoid data) => data; + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) + { + var baseMetadata = this.BaseOp.GetRuntimeMetadata(args); + if (baseMetadata == null) return null; + baseMetadata.IsAdjoint = !baseMetadata.IsAdjoint; + return baseMetadata; + } + public override string ToString() => $"(Adjoint {BaseOp?.ToString() ?? "" })"; public override string __qsharpType() => this.BaseOp?.__qsharpType(); diff --git a/src/Simulation/Core/Operations/Controlled.cs b/src/Simulation/Core/Operations/Controlled.cs index 8df3a8eb579..770a9081f6f 100644 --- a/src/Simulation/Core/Operations/Controlled.cs +++ b/src/Simulation/Core/Operations/Controlled.cs @@ -1,9 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#nullable enable + using System; using System.Collections.Generic; using System.Diagnostics; +using System.Linq; namespace Microsoft.Quantum.Simulation.Core @@ -74,7 +77,7 @@ public override void Init() { } string ICallable.FullName => ((ICallable)this.BaseOp).FullName; OperationFunctor ICallable.Variant => ((ICallable)this.BaseOp).ControlledVariant(); - public override Func<(IQArray, I), QVoid> Body => this.BaseOp.ControlledBody; + public override Func<(IQArray, I), QVoid> Body => this.BaseOp.ControlledBody; public override Func<(IQArray, I), QVoid> AdjointBody => this.BaseOp.ControlledAdjointBody; @@ -110,6 +113,24 @@ public override void Init() { } public override IApplyData __dataOut(QVoid data) => data; + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) + { + Debug.Assert(args.Value is ValueTuple, I>, $"Failed to retrieve runtime metadata for {this.ToString()}."); + + if (args.Value is ValueTuple, I> ctrlArgs) + { + var (controls, baseArgs) = ctrlArgs; + var baseMetadata = this.BaseOp.GetRuntimeMetadata(this.BaseOp.__dataIn(baseArgs)); + if (baseMetadata == null) return null; + baseMetadata.IsControlled = true; + baseMetadata.Controls = controls.Concat(baseMetadata.Controls); + return baseMetadata; + } + + return null; + } + public override string ToString() => $"(Controlled {BaseOp?.ToString() ?? "" })"; public override string __qsharpType() => GenericControlled.AddControlQubitsToSignature(this.BaseOp?.__qsharpType()); diff --git a/src/Simulation/Core/Operations/Operation.cs b/src/Simulation/Core/Operations/Operation.cs index e81248f2528..1dd146c4f22 100644 --- a/src/Simulation/Core/Operations/Operation.cs +++ b/src/Simulation/Core/Operations/Operation.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#nullable enable + using System; using System.Collections.Generic; using System.Diagnostics; @@ -75,6 +77,14 @@ public Operation(IOperationFactory m) : base(m) [DebuggerBrowsable(DebuggerBrowsableState.Never)] public ControlledOperation Controlled => _controlled.Value; + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) => + new RuntimeMetadata() + { + Label = ((ICallable)this).Name, + FormattedNonQubitArgs = args.GetNonQubitArgumentsAsString() ?? "", + Targets = args.GetQubits(), + }; public O Apply(I a) { diff --git a/src/Simulation/Core/Operations/OperationPartial.cs b/src/Simulation/Core/Operations/OperationPartial.cs index 12e03f01913..5a68394d3eb 100644 --- a/src/Simulation/Core/Operations/OperationPartial.cs +++ b/src/Simulation/Core/Operations/OperationPartial.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#nullable enable + using System; using System.Collections.Generic; using System.Diagnostics; @@ -141,6 +143,10 @@ ICallable ICallable.Partial(Func mapper) IUnitary IUnitary

.Partial(Func mapper) => new OperationPartial(this, mapper); + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) => + this.BaseOp.GetRuntimeMetadata(args); + public override string ToString() => $"{this.BaseOp}{{_}}"; public override string __qsharpType() { diff --git a/src/Simulation/Core/RuntimeMetadata.cs b/src/Simulation/Core/RuntimeMetadata.cs new file mode 100644 index 00000000000..9054ce12cc2 --- /dev/null +++ b/src/Simulation/Core/RuntimeMetadata.cs @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.Quantum.Simulation.Core +{ + ///

+ /// Contains the metadata associated with an operation's runtime execution path. + /// + public class RuntimeMetadata + { + /// + /// Label of gate. + /// + public string Label { get; set; } = ""; + + /// + /// Non-qubit arguments provided to gate, formatted as string. + /// + public string FormattedNonQubitArgs { get; set; } = ""; + + /// + /// True if operation is an adjoint operation. + /// + public bool IsAdjoint { get; set; } + + /// + /// True if operation is a controlled operation. + /// + public bool IsControlled { get; set; } + + /// + /// True if operation is a measurement operation. + /// + public bool IsMeasurement { get; set; } + + /// + /// True if operation is composed of multiple operations. + /// + ///
+ /// + /// Currently not used as this is intended for composite operations, + /// such as ApplyToEach. + /// + public bool IsComposite { get; set; } + + /// + /// Group of operations for each classical branch (true and false). + /// + /// + /// Currently not used as this is intended for classically-controlled operations. + /// + public IEnumerable>? Children { get; set; } + + /// + /// List of control registers. + /// + public IEnumerable Controls { get; set; } = new List(); + + /// + /// List of target registers. + /// + public IEnumerable Targets { get; set; } = new List(); + + private static bool OnlyOneNull(object? a, object? b) => + (a == null && b != null) || (b == null && a != null); + + private static bool IsBothNull(object? a, object? b) => + a == null && b == null; + + private static bool ListEquals(IEnumerable a, IEnumerable b) => + IsBothNull(a, b) || (!OnlyOneNull(a, b) && a.SequenceEqual(b)); + + public override bool Equals(object? obj) + { + var other = obj as RuntimeMetadata; + + if (other is null) return false; + + if (this.Label != other.Label || this.FormattedNonQubitArgs != other.FormattedNonQubitArgs || + this.IsAdjoint != other.IsAdjoint || this.IsControlled != other.IsControlled || + this.IsMeasurement != other.IsMeasurement || this.IsComposite != other.IsComposite) + return false; + + if (!ListEquals(this.Controls, other.Controls)) return false; + + if (!ListEquals(this.Targets, other.Targets)) return false; + + // If only one children is null, return false + if (OnlyOneNull(this.Children, other.Children)) return false; + + // If both children are not null, compare each child element-wise and return + // false if any of them are not equal + if (!IsBothNull(this.Children, other.Children)) + { + if (this.Children.Count() != other.Children.Count() || + this.Children.Zip(other.Children, ListEquals).Contains(false)) + return false; + } + + return true; + } + + public override int GetHashCode() + { + // Stringify qubits, concatenate as string, and get resulting hashcode + var controlsHash = string.Join(",", this.Controls.Select(q => q?.ToString() ?? "")).GetHashCode(); + var targetsHash = string.Join(",", this.Targets.Select(q => q?.ToString() ?? "")).GetHashCode(); + + // Recursively get hashcode of inner `RuntimeMetadata` objects, concatenate into a string, + // and get resulting hashcode + var childrenHash = (this.Children != null) + ? string.Join(", ", this.Children.Select(child => (child != null) + ? string.Join(",", child.Select(m => m?.GetHashCode().ToString() ?? "0")) + : "0" + )).GetHashCode() + : 0; + + // Combine all other properties and get the resulting hashcode + var otherHash = HashCode.Combine(this.Label, this.FormattedNonQubitArgs, this.IsAdjoint, this.IsControlled, + this.IsMeasurement, this.IsComposite); + + // Combine them all together to get the final hashcode + return HashCode.Combine(controlsHash, targetsHash, childrenHash, otherHash); + } + + public static bool operator ==(RuntimeMetadata? x, RuntimeMetadata? y) => + IsBothNull(x, y) || (x?.Equals(y) ?? false); + + public static bool operator !=(RuntimeMetadata? x, RuntimeMetadata? y) => !(x == y); + } +} diff --git a/src/Simulation/Core/TypeExtensions.cs b/src/Simulation/Core/TypeExtensions.cs index 94bc5ebabf6..d710f1c8617 100644 --- a/src/Simulation/Core/TypeExtensions.cs +++ b/src/Simulation/Core/TypeExtensions.cs @@ -1,7 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#nullable enable + using System; +using System.Collections; using System.Collections.Concurrent; using System.Diagnostics; using System.Linq; @@ -144,6 +147,55 @@ public static Type[] GetTupleFieldTypes(this Type arg) } } + /// + /// Given an , retrieve its non-qubit fields as a string. + /// Returns null if no non-qubit fields found. + /// + public static string? GetNonQubitArgumentsAsString(this object o) + { + var t = o.GetType(); + + // If object is a Qubit, ignore it (i.e. return null) + if (o is Qubit) return null; + + // If object is an IApplyData, recursively extract nested fields + // and stringify them + if (o is IApplyData data) + { + var argsString = data.Value.GetNonQubitArgumentsAsString(); + return argsString.Any() ? argsString : null; + } + + // If object is a string, enclose it in quotations + if (o is string s) + { + return (s != null) ? $"\"{s}\"" : null; + } + + // If object is a list, recursively extract its inner arguments and + // concatenate them into a list string + if (typeof(IEnumerable).IsAssignableFrom(t)) + { + var elements = ((IEnumerable)o).Cast() + .Select(x => x.GetNonQubitArgumentsAsString()) + .WhereNotNull(); + return (elements.Any()) ? $"[{string.Join(", ", elements)}]" : null; + } + + // If object is a tuple, recursively extract its inner arguments and + // concatenate them into a tuple string + if (t.IsTuple()) + { + var items = t.GetFields() + .Select(f => f.GetValue(o).GetNonQubitArgumentsAsString()) + .WhereNotNull(); + return (items.Any()) ? $"({string.Join(", ", items)})" : null; + } + + // Otherwise, return argument as a string + return (o != null) ? o.ToString() : null; + } + private static ConcurrentDictionary _normalTypesCache = new ConcurrentDictionary(); /// @@ -259,7 +311,7 @@ public static string OperationVariants(this Type t, object op) return OperationVariants(generic.OperationType, op); } - return OperationVariants(t.BaseType, op); + return OperationVariants(t.BaseType, op); } public static bool TryQSharpOperationType(Type t, out string typeName) diff --git a/src/Simulation/Core/Udts/UDTPartial.cs b/src/Simulation/Core/Udts/UDTPartial.cs index 8d586d4ee80..a97a92f870f 100644 --- a/src/Simulation/Core/Udts/UDTPartial.cs +++ b/src/Simulation/Core/Udts/UDTPartial.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#nullable enable + using System; using System.Collections.Generic; using System.Diagnostics; @@ -62,6 +64,18 @@ public ICallable Partial(object partialTuple) return (ICallable)Activator.CreateInstance(partialType, new object[] { this, partialTuple }); } + /// + public RuntimeMetadata? GetRuntimeMetadata(IApplyData args) + { + Debug.Assert(args.Value is P, $"Failed to retrieve runtime metadata for {typeof(U).Name}."); + var baseArgs = this.Apply((P) args.Value); + return new RuntimeMetadata() + { + Label = typeof(U).Name, + FormattedNonQubitArgs = baseArgs?.GetNonQubitArgumentsAsString() ?? "", + }; + } + internal class DebuggerProxy { private readonly UDTPartial u; diff --git a/src/Simulation/QsharpCore/Intrinsic.cs b/src/Simulation/QsharpCore/Intrinsic.cs new file mode 100644 index 00000000000..76976a0f217 --- /dev/null +++ b/src/Simulation/QsharpCore/Intrinsic.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using Microsoft.Quantum.Simulation.Core; + +namespace Microsoft.Quantum.Intrinsic +{ + public partial class CNOT + { + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) + { + Debug.Assert(args.Value is ValueTuple, $"Failed to retrieve runtime metadata for {this.ToString()}."); + + if (args.Value is ValueTuple cnotArgs) + { + var (ctrl, target) = cnotArgs; + return new RuntimeMetadata() + { + Label = "X", + IsControlled = true, + Controls = new List() { ctrl }, + Targets = new List() { target }, + }; + } + + return null; + } + } + + public partial class CCNOT + { + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) + { + Debug.Assert(args.Value is ValueTuple, $"Failed to retrieve runtime metadata for {this.ToString()}."); + + if (args.Value is ValueTuple ccnotArgs) + { + var (ctrl1, ctrl2, target) = ccnotArgs; + return new RuntimeMetadata() + { + Label = "X", + IsControlled = true, + Controls = new List() { ctrl1, ctrl2 }, + Targets = new List() { target }, + }; + } + + return null; + } + } + + public partial class M + { + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) + { + Debug.Assert(args.Value is Qubit, $"Failed to retrieve runtime metadata for {this.ToString()}."); + + if (args.Value is Qubit target) + { + return new RuntimeMetadata() + { + Label = ((ICallable)this).Name, + IsMeasurement = true, + Targets = new List() { target }, + }; + } + + return null; + } + } +} diff --git a/src/Simulation/QsharpCore/Measurement.cs b/src/Simulation/QsharpCore/Measurement.cs new file mode 100644 index 00000000000..62cf6775fe1 --- /dev/null +++ b/src/Simulation/QsharpCore/Measurement.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable enable + +using System.Collections.Generic; +using Microsoft.Quantum.Simulation.Core; + +namespace Microsoft.Quantum.Measurement +{ + public partial class MResetX + { + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) + { + var targets = new List(); + var target = args.Value as Qubit; + if (target != null) targets.Add(target); + + return new RuntimeMetadata() + { + Label = ((ICallable)this).Name, + IsMeasurement = true, + Targets = targets, + }; + } + } + + public partial class MResetY + { + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) + { + var targets = new List(); + var target = args.Value as Qubit; + if (target != null) targets.Add(target); + + return new RuntimeMetadata() + { + Label = ((ICallable)this).Name, + IsMeasurement = true, + Targets = targets, + }; + } + } + + public partial class MResetZ + { + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) + { + var targets = new List(); + var target = args.Value as Qubit; + if (target != null) targets.Add(target); + + return new RuntimeMetadata() + { + Label = ((ICallable)this).Name, + IsMeasurement = true, + Targets = targets, + }; + } + } +} diff --git a/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs b/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs new file mode 100644 index 00000000000..dcb7df85c86 --- /dev/null +++ b/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Microsoft.Quantum.Simulation.Simulators.Tests.Circuits { + + newtype FooUDT = (String, (Qubit, Double)); + + operation FooUDTOp (foo : FooUDT) : Unit is Ctl + Adj { } + +} diff --git a/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs b/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs new file mode 100644 index 00000000000..5e551565841 --- /dev/null +++ b/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs @@ -0,0 +1,641 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Quantum.Simulation.Core; +using Xunit; + +namespace Microsoft.Quantum.Simulation.Simulators.Tests +{ + public class RuntimeMetadataEqualityTests + { + [Fact] + public void WrongType() + { + var a = new RuntimeMetadata { }; + var i = 5; + Assert.False(a.Equals(i)); + } + + [Fact] + public void NullEquality() + { + var a = new RuntimeMetadata { }; + RuntimeMetadata? b = null; + Assert.NotEqual(a, b); + Assert.NotEqual(b, a); + } + + [Fact] + public void CheckEquality() + { + var a = new RuntimeMetadata() + { + Label = "H", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { }, + }; + var b = new RuntimeMetadata() + { + Label = "H", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { }, + }; + Assert.Equal(a, b); + Assert.Equal(a.GetHashCode(), b.GetHashCode()); + + b.Label = "X"; + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + b.Label = "H"; + + b.FormattedNonQubitArgs = "(1)"; + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + b.FormattedNonQubitArgs = ""; + + b.IsAdjoint = true; + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + b.IsAdjoint = false; + + b.IsControlled = true; + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + b.IsControlled = false; + + b.IsMeasurement = true; + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + b.IsMeasurement = false; + + b.IsComposite = true; + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + b.IsComposite = false; + } + + [Fact] + public void ControlsEquality() + { + var a = new RuntimeMetadata() + { + Controls = new List() { }, + }; + var b = new RuntimeMetadata() + { + Controls = new List() { }, + }; + Assert.Equal(a, b); + Assert.Equal(a.GetHashCode(), b.GetHashCode()); + + b.Controls = new List() { new FreeQubit(1) }; + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + + a.Controls = new List() { new FreeQubit(1) }; + Assert.Equal(a, b); + Assert.Equal(a.GetHashCode(), b.GetHashCode()); + } + + [Fact] + public void TargetsEquality() + { + var a = new RuntimeMetadata() + { + Targets = new List() { }, + }; + var b = new RuntimeMetadata() + { + Targets = new List() { }, + }; + Assert.Equal(a, b); + Assert.Equal(a.GetHashCode(), b.GetHashCode()); + + b.Targets = new List() { new FreeQubit(1) }; + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + + a.Targets = new List() { new FreeQubit(1) }; + Assert.Equal(a, b); + Assert.Equal(a.GetHashCode(), b.GetHashCode()); + } + + [Fact] + public void ChildrenEquality() + { + var a = new RuntimeMetadata() + { + Children = new[] + { + new List(), + new List(), + }, + }; + var b = new RuntimeMetadata() + { + Children = new[] + { + new List(), + new List(), + }, + }; + Assert.Equal(a, b); + Assert.Equal(a.GetHashCode(), b.GetHashCode()); + + var aChildren = a.Children.ToList(); + aChildren[0] = new List() { new RuntimeMetadata() { Label = "H" } }; + a.Children = aChildren; + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + + var bChildren = b.Children.ToList(); + bChildren[0] = new List() { new RuntimeMetadata() { Label = "X" } }; + b.Children = bChildren; + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + + bChildren[0] = new List() { new RuntimeMetadata() { Label = "H" } }; + Assert.Equal(a, b); + Assert.Equal(a.GetHashCode(), b.GetHashCode()); + + b.Children = b.Children.SkipLast(1); + Assert.NotEqual(a, b); + Assert.NotEqual(a.GetHashCode(), b.GetHashCode()); + } + } + + public class IntrinsicTests + { + [Fact] + public void CNOT() + { + var control = new FreeQubit(1); + var target = new FreeQubit(0); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn((control, target)); + var expected = new RuntimeMetadata() + { + Label = "X", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = true, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { control }, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void CCNOT() + { + var control1 = new FreeQubit(0); + var control2 = new FreeQubit(2); + var target = new FreeQubit(1); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn((control1, control2, target)); + var expected = new RuntimeMetadata() + { + Label = "X", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = true, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { control1, control2 }, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void Ry() + { + var target = new FreeQubit(0); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn((2.1, target)); + var expected = new RuntimeMetadata() + { + Label = "Ry", + FormattedNonQubitArgs = "(2.1)", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void M() + { + var measureQubit = new FreeQubit(0); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn(measureQubit); + var expected = new RuntimeMetadata() + { + Label = "M", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = true, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { measureQubit }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + } + + public class MeasurementTests + { + [Fact] + public void MResetX() + { + var measureQubit = new FreeQubit(0); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn(measureQubit); + var expected = new RuntimeMetadata() + { + Label = "MResetX", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = true, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { measureQubit }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void MResetY() + { + var measureQubit = new FreeQubit(0); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn(measureQubit); + var expected = new RuntimeMetadata() + { + Label = "MResetY", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = true, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { measureQubit }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void MResetZ() + { + var measureQubit = new FreeQubit(0); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn(measureQubit); + var expected = new RuntimeMetadata() + { + Label = "MResetZ", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = true, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { measureQubit }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + } + + public class UDTTests + { + [Fact] + public void FooUDTOp() + { + Qubit target = new FreeQubit(0); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn(new Circuits.FooUDT(("bar", (target, 2.1)))); + var expected = new RuntimeMetadata() + { + Label = "FooUDTOp", + FormattedNonQubitArgs = "(\"bar\", (2.1))", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + } + + public class ControlledOpTests + { + [Fact] + public void ControlledH() + { + IQArray controls = new QArray(new[] { new FreeQubit(0) }); + Qubit target = new FreeQubit(1); + var op = new QuantumSimulator().Get().Controlled; + var args = op.__dataIn((controls, target)); + var expected = new RuntimeMetadata() + { + Label = "H", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = true, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = controls, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void ControlledX() + { + IQArray controls = new QArray(new[] { new FreeQubit(0) }); + Qubit target = new FreeQubit(1); + var op = new QuantumSimulator().Get().Controlled; + var args = op.__dataIn((controls, target)); + var expected = new RuntimeMetadata() + { + Label = "X", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = true, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = controls, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void ControlledCNOT() + { + IQArray controls = new QArray(new[] { new FreeQubit(0) }); + Qubit control = new FreeQubit(1); + Qubit target = new FreeQubit(2); + var op = new QuantumSimulator().Get().Controlled; + var args = op.__dataIn((controls, (control, target))); + var expected = new RuntimeMetadata() + { + Label = "X", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = true, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = controls.Append(control), + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void ControlledCCNOT() + { + Qubit control1 = new FreeQubit(0); + Qubit control2 = new FreeQubit(1); + Qubit control3 = new FreeQubit(2); + Qubit target = new FreeQubit(3); + IQArray controls = new QArray(new[] { control1 }); + var op = new QuantumSimulator().Get().Controlled; + var args = op.__dataIn((controls, (control2, control3, target))); + var expected = new RuntimeMetadata() + { + Label = "X", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = true, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { control1, control2, control3 }, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + } + + public class AdjointTests + { + [Fact] + public void AdjointH() + { + Qubit target = new FreeQubit(0); + var op = new QuantumSimulator().Get().Adjoint; + var args = op.__dataIn(target); + var expected = new RuntimeMetadata() + { + Label = "H", + FormattedNonQubitArgs = "", + IsAdjoint = true, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void AdjointX() + { + Qubit target = new FreeQubit(0); + var op = new QuantumSimulator().Get().Adjoint; + var args = op.__dataIn(target); + var expected = new RuntimeMetadata() + { + Label = "X", + FormattedNonQubitArgs = "", + IsAdjoint = true, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void AdjointAdjointH() + { + Qubit target = new FreeQubit(0); + var op = new QuantumSimulator().Get().Adjoint.Adjoint; + var args = op.__dataIn(target); + var expected = new RuntimeMetadata() + { + Label = "H", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void ControlledAdjointH() + { + IQArray controls = new QArray(new[] { new FreeQubit(0) }); + Qubit target = new FreeQubit(1); + var op1 = new QuantumSimulator().Get().Controlled.Adjoint; + var op2 = new QuantumSimulator().Get().Adjoint.Controlled; + var args = op1.__dataIn((controls, target)); + var expected = new RuntimeMetadata() + { + Label = "H", + FormattedNonQubitArgs = "", + IsAdjoint = true, + IsControlled = true, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = controls, + Targets = new List() { target }, + }; + + Assert.Equal(op1.GetRuntimeMetadata(args), expected); + Assert.Equal(op2.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void ControlledAdjointAdjointH() + { + IQArray controls = new QArray(new[] { new FreeQubit(0) }); + Qubit target = new FreeQubit(1); + var op1 = new QuantumSimulator().Get().Controlled.Adjoint.Adjoint; + var op2 = new QuantumSimulator().Get().Adjoint.Controlled.Adjoint; + var op3 = new QuantumSimulator().Get().Adjoint.Adjoint.Controlled; + var args = op1.__dataIn((controls, target)); + var expected = new RuntimeMetadata() + { + Label = "H", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = true, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = controls, + Targets = new List() { target }, + }; + + Assert.Equal(op1.GetRuntimeMetadata(args), expected); + Assert.Equal(op2.GetRuntimeMetadata(args), expected); + Assert.Equal(op3.GetRuntimeMetadata(args), expected); + } + } + + public class PartialOpTests + { + + [Fact] + public void PartialRy() + { + var target = new FreeQubit(0); + var op = new QuantumSimulator().Get().Partial((double d) => + new ValueTuple(d, target)); + var args = op.__dataIn(2.1); + var expected = new RuntimeMetadata() + { + Label = "Ry", + FormattedNonQubitArgs = "(2.1)", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void PartialUDT() + { + var target = new FreeQubit(0); + var op = new QuantumSimulator().Get>(typeof(Circuits.FooUDT)) + .Partial((double d) => (("bar", (target, d)))); + var args = new QTuple(2.1); + var expected = new RuntimeMetadata() + { + Label = "FooUDT", + FormattedNonQubitArgs = "(\"bar\", (2.1))", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + } +} diff --git a/src/Simulation/Simulators.Tests/TypeExtensionsTest.cs b/src/Simulation/Simulators.Tests/TypeExtensionsTest.cs new file mode 100644 index 00000000000..8e025482316 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TypeExtensionsTest.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using Microsoft.Quantum.Simulation.Core; +using Xunit; + +namespace Microsoft.Quantum.Simulation.Simulators.Tests +{ + public class ApplyData : IApplyData + { + public T Data; + + public ApplyData(T data) + { + this.Data = data; + } + + object IApplyData.Value => this.Data; + + IEnumerable IApplyData.Qubits => QubitsExtractor.Get(typeof(T))?.Extract(Data); + } + + public class GetNonQubitArgumentsAsStringTests + { + [Fact] + public void BasicTypes() + { + Assert.Equal("3", 3.GetNonQubitArgumentsAsString()); + Assert.Equal("False", false.GetNonQubitArgumentsAsString()); + Assert.Equal("\"Foo\"", "Foo".GetNonQubitArgumentsAsString()); + Assert.Equal("\"\"", "".GetNonQubitArgumentsAsString()); + } + + [Fact] + public void TupleTypes() + { + Assert.Equal("(1, 2)", (1, 2).GetNonQubitArgumentsAsString()); + Assert.Equal("(\"foo\", \"bar\")", ("foo", "bar").GetNonQubitArgumentsAsString()); + Assert.Equal("(\"foo\", \"bar\", \"\")", ("foo", "bar", "").GetNonQubitArgumentsAsString()); + Assert.Equal("(\"foo\", (\"bar\", \"car\"))", ("foo", ("bar", "car")).GetNonQubitArgumentsAsString()); + Assert.Equal("((\"foo\"), (\"bar\", \"car\"))", (("foo", new FreeQubit(0)), ("bar", "car")).GetNonQubitArgumentsAsString()); + } + + [Fact] + public void ArrayTypes() + { + Assert.Equal("[1, 2, 3]", new[] { 1, 2, 3 }.GetNonQubitArgumentsAsString()); + Assert.Equal("[\"foo\", \"bar\"]", new[] { "foo", "bar" }.GetNonQubitArgumentsAsString()); + + var arr = new[] { + (new FreeQubit(0), "foo"), + (new FreeQubit(1), "bar"), + }; + Assert.Equal("[(\"foo\"), (\"bar\")]", arr.GetNonQubitArgumentsAsString()); + } + + [Fact] + public void IApplyDataTypes() + { + IApplyData data; + data = new ApplyData(3); + Assert.Equal("3", data.GetNonQubitArgumentsAsString()); + + data = new ApplyData(false); + Assert.Equal("False", data.GetNonQubitArgumentsAsString()); + + data = new ApplyData("Foo"); + Assert.Equal("\"Foo\"", data.GetNonQubitArgumentsAsString()); + + data = new ApplyData>((1, "foo")); + Assert.Equal("(1, \"foo\")", data.GetNonQubitArgumentsAsString()); + + data = new ApplyData, ValueTuple>>((("foo", new FreeQubit(0)), ("bar", "car"))); + Assert.Equal("((\"foo\"), (\"bar\", \"car\"))", data.GetNonQubitArgumentsAsString()); + + data = new ApplyData(new[] { 1, 2, 3 }); + Assert.Equal("[1, 2, 3]", data.GetNonQubitArgumentsAsString()); + + var arr = new[] { + (new FreeQubit(0), "foo"), + (new FreeQubit(1), "bar"), + }; + data = new ApplyData<(FreeQubit, string)[]>(arr); + Assert.Equal("[(\"foo\"), (\"bar\")]", data.GetNonQubitArgumentsAsString()); + } + } +} From 08ae4a499ea3f2c5c89ac8dbb0e4eb5b3c75c436 Mon Sep 17 00:00:00 2001 From: Raphael Koh Date: Thu, 16 Jul 2020 19:43:00 -0400 Subject: [PATCH 11/32] Fix stack overflow bug for Qubit array types on RuntimeMetadata (#312) --- src/Simulation/Core/Operations/Operation.cs | 2 +- src/Simulation/Core/RuntimeMetadata.cs | 5 +- src/Simulation/Core/TypeExtensions.cs | 11 ++- .../Circuits/RuntimeMetadataTest.qs | 17 +++- .../Simulators.Tests/RuntimeMetadataTests.cs | 89 +++++++++++++++++++ .../Simulators.Tests/TypeExtensionsTest.cs | 35 ++++++++ 6 files changed, 148 insertions(+), 11 deletions(-) diff --git a/src/Simulation/Core/Operations/Operation.cs b/src/Simulation/Core/Operations/Operation.cs index 1dd146c4f22..aba000d7765 100644 --- a/src/Simulation/Core/Operations/Operation.cs +++ b/src/Simulation/Core/Operations/Operation.cs @@ -83,7 +83,7 @@ public Operation(IOperationFactory m) : base(m) { Label = ((ICallable)this).Name, FormattedNonQubitArgs = args.GetNonQubitArgumentsAsString() ?? "", - Targets = args.GetQubits(), + Targets = args.GetQubits() ?? new List(), }; public O Apply(I a) diff --git a/src/Simulation/Core/RuntimeMetadata.cs b/src/Simulation/Core/RuntimeMetadata.cs index 9054ce12cc2..d61f63050f9 100644 --- a/src/Simulation/Core/RuntimeMetadata.cs +++ b/src/Simulation/Core/RuntimeMetadata.cs @@ -44,8 +44,7 @@ public class RuntimeMetadata /// /// /// - /// Currently not used as this is intended for composite operations, - /// such as ApplyToEach. + /// This is used in composite operations, such as ApplyToEach. /// public bool IsComposite { get; set; } @@ -53,7 +52,7 @@ public class RuntimeMetadata /// Group of operations for each classical branch (true and false). /// /// - /// Currently not used as this is intended for classically-controlled operations. + /// This is used in classically-controlled operations. /// public IEnumerable>? Children { get; set; } diff --git a/src/Simulation/Core/TypeExtensions.cs b/src/Simulation/Core/TypeExtensions.cs index d710f1c8617..c47650b0b77 100644 --- a/src/Simulation/Core/TypeExtensions.cs +++ b/src/Simulation/Core/TypeExtensions.cs @@ -6,6 +6,7 @@ using System; using System.Collections; using System.Collections.Concurrent; +using System.Collections.Generic; using System.Diagnostics; using System.Linq; @@ -155,15 +156,13 @@ public static Type[] GetTupleFieldTypes(this Type arg) { var t = o.GetType(); - // If object is a Qubit, ignore it (i.e. return null) - if (o is Qubit) return null; + // If object is a Qubit, QVoid, or array of Qubits, ignore it (i.e. return null) + if (o is Qubit || o is QVoid || o is IEnumerable) return null; - // If object is an IApplyData, recursively extract nested fields - // and stringify them + // If object is an IApplyData, recursively extract arguments if (o is IApplyData data) { - var argsString = data.Value.GetNonQubitArgumentsAsString(); - return argsString.Any() ? argsString : null; + return data.Value.GetNonQubitArgumentsAsString(); } // If object is a string, enclose it in quotations diff --git a/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs b/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs index dcb7df85c86..668f7ee5bf5 100644 --- a/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs +++ b/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs @@ -2,9 +2,24 @@ // Licensed under the MIT License. namespace Microsoft.Quantum.Simulation.Simulators.Tests.Circuits { - + + open Microsoft.Quantum.Intrinsic; + newtype FooUDT = (String, (Qubit, Double)); operation FooUDTOp (foo : FooUDT) : Unit is Ctl + Adj { } + + operation Empty () : Unit is Ctl + Adj { } + + operation HOp (q : Qubit) : Unit { + H(q); + Reset(q); + } + + operation NestedOp () : Unit { + using (q = Qubit()) { + HOp(q); + } + } } diff --git a/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs b/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs index 5e551565841..629417598b0 100644 --- a/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs +++ b/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs @@ -230,6 +230,29 @@ public void CCNOT() Assert.Equal(op.GetRuntimeMetadata(args), expected); } + [Fact] + public void Swap() + { + var q1 = new FreeQubit(0); + var q2 = new FreeQubit(1); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn((q1, q2)); + var expected = new RuntimeMetadata() + { + Label = "SWAP", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { q1, q2 }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + [Fact] public void Ry() { @@ -273,6 +296,28 @@ public void M() Assert.Equal(op.GetRuntimeMetadata(args), expected); } + + [Fact] + public void ResetAll() + { + IQArray targets = new QArray(new[] { new FreeQubit(0) }); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn(targets); + var expected = new RuntimeMetadata() + { + Label = "ResetAll", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = targets, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } } public class MeasurementTests @@ -342,6 +387,50 @@ public void MResetZ() Assert.Equal(op.GetRuntimeMetadata(args), expected); } + + [Fact] + public void EmptyOperation() + { + var measureQubit = new FreeQubit(0); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn(QVoid.Instance); + var expected = new RuntimeMetadata() + { + Label = "Empty", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + + [Fact] + public void NestedOperation() + { + var measureQubit = new FreeQubit(0); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn(QVoid.Instance); + var expected = new RuntimeMetadata() + { + Label = "NestedOp", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } } public class UDTTests diff --git a/src/Simulation/Simulators.Tests/TypeExtensionsTest.cs b/src/Simulation/Simulators.Tests/TypeExtensionsTest.cs index 8e025482316..5fa2f260610 100644 --- a/src/Simulation/Simulators.Tests/TypeExtensionsTest.cs +++ b/src/Simulation/Simulators.Tests/TypeExtensionsTest.cs @@ -33,6 +33,22 @@ public void BasicTypes() Assert.Equal("\"\"", "".GetNonQubitArgumentsAsString()); } + [Fact] + public void QubitTypes() + { + var q = new FreeQubit(0); + Assert.Null(q.GetNonQubitArgumentsAsString()); + + var qs = new QArray(new[] { new FreeQubit(0) }); + Assert.Null(qs.GetNonQubitArgumentsAsString()); + + qs = new QArray(new[] { new FreeQubit(0), new FreeQubit(1) }); + Assert.Null(qs.GetNonQubitArgumentsAsString()); + + var qtuple = new QTuple(q); + Assert.Null(qtuple.GetNonQubitArgumentsAsString()); + } + [Fact] public void TupleTypes() { @@ -41,6 +57,9 @@ public void TupleTypes() Assert.Equal("(\"foo\", \"bar\", \"\")", ("foo", "bar", "").GetNonQubitArgumentsAsString()); Assert.Equal("(\"foo\", (\"bar\", \"car\"))", ("foo", ("bar", "car")).GetNonQubitArgumentsAsString()); Assert.Equal("((\"foo\"), (\"bar\", \"car\"))", (("foo", new FreeQubit(0)), ("bar", "car")).GetNonQubitArgumentsAsString()); + + var qtuple = new QTuple<(Qubit, string)>((new FreeQubit(0), "foo")); + Assert.Equal("(\"foo\")", qtuple.GetNonQubitArgumentsAsString()); } [Fact] @@ -84,6 +103,22 @@ public void IApplyDataTypes() }; data = new ApplyData<(FreeQubit, string)[]>(arr); Assert.Equal("[(\"foo\"), (\"bar\")]", data.GetNonQubitArgumentsAsString()); + + var qtupleWithString = new QTuple<(Qubit, string)>((new FreeQubit(0), "foo")); + data = new ApplyData>(qtupleWithString); + Assert.Equal("(\"foo\")", data.GetNonQubitArgumentsAsString()); + + var q = new FreeQubit(0); + data = new ApplyData(q); + Assert.Null(data.GetNonQubitArgumentsAsString()); + + var qs = new QArray(new[] { new FreeQubit(0), new FreeQubit(1) }); + data = new ApplyData>(qs); + Assert.Null(data.GetNonQubitArgumentsAsString()); + + var qtuple = new QTuple(q); + data = new ApplyData>(qtuple); + Assert.Null(data.GetNonQubitArgumentsAsString()); } } } From 49393b9f2ad0a6618d8258cda364c7acb8bc6c88 Mon Sep 17 00:00:00 2001 From: Raphael Koh Date: Wed, 22 Jul 2020 14:14:11 -0400 Subject: [PATCH 12/32] Allow operations in arguments for `GetNonQubitArgumentsAsString` (#314) * Handle operations as arguments in GetNonQubitArgumentsAsString * Handle null values for IApplyData types --- src/Simulation/Core/TypeExtensions.cs | 8 ++++- .../Circuits/RuntimeMetadataTest.qs | 5 ++++ .../Simulators.Tests/RuntimeMetadataTests.cs | 24 ++++++++++++++- .../Simulators.Tests/TypeExtensionsTest.cs | 29 +++++++++++++++++-- 4 files changed, 62 insertions(+), 4 deletions(-) diff --git a/src/Simulation/Core/TypeExtensions.cs b/src/Simulation/Core/TypeExtensions.cs index c47650b0b77..59cb0370b52 100644 --- a/src/Simulation/Core/TypeExtensions.cs +++ b/src/Simulation/Core/TypeExtensions.cs @@ -159,10 +159,16 @@ public static Type[] GetTupleFieldTypes(this Type arg) // If object is a Qubit, QVoid, or array of Qubits, ignore it (i.e. return null) if (o is Qubit || o is QVoid || o is IEnumerable) return null; + // If object is an ICallable, return its name + if (o is ICallable op) + { + return op.Name; + } + // If object is an IApplyData, recursively extract arguments if (o is IApplyData data) { - return data.Value.GetNonQubitArgumentsAsString(); + return data.Value?.GetNonQubitArgumentsAsString(); } // If object is a string, enclose it in quotations diff --git a/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs b/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs index 668f7ee5bf5..b75e70fb7d5 100644 --- a/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs +++ b/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs @@ -11,6 +11,11 @@ namespace Microsoft.Quantum.Simulation.Simulators.Tests.Circuits { operation Empty () : Unit is Ctl + Adj { } + operation WrapperOp (op: (Qubit => Unit), q : Qubit) : Unit { + op(q); + Reset(q); + } + operation HOp (q : Qubit) : Unit { H(q); Reset(q); diff --git a/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs b/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs index 629417598b0..d41b15764fa 100644 --- a/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs +++ b/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs @@ -410,10 +410,32 @@ public void EmptyOperation() Assert.Equal(op.GetRuntimeMetadata(args), expected); } + [Fact] + public void OperationAsArgument() + { + var q = new FreeQubit(0); + var opArg = new QuantumSimulator().Get(); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn((opArg, q)); + var expected = new RuntimeMetadata() + { + Label = "WrapperOp", + FormattedNonQubitArgs = "(HOp)", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { q }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + [Fact] public void NestedOperation() { - var measureQubit = new FreeQubit(0); var op = new QuantumSimulator().Get(); var args = op.__dataIn(QVoid.Instance); var expected = new RuntimeMetadata() diff --git a/src/Simulation/Simulators.Tests/TypeExtensionsTest.cs b/src/Simulation/Simulators.Tests/TypeExtensionsTest.cs index 5fa2f260610..a7942f7f110 100644 --- a/src/Simulation/Simulators.Tests/TypeExtensionsTest.cs +++ b/src/Simulation/Simulators.Tests/TypeExtensionsTest.cs @@ -33,6 +33,16 @@ public void BasicTypes() Assert.Equal("\"\"", "".GetNonQubitArgumentsAsString()); } + [Fact] + public void OperationTypes() + { + var op = new QuantumSimulator().Get(); + Assert.Equal("H", op.GetNonQubitArgumentsAsString()); + + var op2 = new QuantumSimulator().Get(); + Assert.Equal("CNOT", op2.GetNonQubitArgumentsAsString()); + } + [Fact] public void QubitTypes() { @@ -58,6 +68,10 @@ public void TupleTypes() Assert.Equal("(\"foo\", (\"bar\", \"car\"))", ("foo", ("bar", "car")).GetNonQubitArgumentsAsString()); Assert.Equal("((\"foo\"), (\"bar\", \"car\"))", (("foo", new FreeQubit(0)), ("bar", "car")).GetNonQubitArgumentsAsString()); + var op = new QuantumSimulator().Get(); + var opTuple = new QTuple<(ICallable, string)>((op, "foo")); + Assert.Equal("(H, \"foo\")", opTuple.GetNonQubitArgumentsAsString()); + var qtuple = new QTuple<(Qubit, string)>((new FreeQubit(0), "foo")); Assert.Equal("(\"foo\")", qtuple.GetNonQubitArgumentsAsString()); } @@ -68,11 +82,18 @@ public void ArrayTypes() Assert.Equal("[1, 2, 3]", new[] { 1, 2, 3 }.GetNonQubitArgumentsAsString()); Assert.Equal("[\"foo\", \"bar\"]", new[] { "foo", "bar" }.GetNonQubitArgumentsAsString()); - var arr = new[] { + var opArr = new ICallable[] { + new QuantumSimulator().Get(), + new QuantumSimulator().Get(), + new QuantumSimulator().Get(), + }; + Assert.Equal("[H, CNOT, Ry]", opArr.GetNonQubitArgumentsAsString()); + + var qTupleArr = new[] { (new FreeQubit(0), "foo"), (new FreeQubit(1), "bar"), }; - Assert.Equal("[(\"foo\"), (\"bar\")]", arr.GetNonQubitArgumentsAsString()); + Assert.Equal("[(\"foo\"), (\"bar\")]", qTupleArr.GetNonQubitArgumentsAsString()); } [Fact] @@ -88,6 +109,10 @@ public void IApplyDataTypes() data = new ApplyData("Foo"); Assert.Equal("\"Foo\"", data.GetNonQubitArgumentsAsString()); + var op = new QuantumSimulator().Get(); + data = new ApplyData(op); + Assert.Equal("H", data.GetNonQubitArgumentsAsString()); + data = new ApplyData>((1, "foo")); Assert.Equal("(1, \"foo\")", data.GetNonQubitArgumentsAsString()); From 161ed8ac3c70e546f9ac71596ca822f33af1a906 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Wed, 22 Jul 2020 20:41:32 -0700 Subject: [PATCH 13/32] Copy Runtime.dll to build\Release if available on drop. (#315) --- src/Simulation/Native/bootstrap.cmd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Simulation/Native/bootstrap.cmd b/src/Simulation/Native/bootstrap.cmd index 144b1686a9f..cd32571ecd4 100644 --- a/src/Simulation/Native/bootstrap.cmd +++ b/src/Simulation/Native/bootstrap.cmd @@ -23,6 +23,10 @@ IF EXIST %DROP_FOLDER%\Release\Microsoft.Quantum.Simulator.Runtime.dll copy %DRO IF NOT EXIST %BUILD_FOLDER% mkdir %BUILD_FOLDER% pushd %BUILD_FOLDER% +IF NOT EXIST Release mkdir Release +IF EXIST %DROP_FOLDER%\Release\Microsoft.Quantum.Simulator.Runtime.dll copy %DROP_FOLDER%\Release\Microsoft.Quantum.Simulator.Runtime.dll Release\Microsoft.Quantum.Simulator.Runtime.dll + + cmake -A "x64" ^ -DBUILD_SHARED_LIBS:BOOL="1" ^ .. From 3d335d098d576c571410780e453e85e0f471ef14 Mon Sep 17 00:00:00 2001 From: Raphael Koh Date: Fri, 24 Jul 2020 17:58:57 -0400 Subject: [PATCH 14/32] Make ResetAll a composite operation (#318) --- src/Simulation/QsharpCore/Intrinsic.cs | 12 ++++++++++ .../Simulators.Tests/RuntimeMetadataTests.cs | 24 ++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/src/Simulation/QsharpCore/Intrinsic.cs b/src/Simulation/QsharpCore/Intrinsic.cs index 76976a0f217..f7bbd4d953b 100644 --- a/src/Simulation/QsharpCore/Intrinsic.cs +++ b/src/Simulation/QsharpCore/Intrinsic.cs @@ -76,4 +76,16 @@ public partial class M return null; } } + + public partial class ResetAll + { + /// + public override RuntimeMetadata? GetRuntimeMetadata(IApplyData args) + { + var metadata = base.GetRuntimeMetadata(args); + if (metadata == null) throw new NullReferenceException($"Null RuntimeMetadata found for {this.ToString()}."); + metadata.IsComposite = true; + return metadata; + } + } } diff --git a/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs b/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs index d41b15764fa..a31849fe169 100644 --- a/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs +++ b/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs @@ -297,6 +297,28 @@ public void M() Assert.Equal(op.GetRuntimeMetadata(args), expected); } + [Fact] + public void Reset() + { + var target = new FreeQubit(0); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn(target); + var expected = new RuntimeMetadata() + { + Label = "Reset", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { target }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } + [Fact] public void ResetAll() { @@ -310,7 +332,7 @@ public void ResetAll() IsAdjoint = false, IsControlled = false, IsMeasurement = false, - IsComposite = false, + IsComposite = true, Children = null, Controls = new List() { }, Targets = targets, From 7d3d0f58914480b23b78cf799a514ae3412092b1 Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Mon, 27 Jul 2020 23:30:41 -0700 Subject: [PATCH 15/32] QDK build improvements. (#317) --- bootstrap.cmd | 14 ------ bootstrap.ps1 | 24 +++++++++ build/build.ps1 | 16 +++--- build/ci.yml | 38 +++++--------- build/manifest.ps1 | 18 +++---- build/steps-init.yml | 8 ++- build/steps-wrap-up.yml | 3 +- build/steps-xplat.yml | 50 ------------------- build/steps.yml | 3 +- build/test.ps1 | 21 ++++---- src/Simulation/Common/Simulators.Dev.props | 19 +++++-- .../CsharpGeneration/FindNuspecReferences.ps1 | 4 +- .../Simulators/FindNuspecReferences.ps1 | 4 +- .../Microsoft.Quantum.Simulators.csproj | 6 --- 14 files changed, 94 insertions(+), 134 deletions(-) create mode 100644 bootstrap.ps1 delete mode 100644 build/steps-xplat.yml diff --git a/bootstrap.cmd b/bootstrap.cmd index bceffe8091f..a7b49e63c01 100644 --- a/bootstrap.cmd +++ b/bootstrap.cmd @@ -12,9 +12,6 @@ git --version || GOTO missingGit :: Initialize C++ runtime project CALL :runtimeBootstrap || EXIT /B 1 -:: Initialize the compiler's nuspec file -CALL :nuspecBootstrap || EXIT /B 1 - :: Next steps are only needed for developers environment, they are skipped for cloud builds. IF NOT "%AGENT_ID%" == "" GOTO EOF @@ -33,17 +30,6 @@ popd EXIT /B -:: Bootstrap the compiler nuspec -:nuspecBootstrap -pushd src\Simulation\CsharpGeneration -CALL powershell -NoProfile .\FindNuspecReferences.ps1 || EXIT /B 1 -popd - -pushd src\Simulation\Simulators -CALL powershell -NoProfile .\FindNuspecReferences.ps1 || EXIT /B 1 -popd -EXIT /B - :missingGit echo. echo This script depends on git. diff --git a/bootstrap.ps1 b/bootstrap.ps1 new file mode 100644 index 00000000000..861a83f3f34 --- /dev/null +++ b/bootstrap.ps1 @@ -0,0 +1,24 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +$ErrorActionPreference = 'Stop' + +Push-Location (Join-Path $PSScriptRoot "src/Simulation/CsharpGeneration") + .\FindNuspecReferences.ps1 +Pop-Location + +Push-Location (Join-Path $PSScriptRoot "src/Simulation/Simulators") + .\FindNuspecReferences.ps1 +Pop-Location + +# bootstrap native folder +if ($Env:ENABLE_NATIVE -ne "false") { + ## Run the right script based on the OS. + if (-not (Test-Path Env:AGENT_OS) -or ($Env:AGENT_OS.StartsWith("Win"))) { + .\bootstrap.cmd + } else { + .\bootstrap.sh + } +} else { + Write-Host "Skipping native. ENABLE_NATIVE variable set to: $Env:ENABLE_NATIVE." +} \ No newline at end of file diff --git a/build/build.ps1 b/build/build.ps1 index 524c0895aa8..73bfd351d01 100644 --- a/build/build.ps1 +++ b/build/build.ps1 @@ -6,14 +6,18 @@ $ErrorActionPreference = 'Stop' & "$PSScriptRoot/set-env.ps1" $all_ok = $True -Write-Host "##[info]Build Native simulator" -cmake --build (Join-Path $PSScriptRoot "../src/Simulation/Native/build") --config $Env:BUILD_CONFIGURATION -if ($LastExitCode -ne 0) { - Write-Host "##vso[task.logissue type=error;]Failed to build Native simulator." - $script:all_ok = $False +if ($Env:ENABLE_NATIVE -ne "false") { + Write-Host "##[info]Build Native simulator" + $nativeBuild = (Join-Path $PSScriptRoot "../src/Simulation/Native/build") + cmake --build $nativeBuild --config $Env:BUILD_CONFIGURATION + if ($LastExitCode -ne 0) { + Write-Host "##vso[task.logissue type=error;]Failed to build Native simulator." + $script:all_ok = $False + } +} else { + Write-Host "Skipping native. ENABLE_NATIVE variable set to: $Env:ENABLE_NATIVE." } - function Build-One { param( [string]$action, diff --git a/build/ci.yml b/build/ci.yml index dc1942468d3..b274f861d26 100644 --- a/build/ci.yml +++ b/build/ci.yml @@ -9,34 +9,22 @@ variables: Drop.Native: $(System.DefaultWorkingDirectory)/xplat jobs: -- job: macOS - pool: - vmImage: 'macOS-latest' - steps: - - template: steps-xplat.yml - +- job: build + displayName: Build + strategy: + matrix: + linux: + imageName: 'ubuntu-latest' + mac: + imageName: 'macOS-latest' + windows: + imageName: 'windows-latest' + pool: + vmImage: $(imageName) -- job: Linux - pool: - vmImage: 'ubuntu-latest' steps: - - template: steps-xplat.yml - - -- job: Windows - pool: - vmImage: 'windows-2019' - dependsOn: - - macOS - - Linux - condition: succeeded() - steps: - - task: DownloadBuildArtifacts@0 - displayName: 'Download xplat native binaries' - inputs: - artifactName: xplat - downloadPath: $(System.DefaultWorkingDirectory) - template: steps.yml + - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 displayName: 'Component Detection' inputs: diff --git a/build/manifest.ps1 b/build/manifest.ps1 index 29ea070beb7..147f234a98c 100644 --- a/build/manifest.ps1 +++ b/build/manifest.ps1 @@ -16,15 +16,15 @@ ); Assemblies = @( ".\src\Azure\Azure.Quantum.Client\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Azure.Quantum.Client.dll", - ".\src\simulation\CsharpGeneration\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.CsharpGeneration.dll", - ".\src\simulation\CsharpGeneration.App\bin\$Env:BUILD_CONFIGURATION\netcoreapp3.1\Microsoft.Quantum.CsharpGeneration.App.dll", - ".\src\simulation\CsharpGeneration.App\bin\$Env:BUILD_CONFIGURATION\netcoreapp3.1\Microsoft.Quantum.RoslynWrapper.dll", - ".\src\simulation\Core\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Runtime.Core.dll", - ".\src\simulation\EntryPointDriver\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.EntryPointDriver.dll", - ".\src\simulation\QsharpCore\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.QSharp.Core.dll", - ".\src\simulation\Simulators\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Simulation.Common.dll", - ".\src\simulation\Simulators\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.dll", - ".\src\simulation\Simulators\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Simulators.dll", + ".\src\Simulation\CsharpGeneration\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.CsharpGeneration.dll", + ".\src\Simulation\CsharpGeneration.App\bin\$Env:BUILD_CONFIGURATION\netcoreapp3.1\Microsoft.Quantum.CsharpGeneration.App.dll", + ".\src\Simulation\CsharpGeneration.App\bin\$Env:BUILD_CONFIGURATION\netcoreapp3.1\Microsoft.Quantum.RoslynWrapper.dll", + ".\src\Simulation\Core\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Runtime.Core.dll", + ".\src\Simulation\EntryPointDriver\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.EntryPointDriver.dll", + ".\src\Simulation\QsharpCore\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.QSharp.Core.dll", + ".\src\Simulation\Simulators\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Simulation.Common.dll", + ".\src\Simulation\Simulators\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.dll", + ".\src\Simulation\Simulators\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Simulators.dll", ".\src\Xunit\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Xunit.dll" ) | ForEach-Object { Get-Item (Join-Path $PSScriptRoot (Join-Path ".." $_)) }; } | Write-Output; diff --git a/build/steps-init.yml b/build/steps-init.yml index 6c5d681bae7..694ba89302a 100644 --- a/build/steps-init.yml +++ b/build/steps-init.yml @@ -18,8 +18,6 @@ steps: ## # Bootstrap ## -- task: BatchScript@1 - displayName: 'Prepare build' - inputs: - filename: bootstrap.cmd - modifyEnvironment: true +- pwsh: ./bootstrap.ps1 + displayName: "Bootstrap repository" + workingDirectory: $(System.DefaultWorkingDirectory) diff --git a/build/steps-wrap-up.yml b/build/steps-wrap-up.yml index fb36f7194b8..9cf3a9957fc 100644 --- a/build/steps-wrap-up.yml +++ b/build/steps-wrap-up.yml @@ -12,7 +12,8 @@ steps: testRunTitle: 'Q# runtime tests' - task: PublishSymbols@1 - displayName: 'Publish symbols' + displayName: 'Publish symbols (Windows only)' + condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) continueOnError: true inputs: SearchPattern: '$(System.DefaultWorkingDirectory)/src/**/*.pdb' diff --git a/build/steps-xplat.yml b/build/steps-xplat.yml deleted file mode 100644 index 0af6e6d1300..00000000000 --- a/build/steps-xplat.yml +++ /dev/null @@ -1,50 +0,0 @@ -## -# xplat Native Simulator build -## -steps: - -- task: UseDotNet@2 - displayName: 'Use .NET Core SDK 3.1.100' - inputs: - packageType: sdk - version: '3.1.100' - - -- bash: ./bootstrap.sh - displayName: "Bootstrap repository" - workingDirectory: $(System.DefaultWorkingDirectory) - - -- powershell: ./build.ps1 - displayName: "Building Q# runtime" - workingDirectory: $(System.DefaultWorkingDirectory)/build - - -- powershell: ./test.ps1 - displayName: "Testing Q# runtime" - workingDirectory: $(System.DefaultWorkingDirectory)/build - condition: and(succeeded(), ne(variables['Skip.Tests'], 'true')) - - -- task: CopyFiles@2 - displayName: 'Copy Files to: artifact staging directory' - inputs: - SourceFolder: '$(System.DefaultWorkingDirectory)' - Contents: 'src/Simulation/Native/build/**' - TargetFolder: '$(Build.ArtifactStagingDirectory)' - - -- task: PublishTestResults@2 - displayName: 'Publish tests results' - condition: succeededOrFailed() - inputs: - testResultsFormat: VSTest - testResultsFiles: '$(System.DefaultWorkingDirectory)/**/*.trx' - testRunTitle: 'Q# xplat runtime tests' - - -- task: PublishBuildArtifacts@1 - displayName: 'Publish Artifact: xplat' - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - artifactName: xplat diff --git a/build/steps.yml b/build/steps.yml index 3b45dddd9eb..87da999f9e3 100644 --- a/build/steps.yml +++ b/build/steps.yml @@ -23,7 +23,8 @@ steps: - powershell: ./pack.ps1 - displayName: "Pack Q# runtime" + displayName: "Pack Q# runtime (Windows only)" + condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) workingDirectory: $(System.DefaultWorkingDirectory)/build diff --git a/build/test.ps1 b/build/test.ps1 index f66c42e0ad1..09e0e49fb9f 100644 --- a/build/test.ps1 +++ b/build/test.ps1 @@ -4,16 +4,19 @@ & "$PSScriptRoot/set-env.ps1" $all_ok = $True -Write-Host "##[info]Test Native simulator" -pushd (Join-Path $PSScriptRoot "../src/Simulation/Native/build") -cmake --build . --config $Env:BUILD_CONFIGURATION -ctest -C $Env:BUILD_CONFIGURATION -if ($LastExitCode -ne 0) { - Write-Host "##vso[task.logissue type=error;]Failed to test Native Simulator" - $script:all_ok = $False +if ($Env:ENABLE_NATIVE -ne "false") { + Write-Host "##[info]Test Native simulator" + pushd (Join-Path $PSScriptRoot "../src/Simulation/Native/build") + cmake --build . --config $Env:BUILD_CONFIGURATION + ctest -C $Env:BUILD_CONFIGURATION + if ($LastExitCode -ne 0) { + Write-Host "##vso[task.logissue type=error;]Failed to test Native Simulator" + $script:all_ok = $False + } + popd +} else { + Write-Host "Skipping native. ENABLE_NATIVE variable set to: $Env:ENABLE_NATIVE." } -popd - function Test-One { Param($project) diff --git a/src/Simulation/Common/Simulators.Dev.props b/src/Simulation/Common/Simulators.Dev.props index 2c93b5ab65e..7c44b437a38 100644 --- a/src/Simulation/Common/Simulators.Dev.props +++ b/src/Simulation/Common/Simulators.Dev.props @@ -5,14 +5,17 @@ bin\$(BuildConfiguration)\$(TargetFramework)\$(AssemblyName).xml $([MSBuild]::NormalizeDirectory($(MSBuildThisFileDirectory)..\..\..\)) $([MSBuild]::NormalizePath($(EnlistmentRoot)src/Simulation/Native/build/)) + + + $([MSBuild]::NormalizePath($(NativeBuildPath)/libMicrosoft.Quantum.Simulator.Runtime.dylib)) $([MSBuild]::NormalizePath($(NativeBuildPath)/libMicrosoft.Quantum.Simulator.Runtime.so)) $([MSBuild]::NormalizePath($(NativeBuildPath)/Release/Microsoft.Quantum.Simulator.Runtime.dll)) $([MSBuild]::NormalizePath($(NativeBuildPath)/Debug/Microsoft.Quantum.Simulator.Runtime.dll)) - $(QsimDllMac) - $(QsimDllLinux) - $(QsimDllWindowsRelease) - $(QsimDllWindowsDebug) + $(QsimDllMac) + $(QsimDllLinux) + $(QsimDllWindowsRelease) + $(QsimDllWindowsDebug) @@ -23,6 +26,14 @@ + + + Microsoft.Quantum.Simulator.Runtime.dll + PreserveNewest + false + + + diff --git a/src/Simulation/CsharpGeneration/FindNuspecReferences.ps1 b/src/Simulation/CsharpGeneration/FindNuspecReferences.ps1 index 0c3695812f9..f669dac1860 100644 --- a/src/Simulation/CsharpGeneration/FindNuspecReferences.ps1 +++ b/src/Simulation/CsharpGeneration/FindNuspecReferences.ps1 @@ -21,13 +21,13 @@ using namespace System.IO -$target = 'Microsoft.Quantum.CsharpGeneration.nuspec' +$target = Join-Path $PSScriptRoot 'Microsoft.Quantum.CsharpGeneration.nuspec' if (Test-Path $target) { Write-Host "$target exists. Skipping generating new one." exit } -$nuspec = [Xml](Get-Content 'Microsoft.Quantum.CsharpGeneration.nuspec.template') +$nuspec = [Xml](Get-Content (Join-Path $PSScriptRoot 'Microsoft.Quantum.CsharpGeneration.nuspec.template')) $dependencies = $nuspec.CreateElement('dependencies', $nuspec.package.metadata.NamespaceURI) # Adds a dependency to the dependencies element if it does not already exist. diff --git a/src/Simulation/Simulators/FindNuspecReferences.ps1 b/src/Simulation/Simulators/FindNuspecReferences.ps1 index a1fd46b8f2b..993f4b0948e 100644 --- a/src/Simulation/Simulators/FindNuspecReferences.ps1 +++ b/src/Simulation/Simulators/FindNuspecReferences.ps1 @@ -19,7 +19,7 @@ # nuget is tracking this problem at: https://github.com/NuGet/Home/issues/4491 ######################################## -$target = "Microsoft.Quantum.Simulators.nuspec" +$target = Join-Path $PSScriptRoot "Microsoft.Quantum.Simulators.nuspec" if (Test-Path $target) { Write-Host "$target exists. Skipping generating new one." @@ -28,7 +28,7 @@ if (Test-Path $target) { # Start with the nuspec template -$nuspec = [xml](Get-Content "Microsoft.Quantum.Simulators.nuspec.template") +$nuspec = [xml](Get-Content (Join-Path $PSScriptRoot "Microsoft.Quantum.Simulators.nuspec.template")) $dep = $nuspec.CreateElement('dependencies', $nuspec.package.metadata.NamespaceURI) function Add-PackageReferenceIfNew($ref) diff --git a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj index 50eef571a8b..98541863364 100644 --- a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj +++ b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj @@ -25,12 +25,6 @@ - - Microsoft.Quantum.Simulator.Runtime.dll - PreserveNewest - false - - runtimes\win-x64\native\%(RecursiveDir)%(FileName)%(Extension) PreserveNewest From 0fbdeab5cb50823b011e7878e4fa0188397f6ce6 Mon Sep 17 00:00:00 2001 From: Chris Granade Date: Tue, 28 Jul 2020 09:34:02 -0700 Subject: [PATCH 16/32] Make MaybeDisplayDiagnostic public. (#319) --- src/Simulation/Common/SimulatorBase.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Simulation/Common/SimulatorBase.cs b/src/Simulation/Common/SimulatorBase.cs index 41f566ea641..7d216c00edf 100644 --- a/src/Simulation/Common/SimulatorBase.cs +++ b/src/Simulation/Common/SimulatorBase.cs @@ -196,7 +196,10 @@ public void EnableExceptionPrinting() /// no guarantee is made as to any particular action taken as a result /// of calling this method. /// - protected void MaybeDisplayDiagnostic(object data) + /// + /// The diagnostic object to be displayed. + /// + public void MaybeDisplayDiagnostic(object data) { OnDisplayableDiagnostic?.Invoke(data); } From 8d6007590d2f136b425ad9ca6d43a6ca1cb47bcf Mon Sep 17 00:00:00 2001 From: Sasha <35849227+avasch01@users.noreply.github.com> Date: Tue, 4 Aug 2020 16:43:18 -0700 Subject: [PATCH 17/32] EncourageReuse option in QubitManager. (#320) * EncourageReuse option in QubitManager. Currently Qubit Manager tries to reuse released qubits as soon as possible and prefers it to allocating fresh unused ones. This is good for some scenarios, however, in other scenarios it may be preferrable to first allocate fresh unused qubits, and only then try to reuse released ones (oldest released first). Both behaviors are now possible via a backwards-compatible optional parameter in QubitManager constructor. * Review feedback * . --- src/Simulation/Common/QubitManager.cs | 37 +++++++- .../Common/QubitManagerTrackingScope.cs | 8 +- .../Simulators.Tests/QubitManagerTests.cs | 85 +++++++++++++++++++ 3 files changed, 125 insertions(+), 5 deletions(-) diff --git a/src/Simulation/Common/QubitManager.cs b/src/Simulation/Common/QubitManager.cs index bd19bdad338..a70651f5059 100644 --- a/src/Simulation/Common/QubitManager.cs +++ b/src/Simulation/Common/QubitManager.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; +using Microsoft.Quantum.Intrinsic; using Microsoft.Quantum.Simulation.Core; using Microsoft.Quantum.Simulation.Simulators.Exceptions; @@ -25,11 +26,13 @@ public class QubitManager long AllocatedForBorrowing; // All qubits allocated only for borrowing, will be marked with this number or higher. long[] qubits; // Tracks the allocation state of all qubits. long free; // Points to the first free (unallocated) qubit. + long freeTail; // Points to the last free (unallocated) qubit. Only valid iff (!EncourageReuse). long numAllocatedQubits; // Tracking this for optimization. long numDisabledQubits; // Number of disabled qubits. // Options bool MayExtendCapacity; + bool EncourageReuse; public bool DisableBorrowing { get; } const long MaxQubitCapacity = long.MaxValue - 3; @@ -49,9 +52,14 @@ public class QubitManager /// /// Creates and initializes QubitManager that can handle up to numQubits qubits /// - public QubitManager(long qubitCapacity, bool mayExtendCapacity = false, bool disableBorrowing = false) + public QubitManager( + long qubitCapacity, + bool mayExtendCapacity = false, + bool disableBorrowing = false, + bool encourageReuse = true) { MayExtendCapacity = mayExtendCapacity; + EncourageReuse = encourageReuse; DisableBorrowing = disableBorrowing; if (qubitCapacity <= 0) { qubitCapacity = MinQubitCapacity; } @@ -65,6 +73,7 @@ public QubitManager(long qubitCapacity, bool mayExtendCapacity = false, bool dis Debug.Assert(this.qubits[NumQubits - 1] == None); free = 0; + freeTail = NumQubits - 1; numAllocatedQubits = 0; numDisabledQubits = 0; } @@ -121,6 +130,7 @@ private void ExtendQubitArray() if (free == oldNone) { free = oldNumQubits; + freeTail = NumQubits - 1; } else { Debug.Assert(false, "Why do we extend an array, when we still have available slots?"); @@ -300,8 +310,29 @@ protected virtual void ReleaseOneQubit(Qubit qubit, bool usedOnlyForBorrowing) { throw new ArgumentException("Attempt to free qubit that has not been allocated."); } - qubits[qubit.Id] = free; - free = qubit.Id; + if (EncourageReuse) { + qubits[qubit.Id] = free; + free = qubit.Id; + } + else + { + // If we are allowed to extend capacity we will never reuse this qubit, + // otherwise we need to add it to the free qubits list. + if (!MayExtendCapacity) + { + if (qubits[freeTail] != None) + { + // There were no free qubits at all + free = qubit.Id; + } + else + { + qubits[freeTail] = qubit.Id; + } + } + qubits[qubit.Id] = None; + freeTail = qubit.Id; + } numAllocatedQubits--; Debug.Assert(numAllocatedQubits >= 0); diff --git a/src/Simulation/Common/QubitManagerTrackingScope.cs b/src/Simulation/Common/QubitManagerTrackingScope.cs index 23f654439de..a166f98bfa0 100644 --- a/src/Simulation/Common/QubitManagerTrackingScope.cs +++ b/src/Simulation/Common/QubitManagerTrackingScope.cs @@ -44,8 +44,12 @@ public List Locals private Stack operationStack; // Stack of operation calls. private StackFrame curFrame; // Current stack frame - all qubits in current scope are listed here. - public QubitManagerTrackingScope(long qubitCapacity, bool mayExtendCapacity = false, bool disableBorrowing = false) - : base(qubitCapacity, mayExtendCapacity, disableBorrowing) + public QubitManagerTrackingScope( + long qubitCapacity, + bool mayExtendCapacity = false, + bool disableBorrowing = false, + bool encourageReuse = true) + : base(qubitCapacity, mayExtendCapacity, disableBorrowing, encourageReuse) { if (!DisableBorrowing) { diff --git a/src/Simulation/Simulators.Tests/QubitManagerTests.cs b/src/Simulation/Simulators.Tests/QubitManagerTests.cs index a5f2123d0f2..8ee972883a8 100644 --- a/src/Simulation/Simulators.Tests/QubitManagerTests.cs +++ b/src/Simulation/Simulators.Tests/QubitManagerTests.cs @@ -152,6 +152,91 @@ public void TestQubitManager() } } + /// + /// Test for QubitManager. + /// + [Fact] + public void TestQubitManagerDiscouragingReuse() + { + { // BLOCK testing mayExtendCapacity:false + QubitManager qm = new QubitManager(10, mayExtendCapacity: false, disableBorrowing: false, encourageReuse: false); + + // Test allocation of single qubit + Qubit q1 = qm.Allocate(); + Assert.True(q1.Id == 0); + + // Test allocation of multiple qubits + IQArray qa1 = qm.Allocate(4); + Assert.True(qa1.Length == 4); + Assert.True(qa1[0].Id == 1); + Assert.True(qa1[1].Id == 2); + Assert.True(qa1[2].Id == 3); + Assert.True(qa1[3].Id == 4); + + // Test reuse of deallocated qubits + qm.Release(qa1[1]); + + Qubit q2 = qm.Allocate(); + Assert.True(q2.Id == 5); + + IQArray qa2 = qm.Allocate(3); + Assert.True(qa2.Length == 3); + Assert.True(qa2[0].Id == 6); + Assert.True(qa2[1].Id == 7); + Assert.True(qa2[2].Id == 8); + + qm.Release(qa2); + + Qubit q3 = qm.Allocate(); + Assert.True(q3.Id == 9); + + Qubit q4 = qm.Allocate(); + Assert.True(q4.Id == 2); + + Qubit q5 = qm.Allocate(); + Assert.True(q5.Id == 8); + } + + { // BLOCK testing mayExtendCapacity:true + QubitManager qm = new QubitManager(10, mayExtendCapacity: true, disableBorrowing: false, encourageReuse: false); + + // Test allocation of single qubit + Qubit q1 = qm.Allocate(); + Assert.True(q1.Id == 0); + + // Test allocation of multiple qubits + IQArray qa1 = qm.Allocate(4); + Assert.True(qa1.Length == 4); + Assert.True(qa1[0].Id == 1); + Assert.True(qa1[1].Id == 2); + Assert.True(qa1[2].Id == 3); + Assert.True(qa1[3].Id == 4); + + // Test reuse of deallocated qubits + qm.Release(qa1[1]); + + Qubit q2 = qm.Allocate(); + Assert.True(q2.Id == 5); + + IQArray qa2 = qm.Allocate(3); + Assert.True(qa2.Length == 3); + Assert.True(qa2[0].Id == 6); + Assert.True(qa2[1].Id == 7); + Assert.True(qa2[2].Id == 8); + + qm.Release(qa2); + + Qubit q3 = qm.Allocate(); + Assert.True(q3.Id == 9); + + Qubit q4 = qm.Allocate(); + Assert.True(q4.Id == 10); + + Qubit q5 = qm.Allocate(); + Assert.True(q5.Id == 11); + } + } + /// /// Test for QubitManagerTrackingScope. /// From b87c1c54121436f6389821e5eeccd8c7657ce90d Mon Sep 17 00:00:00 2001 From: Raphael Koh Date: Mon, 10 Aug 2020 18:15:55 -0400 Subject: [PATCH 18/32] Remove duplicate qubits from RuntimeMetadata.Targets (#324) --- src/Simulation/Core/Operations/Operation.cs | 14 +++++------ .../Circuits/RuntimeMetadataTest.qs | 4 +++ .../Simulators.Tests/RuntimeMetadataTests.cs | 25 +++++++++++++++++++ 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/src/Simulation/Core/Operations/Operation.cs b/src/Simulation/Core/Operations/Operation.cs index aba000d7765..6a20d69af6c 100644 --- a/src/Simulation/Core/Operations/Operation.cs +++ b/src/Simulation/Core/Operations/Operation.cs @@ -16,7 +16,7 @@ public partial interface ICallable : ICallable { O Apply(I args); - ICallable Partial

(Func mapper); + ICallable Partial

(Func mapper); } ///

@@ -34,7 +34,7 @@ public interface IOperationWrapper /// /// Type of input parameters. /// Type of return values. - [DebuggerTypeProxy(typeof(Operation<,>.DebuggerProxy))] + [DebuggerTypeProxy(typeof(Operation<,>.DebuggerProxy))] public abstract class Operation : AbstractCallable, ICallable { private Lazy> _adjoint; @@ -56,7 +56,7 @@ public Operation(IOperationFactory m) : base(m) public virtual IApplyData __dataIn(I data) => new QTuple(data); - + public virtual IApplyData __dataOut(O data) => new QTuple(data); [DebuggerBrowsable(DebuggerBrowsableState.Never)] @@ -83,7 +83,7 @@ public Operation(IOperationFactory m) : base(m) { Label = ((ICallable)this).Name, FormattedNonQubitArgs = args.GetNonQubitArgumentsAsString() ?? "", - Targets = args.GetQubits() ?? new List(), + Targets = args.GetQubits()?.Distinct() ?? new List(), }; public O Apply(I a) @@ -95,7 +95,7 @@ public O Apply(I a) this.Factory?.StartOperation(this, __dataIn(a)); __result__ = this.Body(a); } - catch( Exception e) + catch (Exception e) { this.Factory?.Fail(System.Runtime.ExceptionServices.ExceptionDispatchInfo.Capture(e)); throw; @@ -105,7 +105,7 @@ public O Apply(I a) this.Factory?.EndOperation(this, __dataOut(__result__)); } - return __result__; + return __result__; } public T Partial(object partialInfo) @@ -212,7 +212,7 @@ internal class DebuggerProxy { private Operation op; - public DebuggerProxy(Operation op) + public DebuggerProxy(Operation op) { this.op = op; } diff --git a/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs b/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs index b75e70fb7d5..4e721723832 100644 --- a/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs +++ b/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs @@ -26,5 +26,9 @@ namespace Microsoft.Quantum.Simulation.Simulators.Tests.Circuits { HOp(q); } } + + operation TwoQubitOp (q1 : Qubit, q2 : Qubit) : Unit { + // ... + } } diff --git a/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs b/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs index a31849fe169..e9f6e69e626 100644 --- a/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs +++ b/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs @@ -409,7 +409,10 @@ public void MResetZ() Assert.Equal(op.GetRuntimeMetadata(args), expected); } + } + public class CustomCircuitTests + { [Fact] public void EmptyOperation() { @@ -475,6 +478,28 @@ public void NestedOperation() Assert.Equal(op.GetRuntimeMetadata(args), expected); } + + [Fact] + public void DuplicateQubitArgs() + { + var q = new FreeQubit(0); + var op = new QuantumSimulator().Get(); + var args = op.__dataIn((q, q)); + var expected = new RuntimeMetadata() + { + Label = "TwoQubitOp", + FormattedNonQubitArgs = "", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { q }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } } public class UDTTests From 38d00d1a7380592eac9530c63989c1ada42cb18d Mon Sep 17 00:00:00 2001 From: "Stefan J. Wernli" Date: Thu, 13 Aug 2020 10:46:18 -0700 Subject: [PATCH 19/32] Fix asserts in QubitManager (#332) * Fix asserts in QubitManager * Remove asserts from QubitManager --- src/Simulation/Common/QubitManager.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Simulation/Common/QubitManager.cs b/src/Simulation/Common/QubitManager.cs index a70651f5059..9bc54dfce3d 100644 --- a/src/Simulation/Common/QubitManager.cs +++ b/src/Simulation/Common/QubitManager.cs @@ -104,7 +104,6 @@ private void ExtendQubitArray() { if (oldQubitsArray[i] == oldNone) { // Point to the first new (free) element - Debug.Assert(false,"Why do we extend an array, when we still have available slots?"); this.qubits[i] = oldNumQubits; } else if (oldQubitsArray[i] == oldAllocated) { // Allocated qubits are marked differently now. @@ -131,9 +130,6 @@ private void ExtendQubitArray() { free = oldNumQubits; freeTail = NumQubits - 1; - } else - { - Debug.Assert(false, "Why do we extend an array, when we still have available slots?"); } } From 477dfa854ce769e72ae2f0dd45fea1ed38ce3503 Mon Sep 17 00:00:00 2001 From: bettinaheim <34236215+bettinaheim@users.noreply.github.com> Date: Thu, 13 Aug 2020 15:24:50 -0700 Subject: [PATCH 20/32] Use processor architecture to determine what code needs to be generated (#331) --- .gitignore | 1 + Simulation.sln | 19 ++++++++ .../SimulationCodeTests.fs | 2 +- src/Simulation/CsharpGeneration/Context.fs | 7 ++- .../Microsoft.Quantum.CsharpGeneration.fsproj | 2 +- .../CsharpGeneration/SimulationCode.fs | 2 +- ....Simulation.QCTraceSimulatorRuntime.csproj | 2 +- .../Microsoft.Quantum.QSharp.Core.csproj | 2 +- src/Simulation/Simulators.Tests/CoreTests.cs | 14 ++++++ .../HoneywellExe/HoneywellExe.csproj | 2 +- .../TestProjects/IonQExe/IonQExe.csproj | 48 +++++++++---------- .../Library with Spaces.csproj | 6 +-- .../TestProjects/Library1/Library1.csproj | 2 +- .../TestProjects/Library2/Library2.csproj | 2 +- .../TestProjects/QCIExe/QCIExe.csproj | 48 +++++++++---------- .../TestProjects/QsharpExe/QsharpExe.csproj | 2 +- .../TestProjects/TargetedExe/Program.qs | 16 +++++++ .../TargetedExe/TargetedExe.csproj | 40 ++++++++++++++++ .../TestProjects/UnitTests/UnitTests.csproj | 2 +- .../Tests.Microsoft.Quantum.Simulators.csproj | 9 +++- .../Microsoft.Quantum.Simulators.csproj | 2 +- 21 files changed, 165 insertions(+), 65 deletions(-) create mode 100644 src/Simulation/Simulators.Tests/TestProjects/TargetedExe/Program.qs create mode 100644 src/Simulation/Simulators.Tests/TestProjects/TargetedExe/TargetedExe.csproj diff --git a/.gitignore b/.gitignore index 754c9b65976..354f05b9d0d 100644 --- a/.gitignore +++ b/.gitignore @@ -336,3 +336,4 @@ ASALocalRun/ # MFractors (Xamarin productivity tool) working folder .mfractor/ /src/Simulation/Simulators.Tests/TestProjects/QsharpExe/built +/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/built diff --git a/Simulation.sln b/Simulation.sln index b22a08046ff..045a3b2c1dc 100644 --- a/Simulation.sln +++ b/Simulation.sln @@ -63,6 +63,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IonQExe", "src\Simulation\S EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QCIExe", "src\Simulation\Simulators.Tests\TestProjects\QCIExe\QCIExe.csproj", "{C015FF41-9A51-4AF0-AEFC-2547D596B10A}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TargetedExe", "src\Simulation\Simulators.Tests\TestProjects\TargetedExe\TargetedExe.csproj", "{D292BF18-3956-4827-820E-254C3F81EF09}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -459,6 +461,22 @@ Global {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU {C015FF41-9A51-4AF0-AEFC-2547D596B10A}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.Debug|x64.ActiveCfg = Debug|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.Debug|x64.Build.0 = Debug|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.Release|Any CPU.Build.0 = Release|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.Release|x64.ActiveCfg = Release|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.Release|x64.Build.0 = Release|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + {D292BF18-3956-4827-820E-254C3F81EF09}.RelWithDebInfo|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -489,6 +507,7 @@ Global {1448512E-132F-4DA8-BCBA-D98F16B31600} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} {55833C6C-6E91-4413-9F77-96B3A09666B8} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} {C015FF41-9A51-4AF0-AEFC-2547D596B10A} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} + {D292BF18-3956-4827-820E-254C3F81EF09} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {929C0464-86D8-4F70-8835-0A5EAF930821} diff --git a/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs b/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs index de97e3aedc8..12605ed0603 100644 --- a/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs +++ b/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs @@ -2335,7 +2335,7 @@ namespace N1 let testOneClass (_,op : QsCallable) executionTarget (expected : string) = let expected = expected.Replace("%%%", HttpUtility.JavaScriptStringEncode op.SourceFile.Value) let assemblyConstants = - new System.Collections.Generic.KeyValuePair<_,_> (AssemblyConstants.ExecutionTarget, executionTarget) + new Collections.Generic.KeyValuePair<_,_> (AssemblyConstants.ProcessorArchitecture, executionTarget) |> Seq.singleton |> ImmutableDictionary.CreateRange let compilation = {Namespaces = syntaxTree; EntryPoints = ImmutableArray.Create op.FullName} diff --git a/src/Simulation/CsharpGeneration/Context.fs b/src/Simulation/CsharpGeneration/Context.fs index db612b799c3..fa80c982c4f 100644 --- a/src/Simulation/CsharpGeneration/Context.fs +++ b/src/Simulation/CsharpGeneration/Context.fs @@ -104,6 +104,11 @@ type CodegenContext = { static member public Create (syntaxTree : ImmutableArray) = CodegenContext.Create(syntaxTree, ImmutableDictionary.Empty) + member public this.ProcessorArchitecture = + match this.assemblyConstants.TryGetValue AssemblyConstants.ProcessorArchitecture with + | true, name -> name + | false, _ -> null + member public this.ExecutionTarget = match this.assemblyConstants.TryGetValue AssemblyConstants.ExecutionTarget with | true, name -> name @@ -116,7 +121,7 @@ type CodegenContext = { member internal this.GenerateCodeForSource (fileName : NonNullable) = let targetsQuantumProcessor = - match this.assemblyConstants.TryGetValue AssemblyConstants.ExecutionTarget with + match this.assemblyConstants.TryGetValue AssemblyConstants.ProcessorArchitecture with | true, target -> target = AssemblyConstants.HoneywellProcessor || target = AssemblyConstants.IonQProcessor || target = AssemblyConstants.QCIProcessor | _ -> false not (fileName.Value.EndsWith ".dll") || targetsQuantumProcessor diff --git a/src/Simulation/CsharpGeneration/Microsoft.Quantum.CsharpGeneration.fsproj b/src/Simulation/CsharpGeneration/Microsoft.Quantum.CsharpGeneration.fsproj index 59d46b17145..dddbbf8c3bb 100644 --- a/src/Simulation/CsharpGeneration/Microsoft.Quantum.CsharpGeneration.fsproj +++ b/src/Simulation/CsharpGeneration/Microsoft.Quantum.CsharpGeneration.fsproj @@ -21,7 +21,7 @@ - + diff --git a/src/Simulation/CsharpGeneration/SimulationCode.fs b/src/Simulation/CsharpGeneration/SimulationCode.fs index 30d8bcdd95a..15dfcdf5dfd 100644 --- a/src/Simulation/CsharpGeneration/SimulationCode.fs +++ b/src/Simulation/CsharpGeneration/SimulationCode.fs @@ -927,7 +927,7 @@ module SimulationCode = /// Returns a static property of type OperationInfo using the operation's input and output types. let buildOperationInfoProperty (globalContext:CodegenContext) operationInput operationOutput operationName = let propertyType = - match globalContext.ExecutionTarget with + match globalContext.ProcessorArchitecture with | target when target = AssemblyConstants.HoneywellProcessor -> sprintf "HoneywellEntryPointInfo<%s, %s>" operationInput operationOutput | target when target = AssemblyConstants.IonQProcessor -> sprintf "IonQEntryPointInfo<%s, %s>" operationInput operationOutput | target when target = AssemblyConstants.QCIProcessor -> sprintf "QCIEntryPointInfo<%s, %s>" operationInput operationOutput diff --git a/src/Simulation/QCTraceSimulator.Tests/Tests.Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj b/src/Simulation/QCTraceSimulator.Tests/Tests.Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj index 4bbaca22c96..74cf526a2da 100644 --- a/src/Simulation/QCTraceSimulator.Tests/Tests.Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj +++ b/src/Simulation/QCTraceSimulator.Tests/Tests.Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/QsharpCore/Microsoft.Quantum.QSharp.Core.csproj b/src/Simulation/QsharpCore/Microsoft.Quantum.QSharp.Core.csproj index 93ea0e58438..d6c929018e1 100644 --- a/src/Simulation/QsharpCore/Microsoft.Quantum.QSharp.Core.csproj +++ b/src/Simulation/QsharpCore/Microsoft.Quantum.QSharp.Core.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/Simulators.Tests/CoreTests.cs b/src/Simulation/Simulators.Tests/CoreTests.cs index 185351df696..88917ff4c24 100644 --- a/src/Simulation/Simulators.Tests/CoreTests.cs +++ b/src/Simulation/Simulators.Tests/CoreTests.cs @@ -43,6 +43,20 @@ public void BasicExecution() Assert.Empty(error.ToString().Trim()); } + [Fact] + public void BasicExecutionTargetedExe() + { + var asmPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + var exe = Path.Combine(asmPath, "TestTargetedExe", "TargetedExe.dll"); + + ProcessRunner.Run("dotnet", exe, out StringBuilder output, out StringBuilder error, out int exitCode, out Exception ex); + + Assert.Null(ex); + Assert.Equal(0, exitCode); + Assert.Empty(error.ToString().Trim()); + Assert.Equal("TargetedExe", output.ToString().Trim()); + } + [Fact] public void Borrowing() { diff --git a/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj index 4e966759f8d..2556f1ae507 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj @@ -1,4 +1,4 @@ - + Library diff --git a/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj index c9278c38294..c625e48ab23 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj @@ -1,25 +1,25 @@ - - - - Library - netcoreapp3.1 - - false - false - false - true - ionq.qpu - - - - - - - - - - - - - + + + + Library + netcoreapp3.1 + + false + false + false + true + ionq.qpu + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/Library with Spaces/Library with Spaces.csproj b/src/Simulation/Simulators.Tests/TestProjects/Library with Spaces/Library with Spaces.csproj index 89f9b7e7bf4..f8f5cffa07f 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/Library with Spaces/Library with Spaces.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/Library with Spaces/Library with Spaces.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 false @@ -12,9 +12,7 @@ - + diff --git a/src/Simulation/Simulators.Tests/TestProjects/Library1/Library1.csproj b/src/Simulation/Simulators.Tests/TestProjects/Library1/Library1.csproj index 2da5c023bb3..2714be57fcf 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/Library1/Library1.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/Library1/Library1.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 diff --git a/src/Simulation/Simulators.Tests/TestProjects/Library2/Library2.csproj b/src/Simulation/Simulators.Tests/TestProjects/Library2/Library2.csproj index 2da5c023bb3..2714be57fcf 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/Library2/Library2.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/Library2/Library2.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 diff --git a/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj index fb279f5a569..dce291568b6 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj @@ -1,25 +1,25 @@ - - - - Library - netcoreapp3.1 - - false - false - false - true - qci.qpu - - - - - - - - - - - - - + + + + Library + netcoreapp3.1 + + false + false + false + true + qci.qpu + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/QsharpExe/QsharpExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/QsharpExe/QsharpExe.csproj index 85fe87c7403..6ac84ace635 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/QsharpExe/QsharpExe.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/QsharpExe/QsharpExe.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/Program.qs b/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/Program.qs new file mode 100644 index 00000000000..c08b6d4188b --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/Program.qs @@ -0,0 +1,16 @@ +namespace Microsoft.Quantum.Testing.Honeywell.Monomorphization { + + open Microsoft.Quantum.Intrinsic; + open Microsoft.Quantum.Measurement; + open Microsoft.Quantum.Canon; + + @EntryPoint() + operation CallGenerics() : String { + + let arr = Default(); + using (qs = Qubit[2]) { + Ignore(Measure([PauliX, PauliX], qs)); + return "TargetedExe"; + } + } +} diff --git a/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/TargetedExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/TargetedExe.csproj new file mode 100644 index 00000000000..f70061d4f60 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/TargetedExe.csproj @@ -0,0 +1,40 @@ + + + + Exe + netcoreapp3.1 + + false + false + false + honeywell.qpu + + + + + + + + + + + + + + + + + <_ExeDir>$(MSBuildThisFileDirectory)built + + + + + + + + <_ExeFiles Include="$(OutputPath)*" /> + + + + + \ No newline at end of file diff --git a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj index cff781acc39..ee89aad55fd 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/src/Simulation/Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj b/src/Simulation/Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj index 4396deac881..01ba825325e 100644 --- a/src/Simulation/Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj +++ b/src/Simulation/Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj @@ -1,4 +1,4 @@ - + @@ -23,6 +23,9 @@ false + + false + @@ -38,12 +41,16 @@ <_ExeDir>$(MSBuildThisFileDirectory)TestProjects\QsharpExe\built\ + <_TargetedExeDir>$(MSBuildThisFileDirectory)TestProjects\TargetedExe\built\ <_ExeFiles Include="$(_ExeDir)*" /> + <_TargetedExeFiles Include="$(_TargetedExeDir)*" /> + + diff --git a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj index 98541863364..794bb15909b 100644 --- a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj +++ b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj @@ -1,4 +1,4 @@ - + From 5de1e41a84a08437c914953280e0935ce0817ef1 Mon Sep 17 00:00:00 2001 From: "Stefan J. Wernli" Date: Thu, 13 Aug 2020 20:43:19 -0700 Subject: [PATCH 21/32] Protect simulator accessors via shared lock (#336) * Protect simulator accessors via shared lock This fixes an intermittent crash by putting shared locks around the access of the `psis` vector, where create and destroy use an exclusive lock of the same mutex Fixes #335 * Fix factory_test.hpp * Make sure returned ptr is the same one --- src/Simulation/Native/src/simulator/capi.cpp | 38 +++++++++---------- .../Native/src/simulator/factory.cpp | 27 ++++++++----- .../Native/src/simulator/factory.hpp | 3 +- .../Native/src/simulator/factory_test.cpp | 2 +- 4 files changed, 38 insertions(+), 32 deletions(-) diff --git a/src/Simulation/Native/src/simulator/capi.cpp b/src/Simulation/Native/src/simulator/capi.cpp index 5f081acb159..344445f46c4 100644 --- a/src/Simulation/Native/src/simulator/capi.cpp +++ b/src/Simulation/Native/src/simulator/capi.cpp @@ -21,13 +21,13 @@ MICROSOFT_QUANTUM_DECL void destroy(_In_ unsigned id) MICROSOFT_QUANTUM_DECL void seed(_In_ unsigned id, _In_ unsigned s) { - psis[id]->seed(s); + Microsoft::Quantum::Simulator::get(id)->seed(s); } // non-quantum MICROSOFT_QUANTUM_DECL std::size_t random_choice(_In_ unsigned id, _In_ std::size_t n, _In_reads_(n) double* p) { - return psis[id]->random(n, p); + return Microsoft::Quantum::Simulator::get(id)->random(n, p); } MICROSOFT_QUANTUM_DECL double JointEnsembleProbability(_In_ unsigned id, _In_ unsigned n, _In_reads_(n) int* b, _In_reads_(n) unsigned* q) @@ -36,35 +36,35 @@ MICROSOFT_QUANTUM_DECL double JointEnsembleProbability(_In_ unsigned id, _In_ un for (unsigned i = 0; i < n; ++i) bv.push_back(static_cast(*(b + i))); std::vector qv(q, q + n); - return psis[id]->JointEnsembleProbability( bv, qv); + return Microsoft::Quantum::Simulator::get(id)->JointEnsembleProbability( bv, qv); } MICROSOFT_QUANTUM_DECL void allocateQubit(_In_ unsigned id, _In_ unsigned q) { - psis[id]->allocateQubit(q); + Microsoft::Quantum::Simulator::get(id)->allocateQubit(q); } MICROSOFT_QUANTUM_DECL void release(_In_ unsigned id, _In_ unsigned q) { - psis[id]->release(q); + Microsoft::Quantum::Simulator::get(id)->release(q); } MICROSOFT_QUANTUM_DECL unsigned num_qubits(_In_ unsigned id) { - return psis[id]->num_qubits(); + return Microsoft::Quantum::Simulator::get(id)->num_qubits(); } #define FWDGATE1(G) \ MICROSOFT_QUANTUM_DECL void G(_In_ unsigned id, _In_ unsigned q) \ { \ - psis[id]->G(q); \ + Microsoft::Quantum::Simulator::get(id)->G(q); \ } #define FWDCSGATE1(G) \ MICROSOFT_QUANTUM_DECL void MC##G(_In_ unsigned id, _In_ unsigned n, _In_reads_(n) unsigned* c, _In_ unsigned q) \ { \ std::vector vc(c, c + n); \ - psis[id]->C##G(vc, q); \ + Microsoft::Quantum::Simulator::get(id)->C##G(vc, q); \ } #define FWD(G) FWDGATE1(G) FWDCSGATE1(G) @@ -88,14 +88,14 @@ FWD(AdjT) MICROSOFT_QUANTUM_DECL void R(_In_ unsigned id, _In_ unsigned b, _In_ double phi, _In_ unsigned q) { - psis[id]->R(static_cast(b), phi, q); + Microsoft::Quantum::Simulator::get(id)->R(static_cast(b), phi, q); } // multi-controlled rotations MICROSOFT_QUANTUM_DECL void MCR(_In_ unsigned id, _In_ unsigned b, _In_ double phi, _In_ unsigned nc, _In_reads_(nc) unsigned* c, _In_ unsigned q) { std::vector cv(c, c + nc); - psis[id]->CR(static_cast(b), phi, cv, q); + Microsoft::Quantum::Simulator::get(id)->CR(static_cast(b), phi, cv, q); } // Exponential of Pauli operators @@ -105,7 +105,7 @@ MICROSOFT_QUANTUM_DECL void Exp(_In_ unsigned id, _In_ unsigned n, _In_reads_(n) for (unsigned i = 0; i < n; ++i) bv.push_back(static_cast(*(b + i))); std::vector qv(q, q + n); - psis[id]->Exp(bv, phi, qv); + Microsoft::Quantum::Simulator::get(id)->Exp(bv, phi, qv); } MICROSOFT_QUANTUM_DECL void MCExp(_In_ unsigned id, _In_ unsigned n, _In_reads_(n) unsigned* b, _In_ double phi, _In_ unsigned nc, _In_reads_(nc) unsigned* c, _In_reads_(n) unsigned* q) { @@ -114,13 +114,13 @@ MICROSOFT_QUANTUM_DECL void MCExp(_In_ unsigned id, _In_ unsigned n, _In_reads_( bv.push_back(static_cast(*(b + i))); std::vector qv(q, q + n); std::vector cv(c, c + nc); - psis[id]->CExp(bv, phi, cv, qv); + Microsoft::Quantum::Simulator::get(id)->CExp(bv, phi, cv, qv); } // measurements MICROSOFT_QUANTUM_DECL unsigned M(_In_ unsigned id, _In_ unsigned q) { - return (unsigned)psis[id]->M(q); + return (unsigned)Microsoft::Quantum::Simulator::get(id)->M(q); } MICROSOFT_QUANTUM_DECL unsigned Measure(_In_ unsigned id, _In_ unsigned n, _In_reads_(n) unsigned* b, _In_reads_(n) unsigned* q) { @@ -128,7 +128,7 @@ MICROSOFT_QUANTUM_DECL unsigned Measure(_In_ unsigned id, _In_ unsigned n, _In_r for (unsigned i = 0; i < n; ++i) bv.push_back(static_cast(*(b + i))); std::vector qv(q, q + n); - return (unsigned)psis[id]->Measure(bv, qv); + return (unsigned)Microsoft::Quantum::Simulator::get(id)->Measure(bv, qv); } // apply permutation of basis states to the wave function @@ -136,33 +136,33 @@ MICROSOFT_QUANTUM_DECL void PermuteBasis(_In_ unsigned id, _In_ unsigned n, _In_ _In_reads_(table_size) std::size_t *permutation_table) { const std::vector qs(q, q + n); - psis[id]->permuteBasis(qs, table_size, permutation_table, false); + Microsoft::Quantum::Simulator::get(id)->permuteBasis(qs, table_size, permutation_table, false); } MICROSOFT_QUANTUM_DECL void AdjPermuteBasis(_In_ unsigned id, _In_ unsigned n, _In_reads_(n) unsigned* q, _In_ std::size_t table_size, _In_reads_(table_size) std::size_t *permutation_table) { const std::vector qs(q, q + n); - psis[id]->permuteBasis(qs, table_size, permutation_table, true); + Microsoft::Quantum::Simulator::get(id)->permuteBasis(qs, table_size, permutation_table, true); } // dump wavefunction to given callback until callback returns false MICROSOFT_QUANTUM_DECL void Dump(_In_ unsigned id, _In_ bool (*callback)(size_t, double, double)) { - psis[id]->dump(callback); + Microsoft::Quantum::Simulator::get(id)->dump(callback); } // dump the wavefunction of the subset of qubits to the given callback returns false MICROSOFT_QUANTUM_DECL bool DumpQubits(_In_ unsigned id, _In_ unsigned n, _In_reads_(n) unsigned* q, _In_ bool(*callback)(size_t, double, double)) { std::vector qs(q, q + n); - return psis[id]->dumpQubits(qs, callback); + return Microsoft::Quantum::Simulator::get(id)->dumpQubits(qs, callback); } // dump the list of logical qubit ids to given callback MICROSOFT_QUANTUM_DECL void DumpIds(_In_ unsigned id, _In_ void(*callback)(unsigned)) { - psis[id]->dumpIds(callback); + Microsoft::Quantum::Simulator::get(id)->dumpIds(callback); } } diff --git a/src/Simulation/Native/src/simulator/factory.cpp b/src/Simulation/Native/src/simulator/factory.cpp index 6d46fbcf7f7..b80b02b35f6 100644 --- a/src/Simulation/Native/src/simulator/factory.cpp +++ b/src/Simulation/Native/src/simulator/factory.cpp @@ -5,6 +5,7 @@ #include "config.hpp" #include "util/cpuid.hpp" #include +#include namespace Microsoft { @@ -31,7 +32,8 @@ namespace Microsoft { namespace Simulator { - mutex_type _mutex; + std::shared_mutex _mutex; + std::vector> _psis; SimulatorInterface* createSimulator(unsigned maxlocal) { @@ -52,26 +54,26 @@ namespace Microsoft MICROSOFT_QUANTUM_DECL unsigned create(unsigned maxlocal) { - std::lock_guard lock(_mutex); + std::lock_guard lock(_mutex); size_t emptySlot = -1; - for (auto const& s : psis) + for (auto const& s : _psis) { if (s == NULL) { - emptySlot = &s - &psis[0]; + emptySlot = &s - &_psis[0]; break; } } if (emptySlot == -1) { - psis.push_back(std::shared_ptr(createSimulator(maxlocal))); - emptySlot = psis.size() - 1; + _psis.push_back(std::shared_ptr(createSimulator(maxlocal))); + emptySlot = _psis.size() - 1; } else { - psis[emptySlot] = std::shared_ptr(createSimulator(maxlocal)); + _psis[emptySlot] = std::shared_ptr(createSimulator(maxlocal)); } return static_cast(emptySlot); @@ -79,12 +81,17 @@ namespace Microsoft MICROSOFT_QUANTUM_DECL void destroy(unsigned id) { - std::lock_guard lock(_mutex); + std::lock_guard lock(_mutex); - psis[id].reset(); + _psis[id].reset(); } - MICROSOFT_QUANTUM_DECL std::vector> psis; + MICROSOFT_QUANTUM_DECL std::shared_ptr& get(unsigned id) + { + std::shared_lock shared_lock(_mutex); + + return _psis[id]; + } } } diff --git a/src/Simulation/Native/src/simulator/factory.hpp b/src/Simulation/Native/src/simulator/factory.hpp index ec9d097fc8a..979b4a3b052 100644 --- a/src/Simulation/Native/src/simulator/factory.hpp +++ b/src/Simulation/Native/src/simulator/factory.hpp @@ -12,8 +12,7 @@ namespace Microsoft { MICROSOFT_QUANTUM_DECL unsigned create(unsigned =0u); MICROSOFT_QUANTUM_DECL void destroy(unsigned); - - extern MICROSOFT_QUANTUM_DECL std::vector> psis; + MICROSOFT_QUANTUM_DECL std::shared_ptr& get(unsigned); } } } diff --git a/src/Simulation/Native/src/simulator/factory_test.cpp b/src/Simulation/Native/src/simulator/factory_test.cpp index 6c196205713..d4745fa2d90 100644 --- a/src/Simulation/Native/src/simulator/factory_test.cpp +++ b/src/Simulation/Native/src/simulator/factory_test.cpp @@ -8,7 +8,7 @@ using namespace Microsoft::Quantum::Simulator; int main(int argc, char** argv) { - auto& sim = psis[create()]; + auto sim = get(create()); unsigned q=0; // qubit number sim->allocateQubit(q); From 898be5632bbd2d8ec87faa3ae96187c73f7ba0a9 Mon Sep 17 00:00:00 2001 From: "Stefan J. Wernli" Date: Fri, 14 Aug 2020 00:16:21 -0700 Subject: [PATCH 22/32] Fixing circuit in test_gates to be deterministic (#338) * Fixing circuit in test_gates to be deterministic `test_gates` in capi_test.cpp had a low but non-zero chance of measuring One instead of Zero, resulting in a test crash due to assertion failure. This rearranges the instructions to ensure the test correctly unprepares the state so that measurement is as deterministic as possible. Fixes #262 * use a more interesting circuit --- src/Simulation/Native/src/simulator/capi_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Simulation/Native/src/simulator/capi_test.cpp b/src/Simulation/Native/src/simulator/capi_test.cpp index feb725db2fa..82a2ad1b47a 100644 --- a/src/Simulation/Native/src/simulator/capi_test.cpp +++ b/src/Simulation/Native/src/simulator/capi_test.cpp @@ -115,7 +115,7 @@ void test_gates() CRx(sim_id, 1.0, 0, 1); H(sim_id, 1); - CRx(sim_id, -1.0, 0, 1); + CRz(sim_id, -1.0, 0, 1); H(sim_id, 1); assert(M(sim_id, 1)==false); From d264e26ef5d50a5f5922497b4b9da4a43fec2085 Mon Sep 17 00:00:00 2001 From: Scott Carda <55811729+ScottCarda-MS@users.noreply.github.com> Date: Fri, 14 Aug 2020 10:22:37 -0700 Subject: [PATCH 23/32] Slice Bug Fix (#330) * Replaced the nullable member access with regular member access for C# generated Slice. --- .../SimulationCodeTests.fs | 20 +++++++-------- .../CsharpGeneration/SimulationCode.fs | 2 +- .../Simulators.Tests/Circuits/Issue132.qs | 25 +++++++++++++++++++ 3 files changed, 36 insertions(+), 11 deletions(-) create mode 100644 src/Simulation/Simulators.Tests/Circuits/Issue132.qs diff --git a/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs b/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs index 12605ed0603..3c4cb093f9f 100644 --- a/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs +++ b/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs @@ -1242,7 +1242,7 @@ namespace N1 "X.Apply(qubits.Data[0L]);" "X.Adjoint.Apply(qubits.Data[0L]);" - "X.Controlled.Apply((qubits.Data?.Slice(new QRange(1L,5L)), qubits.Data[0L]));" + "X.Controlled.Apply((qubits.Data.Slice(new QRange(1L,5L)), qubits.Data[0L]));" "call_target1.Apply((1L, X, X, X, X));" "call_target1.Apply((1L, plain.Data, adj.Data, ctr.Data, uni.Data));" @@ -1820,7 +1820,7 @@ namespace N1 "var r5 = (IQArray)QArray.Create((4L + 2L));" "var r6 = QArray.Create(r5.Length);" "var r7 = (IQArray)QArray.Add(r2, r4);" - "var r8 = (IQArray)r7?.Slice(new QRange(1L, 5L, 10L));" + "var r8 = (IQArray)r7.Slice(new QRange(1L, 5L, 10L));" "var r9 = new arrays_T1(new QArray(Pauli.PauliX, Pauli.PauliY));" "var r10 = (IQArray)QArray.Create(4L);" @@ -1828,8 +1828,8 @@ namespace N1 "var r12 = (IQArray)QArray.Create(r10.Length);" "var r13 = new arrays_T3(new QArray>(new QArray(Result.Zero, Result.One), new QArray(Result.One, Result.Zero)));" "var r14 = (IQArray)QArray.Add(qubits, register.Data);" - "var r15 = (IQArray)register.Data?.Slice(new QRange(0L, 2L));" - "var r16 = (IQArray)qubits?.Slice(new QRange(1L, -(1L)));" + "var r15 = (IQArray)register.Data.Slice(new QRange(0L, 2L));" + "var r16 = (IQArray)qubits.Slice(new QRange(1L, -(1L)));" "var r18 = (IQArray)QArray.Create(2L);" "var r19 = (IQArray)QArray.Create(7L);" "var i0 = r13.Data[0L][1L];" @@ -1860,12 +1860,12 @@ namespace N1 "var r2 = new QRange(10L,-(2L),0L);" "var ranges = (IQArray)QArray.Create(1L);" - "var s1 = (IQArray)qubits?.Slice(new QRange(0L,10L));" - "var s2 = (IQArray)qubits?.Slice(r2);" - "var s3 = (IQArray)qubits?.Slice(ranges[3L]);" - "var s4 = (IQArray)qubits?.Slice(GetMeARange.Apply(QVoid.Instance));" + "var s1 = (IQArray)qubits.Slice(new QRange(0L,10L));" + "var s2 = (IQArray)qubits.Slice(r2);" + "var s3 = (IQArray)qubits.Slice(ranges[3L]);" + "var s4 = (IQArray)qubits.Slice(GetMeARange.Apply(QVoid.Instance));" - "return qubits?.Slice(new QRange(10L,-(3L),0L));" + "return qubits.Slice(new QRange(10L,-(3L),0L));" ] |> testOneBody (applyVisitor sliceOperations) @@ -3529,7 +3529,7 @@ namespace Microsoft.Quantum.Tests.LineNumbers else { #line 20 "%%" - foreach (var c in ctrls?.Slice(new QRange(0L, 2L, r))) + foreach (var c in ctrls.Slice(new QRange(0L, 2L, r))) #line hidden { #line 21 "%%" diff --git a/src/Simulation/CsharpGeneration/SimulationCode.fs b/src/Simulation/CsharpGeneration/SimulationCode.fs index 15dfcdf5dfd..c4bd932bf03 100644 --- a/src/Simulation/CsharpGeneration/SimulationCode.fs +++ b/src/Simulation/CsharpGeneration/SimulationCode.fs @@ -561,7 +561,7 @@ module SimulationCode = and buildArrayItem a i = match i.ResolvedType.Resolution with - | Range -> ``invoke`` ((buildExpression a) <|?.|> (``ident`` "Slice")) ``(`` [ (buildExpression i) ] ``)`` + | Range -> ``invoke`` ((buildExpression a) <|.|> (``ident`` "Slice")) ``(`` [ (buildExpression i) ] ``)`` | _ -> ``item`` (buildExpression a) [ (buildExpression i) ] let buildBlock (block : QsScope) = diff --git a/src/Simulation/Simulators.Tests/Circuits/Issue132.qs b/src/Simulation/Simulators.Tests/Circuits/Issue132.qs new file mode 100644 index 00000000000..9b57996913a --- /dev/null +++ b/src/Simulation/Simulators.Tests/Circuits/Issue132.qs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +namespace Microsoft.Quantum.Simulation.Simulators.Tests.Circuits +{ + open Microsoft.Quantum.Intrinsic; + + operation SliceGenerationTest() : Unit { + using (qs = Qubit[4]) { + PrepareCatState(qs); + if (M(qs[0]) == One) { + for (target in qs) { + X(target); + } + } + } + } + + operation PrepareCatState(register : Qubit[]) : Unit is Adj + Ctl { + H(register[0]); + for (target in register[1...]) { + CNOT(register[0], target); + } + } +} From c0b5f70e9b4f3434717a9d99467f26a56c8f89f4 Mon Sep 17 00:00:00 2001 From: "Stefan J. Wernli" Date: Mon, 17 Aug 2020 00:07:55 -0700 Subject: [PATCH 24/32] Fixing capi_test use of Pauli basis (#340) --- src/Simulation/Native/src/simulator/capi_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Simulation/Native/src/simulator/capi_test.cpp b/src/Simulation/Native/src/simulator/capi_test.cpp index 82a2ad1b47a..945127e260d 100644 --- a/src/Simulation/Native/src/simulator/capi_test.cpp +++ b/src/Simulation/Native/src/simulator/capi_test.cpp @@ -23,12 +23,12 @@ void CZ(unsigned sim_id, unsigned c, unsigned q) void Ry(unsigned sim_id, double phi, unsigned q) { - R(sim_id,2,phi,q); + R(sim_id,3,phi,q); } void CRz(unsigned sim_id, double phi, unsigned c, unsigned q) { - MCR(sim_id,3,phi,1,&c,q); + MCR(sim_id,2,phi,1,&c,q); } void CRx(unsigned sim_id, double phi, unsigned c, unsigned q) From 8d11a6f29a1044a8e5bece8e4180cbddb7b4b748 Mon Sep 17 00:00:00 2001 From: Raphael Koh Date: Mon, 17 Aug 2020 17:29:29 -0400 Subject: [PATCH 25/32] Fix stackoverflow error in GetNonQubitArgsAsString for QArray args (#341) --- src/Simulation/Core/TypeExtensions.cs | 15 ++++++++----- .../Circuits/RuntimeMetadataTest.qs | 4 ++++ .../Simulators.Tests/RuntimeMetadataTests.cs | 22 +++++++++++++++++++ .../Simulators.Tests/TypeExtensionsTest.cs | 3 +++ 4 files changed, 38 insertions(+), 6 deletions(-) diff --git a/src/Simulation/Core/TypeExtensions.cs b/src/Simulation/Core/TypeExtensions.cs index 59cb0370b52..6b7722fc234 100644 --- a/src/Simulation/Core/TypeExtensions.cs +++ b/src/Simulation/Core/TypeExtensions.cs @@ -165,12 +165,6 @@ public static Type[] GetTupleFieldTypes(this Type arg) return op.Name; } - // If object is an IApplyData, recursively extract arguments - if (o is IApplyData data) - { - return data.Value?.GetNonQubitArgumentsAsString(); - } - // If object is a string, enclose it in quotations if (o is string s) { @@ -197,6 +191,15 @@ public static Type[] GetTupleFieldTypes(this Type arg) return (items.Any()) ? $"({string.Join(", ", items)})" : null; } + // If object is an IApplyData, recursively extract arguments + if (o is IApplyData data) + { + if (data.Value != data) + { + return data.Value?.GetNonQubitArgumentsAsString(); + } + } + // Otherwise, return argument as a string return (o != null) ? o.ToString() : null; } diff --git a/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs b/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs index 4e721723832..5836a3426f5 100644 --- a/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs +++ b/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs @@ -30,5 +30,9 @@ namespace Microsoft.Quantum.Simulation.Simulators.Tests.Circuits { operation TwoQubitOp (q1 : Qubit, q2 : Qubit) : Unit { // ... } + + operation BoolArrayOp (bits : Bool[]) : Unit { + // ... + } } diff --git a/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs b/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs index e9f6e69e626..a84d4d76423 100644 --- a/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs +++ b/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs @@ -500,6 +500,28 @@ public void DuplicateQubitArgs() Assert.Equal(op.GetRuntimeMetadata(args), expected); } + + [Fact] + public void QArrayArgs() + { + var op = new QuantumSimulator().Get(); + IQArray bits = new QArray(new bool[] { false, true }); + var args = op.__dataIn(bits); + var expected = new RuntimeMetadata() + { + Label = "BoolArrayOp", + FormattedNonQubitArgs = "[False, True]", + IsAdjoint = false, + IsControlled = false, + IsMeasurement = false, + IsComposite = false, + Children = null, + Controls = new List() { }, + Targets = new List() { }, + }; + + Assert.Equal(op.GetRuntimeMetadata(args), expected); + } } public class UDTTests diff --git a/src/Simulation/Simulators.Tests/TypeExtensionsTest.cs b/src/Simulation/Simulators.Tests/TypeExtensionsTest.cs index a7942f7f110..2707ca2b150 100644 --- a/src/Simulation/Simulators.Tests/TypeExtensionsTest.cs +++ b/src/Simulation/Simulators.Tests/TypeExtensionsTest.cs @@ -94,6 +94,9 @@ public void ArrayTypes() (new FreeQubit(1), "bar"), }; Assert.Equal("[(\"foo\"), (\"bar\")]", qTupleArr.GetNonQubitArgumentsAsString()); + + var qArrayBool = new QArray(new[] { false, true }); + Assert.Equal("[False, True]", qArrayBool.GetNonQubitArgumentsAsString()); } [Fact] From b69e9a9e7adf3bd2b856ab2f64fc9dc15bb097be Mon Sep 17 00:00:00 2001 From: "Stefan J. Wernli" Date: Mon, 17 Aug 2020 18:42:39 -0700 Subject: [PATCH 26/32] Fixing namespace references with global:: (#346) Fixes Code generation failure when mapping Q# namespaces to C# namespaces #46 --- .../SimulationCodeTests.fs | 48 +++++++++---------- src/Simulation/CsharpGeneration/EntryPoint.fs | 2 +- .../CsharpGeneration/SimulationCode.fs | 2 +- .../Simulators.Tests/Circuits/Namespaces.qs | 22 +++++++++ 4 files changed, 48 insertions(+), 26 deletions(-) create mode 100644 src/Simulation/Simulators.Tests/Circuits/Namespaces.qs diff --git a/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs b/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs index 3c4cb093f9f..7de7c97eb5a 100644 --- a/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs +++ b/src/Simulation/CsharpGeneration.Tests/SimulationCodeTests.fs @@ -878,27 +878,27 @@ namespace N1 |> testOne genU2 [ - template "Allocate" "Allocate" "Microsoft.Quantum.Intrinsic.Allocate" - template "MicrosoftQuantumIntrinsicH" "IUnitary" "Microsoft.Quantum.Intrinsic.H" + template "Allocate" "Allocate" "global::Microsoft.Quantum.Intrinsic.Allocate" + template "MicrosoftQuantumIntrinsicH" "IUnitary" "global::Microsoft.Quantum.Intrinsic.H" template "H" "ICallable" "H" - template "Release" "Release" "Microsoft.Quantum.Intrinsic.Release" - template "MicrosoftQuantumOverridesemptyFunction" "ICallable" "Microsoft.Quantum.Overrides.emptyFunction" + template "Release" "Release" "global::Microsoft.Quantum.Intrinsic.Release" + template "MicrosoftQuantumOverridesemptyFunction" "ICallable" "global::Microsoft.Quantum.Overrides.emptyFunction" template "emptyFunction" "ICallable" "emptyFunction" ] |> testOne duplicatedDefinitionsCaller [ - template "Allocate" "Allocate" "Microsoft.Quantum.Intrinsic.Allocate" - template "CNOT" "IAdjointable<(Qubit, Qubit)>" "Microsoft.Quantum.Intrinsic.CNOT" - template "MicrosoftQuantumTestingHold" "ICallable" "Microsoft.Quantum.Testing.Hold<>" - template "Release" "Release" "Microsoft.Quantum.Intrinsic.Release" + template "Allocate" "Allocate" "global::Microsoft.Quantum.Intrinsic.Allocate" + template "CNOT" "IAdjointable<(Qubit, Qubit)>" "global::Microsoft.Quantum.Intrinsic.CNOT" + template "MicrosoftQuantumTestingHold" "ICallable" "global::Microsoft.Quantum.Testing.Hold<>" + template "Release" "Release" "global::Microsoft.Quantum.Intrinsic.Release" template "ResultToString" "ICallable" "ResultToString" - template "X" "IUnitary" "Microsoft.Quantum.Intrinsic.X" + template "X" "IUnitary" "global::Microsoft.Quantum.Intrinsic.X" template "genIter" "IUnitary" "genIter<>" template "genMapper" "ICallable" "genMapper<,>" template "genU1" "IUnitary" "genU1<>" - template "MicrosoftQuantumTestingnoOpGeneric" "IUnitary" "Microsoft.Quantum.Testing.noOpGeneric<>" - template "MicrosoftQuantumTestingnoOpResult" "IUnitary" "Microsoft.Quantum.Testing.noOpResult" + template "MicrosoftQuantumTestingnoOpGeneric" "IUnitary" "global::Microsoft.Quantum.Testing.noOpGeneric<>" + template "MicrosoftQuantumTestingnoOpResult" "IUnitary" "global::Microsoft.Quantum.Testing.noOpResult" ] |> testOne usesGenerics @@ -908,7 +908,7 @@ namespace N1 |> testOne callsGenericWithMultipleTypeParams [ - template "Z" "IUnitary" "Microsoft.Quantum.Intrinsic.Z" + template "Z" "IUnitary" "global::Microsoft.Quantum.Intrinsic.Z" "this.self = this;" ] |> testOne selfInvokingOperation @@ -930,17 +930,17 @@ namespace N1 let template = sprintf "typeof(%s)" [ - template "Microsoft.Quantum.Intrinsic.Allocate" - template "Microsoft.Quantum.Intrinsic.CNOT" - template "Microsoft.Quantum.Testing.Hold<>" - template "Microsoft.Quantum.Intrinsic.Release" + template "global::Microsoft.Quantum.Intrinsic.Allocate" + template "global::Microsoft.Quantum.Intrinsic.CNOT" + template "global::Microsoft.Quantum.Testing.Hold<>" + template "global::Microsoft.Quantum.Intrinsic.Release" template "ResultToString" - template "Microsoft.Quantum.Intrinsic.X" + template "global::Microsoft.Quantum.Intrinsic.X" template "genIter<>" template "genMapper<,>" template "genU1<>" - template "Microsoft.Quantum.Testing.noOpGeneric<>" - template "Microsoft.Quantum.Testing.noOpResult" + template "global::Microsoft.Quantum.Testing.noOpGeneric<>" + template "global::Microsoft.Quantum.Testing.noOpResult" ] |> List.sort |> testOne usesGenerics @@ -961,7 +961,7 @@ namespace N1 |> testOne genRecursion [ - template "Microsoft.Quantum.Intrinsic.Z" + template "global::Microsoft.Quantum.Intrinsic.Z" template "selfInvokingOperation" ] |> testOne selfInvokingOperation @@ -2465,7 +2465,7 @@ namespace N1 public override void Init() { - this.X = this.Factory.Get>(typeof(Microsoft.Quantum.Intrinsic.X)); + this.X = this.Factory.Get>(typeof(global::Microsoft.Quantum.Intrinsic.X)); } public override IApplyData __dataIn(Qubit data) => data; @@ -3563,9 +3563,9 @@ namespace Microsoft.Quantum.Tests.LineNumbers ; public override void Init() { - this.Allocate = this.Factory.Get(typeof(Microsoft.Quantum.Intrinsic.Allocate)); - this.Release = this.Factory.Get(typeof(Microsoft.Quantum.Intrinsic.Release)); - this.X = this.Factory.Get>(typeof(Microsoft.Quantum.Intrinsic.X)); + this.Allocate = this.Factory.Get(typeof(global::Microsoft.Quantum.Intrinsic.Allocate)); + this.Release = this.Factory.Get(typeof(global::Microsoft.Quantum.Intrinsic.Release)); + this.X = this.Factory.Get>(typeof(global::Microsoft.Quantum.Intrinsic.X)); } public override IApplyData __dataIn(Int64 data) => new QTuple(data); diff --git a/src/Simulation/CsharpGeneration/EntryPoint.fs b/src/Simulation/CsharpGeneration/EntryPoint.fs index f359f26f1f3..5ac2196043b 100644 --- a/src/Simulation/CsharpGeneration/EntryPoint.fs +++ b/src/Simulation/CsharpGeneration/EntryPoint.fs @@ -112,7 +112,7 @@ let private createArgument context entryPoint = /// A tuple of the callable's name, argument type name, and return type name. let private callableTypeNames context (callable : QsCallable) = - let callableName = sprintf "%s.%s" callable.FullName.Namespace.Value callable.FullName.Name.Value + let callableName = sprintf "global::%s.%s" callable.FullName.Namespace.Value callable.FullName.Name.Value let argTypeName = SimulationCode.roslynTypeName context callable.Signature.ArgumentType let returnTypeName = SimulationCode.roslynTypeName context callable.Signature.ReturnType callableName, argTypeName, returnTypeName diff --git a/src/Simulation/CsharpGeneration/SimulationCode.fs b/src/Simulation/CsharpGeneration/SimulationCode.fs index c4bd932bf03..dd853127c13 100644 --- a/src/Simulation/CsharpGeneration/SimulationCode.fs +++ b/src/Simulation/CsharpGeneration/SimulationCode.fs @@ -856,7 +856,7 @@ module SimulationCode = let getTypeOfOp context (n: QsQualifiedName) = let name = let sameNamespace = match context.current with | None -> false | Some o -> o.Namespace = n.Namespace - let opName = if sameNamespace then n.Name.Value else n.Namespace.Value + "." + n.Name.Value + let opName = if sameNamespace then n.Name.Value else "global::" + n.Namespace.Value + "." + n.Name.Value if isGeneric context n then let signature = context.allCallables.[n].Signature let count = signature.TypeParameters.Length diff --git a/src/Simulation/Simulators.Tests/Circuits/Namespaces.qs b/src/Simulation/Simulators.Tests/Circuits/Namespaces.qs new file mode 100644 index 00000000000..59f3c17d802 --- /dev/null +++ b/src/Simulation/Simulators.Tests/Circuits/Namespaces.qs @@ -0,0 +1,22 @@ +// // Copyright (c) Microsoft Corporation. All rights reserved. +// // Licensed under the MIT License. + +// Will cause compilation failure if callable type references in generated C# aren't +// prepended with "global::". +namespace Issue46 { + + operation ReturnZero () : Result { + + return Zero; + } + +} + +namespace Microsoft.Quantum.Tests.Namespaces.Issue46 { + + operation TestOp () : Result { + + return Issue46.ReturnZero(); + } + +} From 50df7b39cd2f81a69a6749f7214c47a43f08bed0 Mon Sep 17 00:00:00 2001 From: Sarah Marshall <33814365+samarsha@users.noreply.github.com> Date: Tue, 18 Aug 2020 10:05:09 -0700 Subject: [PATCH 27/32] Use culture-dependent string for decimals in RuntimeMetadataTests (#339) --- src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs b/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs index a84d4d76423..2d8ee9a75cd 100644 --- a/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs +++ b/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs @@ -262,7 +262,7 @@ public void Ry() var expected = new RuntimeMetadata() { Label = "Ry", - FormattedNonQubitArgs = "(2.1)", + FormattedNonQubitArgs = "(" + 2.1 + ")", IsAdjoint = false, IsControlled = false, IsMeasurement = false, @@ -535,7 +535,7 @@ public void FooUDTOp() var expected = new RuntimeMetadata() { Label = "FooUDTOp", - FormattedNonQubitArgs = "(\"bar\", (2.1))", + FormattedNonQubitArgs = "(\"bar\", (" + 2.1 + "))", IsAdjoint = false, IsControlled = false, IsMeasurement = false, @@ -782,7 +782,7 @@ public void PartialRy() var expected = new RuntimeMetadata() { Label = "Ry", - FormattedNonQubitArgs = "(2.1)", + FormattedNonQubitArgs = "(" + 2.1 + ")", IsAdjoint = false, IsControlled = false, IsMeasurement = false, @@ -805,7 +805,7 @@ public void PartialUDT() var expected = new RuntimeMetadata() { Label = "FooUDT", - FormattedNonQubitArgs = "(\"bar\", (2.1))", + FormattedNonQubitArgs = "(\"bar\", (" + 2.1 + "))", IsAdjoint = false, IsControlled = false, IsMeasurement = false, From 56476fe21085d5422c4a30d098e3949baa4b8df5 Mon Sep 17 00:00:00 2001 From: Chris Granade Date: Tue, 18 Aug 2020 14:30:47 -0700 Subject: [PATCH 28/32] Improvements to Microsoft.Quantum.Random namespace (#328) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Initial Q# API for new Random namespace * Consolidate RNG logic in SimulatorBase. * Consolidate RNG logic in Toffoli simulator as well. * Fix build errors. * Fix typo in previous commit. * Adapt namespaces in test project. * One more namespace fix. * Started some API documentation comments. * Add more API docs and tests. * Fix open statements. * Fix SampleNBits. * Update src/Simulation/Common/SimulatorBase.cs Co-authored-by: Mathias Soeken * Update src/Simulation/Common/SimulatorBase.cs Co-authored-by: Mathias Soeken * Update src/Simulation/QsharpCore/Random/Convienence.qs Co-authored-by: Mathias Soeken * Update src/Simulation/QsharpCore/Random/Types.qs Co-authored-by: Mathias Soeken * API docs, review feedback, more tests. * fixed typo * Added missing open. * Add another missing open. * Discrete → continuous * Split out intrinsic tests to avoid duplicated types. * Fix off by one error in unit tests. * Added a little bit more testing. * A bit more testing. * Avoid depending on Delay. * Break down tests a bit more. * Fix categorical tests. * Update src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/IntrinsicTests.csproj Co-authored-by: Mathias Soeken * Update src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/Random/Tests.qs Co-authored-by: Mathias Soeken * Update src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/Random/Tests.qs Co-authored-by: Mathias Soeken Co-authored-by: Mathias Soeken --- Simulation.sln | 30 +++ src/Simulation/Common/Extensions.cs | 52 ++++ src/Simulation/Common/SimulatorBase.cs | 62 ++++- .../QsharpCore/Diagnostics/Facts.qs | 51 ++++ .../Diagnostics/Properties/NamespaceInfo.qs | 7 + src/Simulation/QsharpCore/Intrinsic.qs | 21 +- .../QsharpCore/Random/Convienence.qs | 115 ++++++++ src/Simulation/QsharpCore/Random/Internal.qs | 12 + src/Simulation/QsharpCore/Random/Intrinsic.qs | 62 +++++ src/Simulation/QsharpCore/Random/Normal.qs | 54 ++++ src/Simulation/QsharpCore/Random/Types.qs | 123 +++++++++ src/Simulation/QsharpCore/Random/Uniform.qs | 71 +++++ .../Simulators.Tests/OperationsTestHelper.cs | 2 +- .../QuantumSimulatorTests/VerifyGates.cs | 2 +- .../IntrinsicTests/IntrinsicTests.csproj | 31 +++ .../IntrinsicTests/Random/Tests.qs | 250 ++++++++++++++++++ .../QCTraceSimulator.Primitive.random.cs | 2 +- .../QCTraceSimulator/QCTraceSimulatorImpl.cs | 2 - .../QuantumProcessorDispatcher.cs | 13 +- .../Simulators/QuantumProcessor/random.cs | 2 +- .../QuantumSimulator/QuantumSimulator.cs | 15 +- .../Simulators/ToffoliSimulator/Random.cs | 31 +-- 22 files changed, 944 insertions(+), 66 deletions(-) create mode 100644 src/Simulation/QsharpCore/Diagnostics/Facts.qs create mode 100644 src/Simulation/QsharpCore/Diagnostics/Properties/NamespaceInfo.qs create mode 100644 src/Simulation/QsharpCore/Random/Convienence.qs create mode 100644 src/Simulation/QsharpCore/Random/Internal.qs create mode 100644 src/Simulation/QsharpCore/Random/Intrinsic.qs create mode 100644 src/Simulation/QsharpCore/Random/Normal.qs create mode 100644 src/Simulation/QsharpCore/Random/Types.qs create mode 100644 src/Simulation/QsharpCore/Random/Uniform.qs create mode 100644 src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/IntrinsicTests.csproj create mode 100644 src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/Random/Tests.qs diff --git a/Simulation.sln b/Simulation.sln index 045a3b2c1dc..265863d4ce3 100644 --- a/Simulation.sln +++ b/Simulation.sln @@ -65,6 +65,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QCIExe", "src\Simulation\Si EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TargetedExe", "src\Simulation\Simulators.Tests\TestProjects\TargetedExe\TargetedExe.csproj", "{D292BF18-3956-4827-820E-254C3F81EF09}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{EBDE31D8-BB73-4E7E-B035-DE92657F3700}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Simulation", "Simulation", "{5497B844-8266-4B66-B51B-AE26148E9F78}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Simulators.Tests", "Simulators.Tests", "{C64D5562-CF69-4FF0-8A44-19FE8BEB8CE4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestProjects", "TestProjects", "{877C3E74-5533-4517-8EB1-CA24EBAB4A25}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IntrinsicTests", "src\Simulation\Simulators.Tests\TestProjects\IntrinsicTests\IntrinsicTests.csproj", "{D5D41201-101F-4C0D-B6A0-201D8FC3AB91}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -477,6 +487,22 @@ Global {D292BF18-3956-4827-820E-254C3F81EF09}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU {D292BF18-3956-4827-820E-254C3F81EF09}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU {D292BF18-3956-4827-820E-254C3F81EF09}.RelWithDebInfo|x64.Build.0 = Release|Any CPU + {D5D41201-101F-4C0D-B6A0-201D8FC3AB91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D5D41201-101F-4C0D-B6A0-201D8FC3AB91}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D5D41201-101F-4C0D-B6A0-201D8FC3AB91}.Debug|x64.ActiveCfg = Debug|Any CPU + {D5D41201-101F-4C0D-B6A0-201D8FC3AB91}.Debug|x64.Build.0 = Debug|Any CPU + {D5D41201-101F-4C0D-B6A0-201D8FC3AB91}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {D5D41201-101F-4C0D-B6A0-201D8FC3AB91}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU + {D5D41201-101F-4C0D-B6A0-201D8FC3AB91}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {D5D41201-101F-4C0D-B6A0-201D8FC3AB91}.MinSizeRel|x64.Build.0 = Debug|Any CPU + {D5D41201-101F-4C0D-B6A0-201D8FC3AB91}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D5D41201-101F-4C0D-B6A0-201D8FC3AB91}.Release|Any CPU.Build.0 = Release|Any CPU + {D5D41201-101F-4C0D-B6A0-201D8FC3AB91}.Release|x64.ActiveCfg = Release|Any CPU + {D5D41201-101F-4C0D-B6A0-201D8FC3AB91}.Release|x64.Build.0 = Release|Any CPU + {D5D41201-101F-4C0D-B6A0-201D8FC3AB91}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU + {D5D41201-101F-4C0D-B6A0-201D8FC3AB91}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU + {D5D41201-101F-4C0D-B6A0-201D8FC3AB91}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU + {D5D41201-101F-4C0D-B6A0-201D8FC3AB91}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -508,6 +534,10 @@ Global {55833C6C-6E91-4413-9F77-96B3A09666B8} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} {C015FF41-9A51-4AF0-AEFC-2547D596B10A} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} {D292BF18-3956-4827-820E-254C3F81EF09} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} + {5497B844-8266-4B66-B51B-AE26148E9F78} = {EBDE31D8-BB73-4E7E-B035-DE92657F3700} + {C64D5562-CF69-4FF0-8A44-19FE8BEB8CE4} = {5497B844-8266-4B66-B51B-AE26148E9F78} + {877C3E74-5533-4517-8EB1-CA24EBAB4A25} = {C64D5562-CF69-4FF0-8A44-19FE8BEB8CE4} + {D5D41201-101F-4C0D-B6A0-201D8FC3AB91} = {877C3E74-5533-4517-8EB1-CA24EBAB4A25} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {929C0464-86D8-4F70-8835-0A5EAF930821} diff --git a/src/Simulation/Common/Extensions.cs b/src/Simulation/Common/Extensions.cs index c3e3e00cb87..b36867a7388 100644 --- a/src/Simulation/Common/Extensions.cs +++ b/src/Simulation/Common/Extensions.cs @@ -49,5 +49,57 @@ where op.IsSubclassOf(typeof(T)) factory.Register(op.BaseType, op); } } + + internal static long NextLongBelow(this System.Random random, long upperExclusive) + { + // Don't allow sampling non-positive numbers, so that we don't break + // Math.Log2. + if (upperExclusive <= 0) + { + throw new ArgumentException( + $"Must be positive, got {upperExclusive}.", + nameof(upperExclusive) + ); + } + long SampleNBits(int nBits) + { + // Note that we can assume that nBytes is never more than 8, + // since we got there by looking at the bit length of + // upperExclusive, which is itself a 64-bit integer. + var nBytes = (nBits + 7) / 8; + var nExcessBits = nBytes * 8 - nBits; + var bytes = new byte[nBytes]; + random.NextBytes(bytes); + + // ToInt64 requires an array of exactly eight bytes. + // We can use IsLittleEndian to check which side we + // need to pad on to get there. + var padded = new byte[8]; + bytes.CopyTo(padded, + // ToInt64 requires an array of exactly eight bytes. + // We can use IsLittleEndian to check which side we + // need to pad on to get there. + System.BitConverter.IsLittleEndian + ? 0 + : 8 - nBytes + ); + return System.BitConverter.ToInt64(padded) >> nExcessBits; + }; + + var nBits = (int) (System.Math.Log(upperExclusive, 2) + 1); + var sample = SampleNBits(nBits); + while (sample >= upperExclusive) + { + sample = SampleNBits(nBits); + } + return sample; + } + + internal static long NextLong(this System.Random random, long lower, long upper) + { + var delta = upper - lower; + return lower + random.NextLongBelow(delta + 1); + } + } } diff --git a/src/Simulation/Common/SimulatorBase.cs b/src/Simulation/Common/SimulatorBase.cs index 7d216c00edf..bdb125468bf 100644 --- a/src/Simulation/Common/SimulatorBase.cs +++ b/src/Simulation/Common/SimulatorBase.cs @@ -31,6 +31,13 @@ public abstract class SimulatorBase : AbstractFactory, IOperat public event Action? OnLog = null; public event Action>? OnException = null; + + protected readonly int randomSeed; + protected readonly Lazy randomGenerator; + public int Seed => randomSeed; + protected System.Random RandomGenerator => randomGenerator.Value; + + /// /// An event fired whenever a simulator has additional diagnostic data @@ -55,8 +62,12 @@ public abstract class SimulatorBase : AbstractFactory, IOperat /// public StackFrame[]? CallStack { get; private set; } - public SimulatorBase(IQubitManager? qubitManager = null) + public SimulatorBase(IQubitManager? qubitManager = null, int? seed = null) { + this.randomSeed = seed ?? Guid.NewGuid().GetHashCode(); + this.randomGenerator = new Lazy( + () => new System.Random(Seed) + ); this.QubitManager = qubitManager; this.InitBuiltinOperations(this.GetType()); @@ -420,6 +431,55 @@ public GetQubitsAvailableToBorrow(SimulatorBase m) : base(m) sim.QubitManager.GetFreeQubitsCount(); } + /// + /// Implements the DrawRandomInt operation from the + /// Microsoft.Quantum.Random namespace. + /// + public class DrawRandomInt : Random.DrawRandomInt + { + private SimulatorBase sim; + + public DrawRandomInt(SimulatorBase m) : base(m) + { + sim = m; + } + + public override Func<(long, long), long> Body => arg => + { + var (min, max) = arg; + if (max <= min) + { + throw new ExecutionFailException($"Max must be greater than min, but {max} <= {min}."); + } + return sim.RandomGenerator.NextLong(min, max); + }; + } + + /// + /// Implements the DrawRandomInt operation from the + /// Microsoft.Quantum.Random namespace. + /// + public class DrawRandomDouble : Random.DrawRandomDouble + { + private SimulatorBase sim; + + public DrawRandomDouble(SimulatorBase m) : base(m) + { + sim = m; + } + + public override Func<(double, double), double> Body => arg => + { + var (min, max) = arg; + if (max <= min) + { + throw new ExecutionFailException($"Max must be greater than min, but {max} <= {min}."); + } + var delta = max - min; + return min + delta * sim.RandomGenerator.NextDouble(); + }; + } + public virtual void StartOperation(ICallable operation, IApplyData inputValue) { OnOperationStart?.Invoke(operation, inputValue); diff --git a/src/Simulation/QsharpCore/Diagnostics/Facts.qs b/src/Simulation/QsharpCore/Diagnostics/Facts.qs new file mode 100644 index 00000000000..846a65d22cf --- /dev/null +++ b/src/Simulation/QsharpCore/Diagnostics/Facts.qs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +namespace Microsoft.Quantum.Diagnostics { + + /// # Summary + /// Declares that a classical condition is true. + /// + /// # Input + /// ## actual + /// The condition to be declared. + /// ## message + /// Failure message string to be printed in the case that the classical + /// condition is false. + /// + /// # See Also + /// - Microsoft.Quantum.Diagnostics.Contradiction + /// + /// # Example + /// The following Q# snippet will fail: + /// ```Q# + /// Fact(false, "Expected true."); + /// ``` + function Fact(actual : Bool, message : String) : Unit { + if (not actual) { fail message; } + } + + /// # Summary + /// Declares that a classical condition is false. + /// + /// # Input + /// ## actual + /// The condition to be declared. + /// ## message + /// Failure message string to be printed in the case that the classical + /// condition is true. + /// + /// # See Also + /// - Microsoft.Quantum.Diagnostics.Fact + /// + /// # Example + /// The following Q# code will print "Hello, world": + /// ```Q# + /// Contradiction(2 == 3, "2 is not equal to 3."); + /// Message("Hello, world."); + /// ``` + function Contradiction(actual : Bool, message : String) : Unit { + if (actual) { fail message; } + } + +} diff --git a/src/Simulation/QsharpCore/Diagnostics/Properties/NamespaceInfo.qs b/src/Simulation/QsharpCore/Diagnostics/Properties/NamespaceInfo.qs new file mode 100644 index 00000000000..60ad51909db --- /dev/null +++ b/src/Simulation/QsharpCore/Diagnostics/Properties/NamespaceInfo.qs @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/// # Summary +/// This namespace contains functions and operations useful for diagnostic +/// purposes, including assert operations and claim functions. +namespace Microsoft.Quantum.Diagnostics {} diff --git a/src/Simulation/QsharpCore/Intrinsic.qs b/src/Simulation/QsharpCore/Intrinsic.qs index 92980459031..0a22cb388f1 100644 --- a/src/Simulation/QsharpCore/Intrinsic.qs +++ b/src/Simulation/QsharpCore/Intrinsic.qs @@ -5,27 +5,10 @@ namespace Microsoft.Quantum.Intrinsic { open Microsoft.Quantum.Math; open Microsoft.Quantum.Convert; - /// # Summary - /// The random operation takes an array of doubles as input, and returns - /// a randomly-selected index into the array as an `Int`. - /// The probability of selecting a specific index is proportional to the value - /// of the array element at that index. - /// Array elements that are equal to zero are ignored and their indices are never - /// returned. If any array element is less than zero, - /// or if no array element is greater than zero, then the operation fails. - /// - /// # Input - /// ## probs - /// An array of floating-point numbers proportional to the probability of - /// selecting each index. - /// - /// # Output - /// An integer $i$ with probability $\Pr(i) = p_i / \sum_i p_i$, where $p_i$ - /// is the $i$th element of `probs`. + @Deprecated("Microsoft.Quantum.Random.DrawCategorical") operation Random (probs : Double[]) : Int { body intrinsic; - } - + } @Deprecated("Microsoft.Quantum.Diagnostics.AssertMeasurement") operation Assert (bases : Pauli[], qubits : Qubit[], result : Result, msg : String) : Unit diff --git a/src/Simulation/QsharpCore/Random/Convienence.qs b/src/Simulation/QsharpCore/Random/Convienence.qs new file mode 100644 index 00000000000..aa35dc082c5 --- /dev/null +++ b/src/Simulation/QsharpCore/Random/Convienence.qs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +namespace Microsoft.Quantum.Random { + open Microsoft.Quantum.Intrinsic; + open Microsoft.Quantum.Math; + open Microsoft.Quantum.Diagnostics; + + /// # Summary + /// Draws a random sample from a categorical distribution specified by a + /// list of probablities. + /// + /// # Description + /// The probability of selecting a specific index is proportional to the value + /// of the array element at that index. + /// Array elements that are equal to zero are ignored and their indices are never + /// returned. If any array element is less than zero, + /// or if no array element is greater than zero, then the operation fails. + /// + /// # Input + /// ## probs + /// An array of floating-point numbers proportional to the probability of + /// selecting each index. + /// + /// # Output + /// An integer $i$ with probability $\Pr(i) = p_i / \sum_i p_i$, where $p_i$ + /// is the $i$th element of `probs`. + /// + /// # See Also + /// - Microsoft.Quantum.Random.CategoricalDistribution + operation DrawCategorical(probs : Double[]) : Int { + // There are nicer ways of doing this, but they require the full + // standard library to be available. + mutable sum = 0.0; + for (prob in probs) { + Fact(prob >= 0.0, "Probabilities must be positive."); + set sum += prob; + } + + let variate = DrawRandomDouble(0.0, sum); + mutable acc = 0.0; + for (idx in 0..Length(probs) - 1) { + set acc += probs[idx]; + if (variate <= acc) { + return idx; + } + } + + return Length(probs) - 1; + } + + /// # Summary + /// Draws a random Pauli value. + /// + /// # Output + /// Either `PauliI`, `PauliX`, `PauliY`, or `PauliZ` with equal + /// probability. + operation DrawRandomPauli() : Pauli { + return [PauliI, PauliX, PauliY, PauliZ][DrawRandomInt(0, 3)]; + } + + /// # Summary + /// Given an array of data and an a distribution over its indices, + /// attempts to choose an element at random. + /// + /// # Input + /// ## data + /// The array from which an element should be chosen. + /// ## indexDistribution + /// A distribution over the indices of `data`. + /// + /// # Ouput + /// A tuple `(succeeded, element)` where `succeeded` is `true` if and only + /// if the sample chosen from `indexDistribution` was a valid index into + /// `data`, and where `element` is an element of `data` chosen at random. + /// + /// # Example + /// The following Q# snippet chooses an element at random from an array: + /// ```Q# + /// let (succeeded, element) = MaybeChooseElement( + /// data, + /// DiscreteUniformDistribution(0, Length(data) - 1) + /// ); + /// Fact(succeeded, "Index chosen by MaybeChooseElement was not valid."); + /// ``` + operation MaybeChooseElement<'T>(data : 'T[], indexDistribution : DiscreteDistribution) : (Bool, 'T) { + let index = indexDistribution::Sample(); + if (index >= 0 and index < Length(data)) { + return (true, data[index]); + } else { + return (false, Default<'T>()); + } + } + + /// # Summary + /// Given a success probability, returns a single Bernoulli trial that + /// is true with the given probability. + /// + /// # Input + /// ## successProbability + /// The probability with which `true` should be returned. + /// + /// # Output + /// `true` with probability `successProbability` and `false` with + /// probability `1.0 - successProbability`. + /// + /// # Example + /// The following Q# snippet samples flips from a biased coin: + /// ```Q# + /// let flips = DrawMany(DrawRandomBool, 10, 0.6); + /// ``` + operation DrawRandomBool(successProbability : Double) : Bool { + return DrawRandomDouble(0.0, 1.0) <= successProbability; + } +} diff --git a/src/Simulation/QsharpCore/Random/Internal.qs b/src/Simulation/QsharpCore/Random/Internal.qs new file mode 100644 index 00000000000..2dad23ac5e2 --- /dev/null +++ b/src/Simulation/QsharpCore/Random/Internal.qs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +namespace Microsoft.Quantum.Random { + + // This operation duplicates an operation from the Q# standard libraries + // and is used to support partially applying all inputs to a given + // operation without actually executing it. + internal operation Delay<'TInput, 'TOutput>(op : ('TInput => 'TOutput), input : 'TInput, delay : Unit) : 'TOutput { + return op(input); + } +} diff --git a/src/Simulation/QsharpCore/Random/Intrinsic.qs b/src/Simulation/QsharpCore/Random/Intrinsic.qs new file mode 100644 index 00000000000..4ac4fe640ed --- /dev/null +++ b/src/Simulation/QsharpCore/Random/Intrinsic.qs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +namespace Microsoft.Quantum.Random { + + /// # Summary + /// Draws a random integer in a given inclusive range. + /// + /// # Input + /// ## min + /// The smallest integer to be drawn. + /// ## max + /// The largest integer to be drawn. + /// + /// # Output + /// An integer in the inclusive range from `min` to `max` with uniform + /// probability. + /// + /// # Remarks + /// Fails if `max <= min`. + /// + /// # Example + /// The following Q# snippet randomly rolls a six-sided die: + /// ```Q# + /// let roll = DrawRandomInt(1, 6); + /// ``` + /// + /// # See Also + /// - Microsoft.Quantum.DiscreteUniformDistribution + operation DrawRandomInt(min : Int, max : Int) : Int { + body intrinsic; + } + + /// # Summary + /// Draws a random real number in a given inclusive interval. + /// + /// # Input + /// ## min + /// The smallest real number to be drawn. + /// ## max + /// The largest real number to be drawn. + /// + /// # Output + /// A random real number in the inclusive interval from `min` to `max` with + /// uniform probability. + /// + /// # Remarks + /// Fails if `max <= min`. + /// + /// # Example + /// The following Q# snippet randomly draws an angle between $0$ and $2 \pi$: + /// ```Q# + /// let angle = DrawRandomDouble(0.0, 2.0 * PI()); + /// ``` + /// + /// # See Also + /// - Microsoft.Quantum.ContinuousUniformDistribution + operation DrawRandomDouble(min : Double, max : Double) : Double { + body intrinsic; + } + +} diff --git a/src/Simulation/QsharpCore/Random/Normal.qs b/src/Simulation/QsharpCore/Random/Normal.qs new file mode 100644 index 00000000000..01f11b710f7 --- /dev/null +++ b/src/Simulation/QsharpCore/Random/Normal.qs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +namespace Microsoft.Quantum.Random { + open Microsoft.Quantum.Intrinsic; + open Microsoft.Quantum.Math; + + internal operation DrawStandardNormalVariate() : Double { + let (u1, u2) = (DrawRandomDouble(0.0, 1.0), DrawRandomDouble(0.0, 1.0)); + return Sqrt(-2.0 * Log(u1)) * Cos(2.0 * PI() * u2); + } + + /// # Summary + /// Returns a normal distribution with mean 0 and variance 1. + /// + /// # Example + /// The following draws 10 samples from the standard normal distribution: + /// ```Q# + /// let samples = DrawMany((StandardNormalDistribution())::Sample, 10, ()); + /// ``` + /// + /// # See Also + /// - Microsoft.Quantum.Random.NormalDistribution + function StandardNormalDistribution() : ContinuousDistribution { + return ContinuousDistribution(DrawStandardNormalVariate); + } + + internal function StandardTransformation(mean : Double, variance : Double, variate : Double) : Double { + return mean + Sqrt(variance) * variate; + } + + /// # Summary + /// Returns a normal distribution with a given mean and variance. + /// + /// # Example + /// The following draws 10 samples from the normal distribution with mean + /// 2 and standard deviation 0.1: + /// ```Q# + /// let samples = DrawMany( + /// (NormalDistribution(2.0, PowD(0.1, 2.0)))::Sample, + /// 10, () + /// ); + /// ``` + /// + /// # See Also + /// - Microsoft.Quantum.Random.StandardNormalDistribution + function NormalDistribution(mean : Double, variance : Double) : ContinuousDistribution { + return TransformedContinuousDistribution( + StandardTransformation(mean, variance, _), + StandardNormalDistribution() + ); + } + +} diff --git a/src/Simulation/QsharpCore/Random/Types.qs b/src/Simulation/QsharpCore/Random/Types.qs new file mode 100644 index 00000000000..703701814d7 --- /dev/null +++ b/src/Simulation/QsharpCore/Random/Types.qs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +namespace Microsoft.Quantum.Random { + open Microsoft.Quantum.Intrinsic; + open Microsoft.Quantum.Math; + + /// # Summary + /// Represents a univariate probability distribution over real numbers. + /// + /// # See Also + /// - Microsoft.Quantum.Random.ComplexDistribution + /// - Microsoft.Quantum.Random.DiscreteDistribution + /// - Microsoft.Quantum.Random.BigDiscreteDistribution + newtype ContinuousDistribution = ( + Sample : (Unit => Double) + ); + + + /// # Summary + /// Represents a univariate probability distribution over complex numbers. + /// + /// # See Also + /// - Microsoft.Quantum.Random.ContinuousDistribution + /// - Microsoft.Quantum.Random.DiscreteDistribution + /// - Microsoft.Quantum.Random.BigDiscreteDistribution + newtype ComplexDistribution = ( + Sample : (Unit => Complex) + ); + + /// # Summary + /// Represents a univariate probability distribution over integers. + /// + /// # See Also + /// - Microsoft.Quantum.Random.ContinuousDistribution + /// - Microsoft.Quantum.Random.ComplexDistribution + /// - Microsoft.Quantum.Random.BigDiscreteDistribution + newtype DiscreteDistribution = ( + Sample : (Unit => Int) + ); + + /// # Summary + /// Represents a univariate probability distribution over integers of + /// arbitrary size. + /// + /// # See Also + /// - Microsoft.Quantum.Random.ContinuousDistribution + /// - Microsoft.Quantum.Random.ComplexDistribution + /// - Microsoft.Quantum.Random.DiscreteDistribution + newtype BigDiscreteDistribution = ( + Sample : (Unit => BigInt) + ); + + /// # Summary + /// Returns a discrete categorical distribution, in which the probability + /// for each of a finite list of given outcomes is explicitly specified. + /// + /// # Input + /// ## probs + /// The probabilities for each outcome from the categorical distribution. + /// These probabilities may not be normalized, but must all be non-negative. + /// + /// # Output + /// The index `i` with probability `probs[i] / sum`, where `sum` is the sum + /// of `probs` given by `Fold(PlusD, 0.0, probs)`. + /// + /// # Example + /// The following Q# code will display 0 with probability 30% and 1 with + /// probability 70%: + /// ```Q# + /// let dist = CategoricalDistribution([0.3, 0.7]); + /// Message($"Got sample: {dist::Sample()}"); + /// ``` + function CategoricalDistribution(probs : Double[]) : DiscreteDistribution { + return DiscreteDistribution(Delay(DrawCategorical, probs, _)); + } + + /// # Summary + /// Internal-only operation for sampling from transformed distributions. + /// Should only be used via partial application. + internal operation SampleTransformedContinuousDistribution( + transform : (Double -> Double), + distribution : ContinuousDistribution + ) : Double { + return transform(distribution::Sample()); + } + + /// # Summary + /// Given a continuous distribution, returns a new distribution that + /// transforms the original by a given function. + /// + /// # Input + /// ## transform + /// A function that transforms variates of the original distribution to the + /// transformed distribution. + /// ## distribution + /// The original distribution to be transformed. + /// + /// # Output + /// A new distribution related to `distribution` by the transformation given + /// by `transform`. + /// + /// # Example + /// The following two distributions are identical: + /// ```Q# + /// let dist1 = ContinuousUniformDistribution(1.0, 2.0); + /// let dist2 = TransformedContinuousDistribution( + /// PlusD(1.0, _), + /// ContinuousUniformDistribution(0.0, 1.0) + /// ); + /// ``` + function TransformedContinuousDistribution( + transform : (Double -> Double), + distribution : ContinuousDistribution + ) : ContinuousDistribution { + return ContinuousDistribution(Delay( + SampleTransformedContinuousDistribution, + (transform, distribution), + _ + )); + } + +} diff --git a/src/Simulation/QsharpCore/Random/Uniform.qs b/src/Simulation/QsharpCore/Random/Uniform.qs new file mode 100644 index 00000000000..e022d9f6d46 --- /dev/null +++ b/src/Simulation/QsharpCore/Random/Uniform.qs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +namespace Microsoft.Quantum.Random { + open Microsoft.Quantum.Intrinsic; + open Microsoft.Quantum.Math; + open Microsoft.Quantum.Diagnostics; + + /// # Summary + /// Returns a uniform distribution over a given inclusive interval. + /// + /// # Input + /// ## min + /// The smallest real number to be drawn. + /// ## max + /// The largest real number to be drawn. + /// + /// # Output + /// A distribution whose random variates are real numbers in the inclusive + /// interval from `min` to `max` with uniform probability. + /// + /// # Remarks + /// Fails if `max <= min`. + /// + /// # Example + /// The following Q# snippet randomly draws an angle between $0$ and $2 \pi$: + /// ```Q# + /// let angleDistribution = ContinuousUniformDistribution(0.0, 2.0 * PI()); + /// let angle = angleDistribution::Sample(); + /// ``` + /// + /// # See Also + /// - Microsoft.Quantum.DrawRandomDouble + function ContinuousUniformDistribution( + min : Double, max : Double + ) : ContinuousDistribution { + Fact(max > min, $"Max must be larger than min, but {max} <= {min}."); + return ContinuousDistribution(Delay(DrawRandomDouble, (min, max), _)); + } + + /// # Summary + /// Returns a uniform distribution over a given inclusive range. + /// + /// # Input + /// ## min + /// The smallest integer to be drawn. + /// ## max + /// The largest integer to be drawn. + /// + /// # Output + /// A distribution whose random variates are integers in the inclusive + /// range from `min` to `max` with uniform probability. + /// + /// # Remarks + /// Fails if `max <= min`. + /// + /// # Example + /// The following Q# snippet randomly rolls a six-sided die: + /// ```Q# + /// let dieDistribution = DiscreteUniformDistribution(1, 6); + /// let dieRoll = dieDistribution::Sample(); + /// ``` + /// + /// # See Also + /// - Microsoft.Quantum.DrawRandomDouble + function DiscreteUniformDistribution(min : Int, max : Int) : DiscreteDistribution { + Fact(max > min, $"Max must be larger than min, but {max} <= {min}."); + return DiscreteDistribution(Delay(DrawRandomInt, (min, max), _)); + } + +} diff --git a/src/Simulation/Simulators.Tests/OperationsTestHelper.cs b/src/Simulation/Simulators.Tests/OperationsTestHelper.cs index 37f0122a25c..7fa82ca1077 100644 --- a/src/Simulation/Simulators.Tests/OperationsTestHelper.cs +++ b/src/Simulation/Simulators.Tests/OperationsTestHelper.cs @@ -259,7 +259,7 @@ internal static void ctrlOnReleasedQubitTest(SimulatorBase sim, Action<(IQArray< /// internal static void ctrlOnReleasedCtrlQubitTest(SimulatorBase sim, Action<(IQArray, Qubit)> operationControlled) { - var random = new Random(); + var random = new System.Random(); ctrlTestShell(sim, operationControlled, (enabled, ctrlQs, q) => { diff --git a/src/Simulation/Simulators.Tests/QuantumSimulatorTests/VerifyGates.cs b/src/Simulation/Simulators.Tests/QuantumSimulatorTests/VerifyGates.cs index 59c7ae0e0d7..0cc32328fdf 100644 --- a/src/Simulation/Simulators.Tests/QuantumSimulatorTests/VerifyGates.cs +++ b/src/Simulation/Simulators.Tests/QuantumSimulatorTests/VerifyGates.cs @@ -31,7 +31,7 @@ public State((double, double) alpha, (double, double) beta) public partial class QuantumSimulatorTests { public const int seed = 19740212; - public static Random r = new Random(seed); + public static System.Random r = new System.Random(seed); public static double sqrt1_2 = Sqrt(1.0 / 2.0); diff --git a/src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/IntrinsicTests.csproj b/src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/IntrinsicTests.csproj new file mode 100644 index 00000000000..4fbf6b19d13 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/IntrinsicTests.csproj @@ -0,0 +1,31 @@ + + + + netcoreapp3.1 + false + true + + false + false + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/Random/Tests.qs b/src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/Random/Tests.qs new file mode 100644 index 00000000000..ab8416de9e6 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/Random/Tests.qs @@ -0,0 +1,250 @@ +namespace Microsoft.Quantum.Tests { + open Microsoft.Quantum.Intrinsic; + open Microsoft.Quantum.Canon; + open Microsoft.Quantum.Random; + open Microsoft.Quantum.Diagnostics; + open Microsoft.Quantum.Convert; + open Microsoft.Quantum.Math; + + // Uses Welford's method to compute the mean and variance of an array + // of samples. + internal function SampleMeanAndVariance(samples : Double[]) : (Double, Double) { + mutable meanAcc = 0.0; + mutable varAcc = 0.0; + for (idx in 0..Length(samples) - 1) { + let sample = samples[idx]; + let oldMeanAcc = meanAcc; + let delta = (sample - meanAcc); + set meanAcc += delta / IntAsDouble(idx + 1); + set varAcc += delta * (sample - oldMeanAcc); + } + + return (meanAcc, varAcc / IntAsDouble(Length(samples) - 1)); + } + + internal operation EstimateMeanAndVariance(dist : ContinuousDistribution, nSamples : Int) : (Double, Double) { + mutable samples = new Double[nSamples]; + for (idx in 0..nSamples - 1) { + set samples w/= idx <- dist::Sample(); + } + return SampleMeanAndVariance(samples); + } + + internal operation CheckMeanAndVariance( + name : String, + distribution : ContinuousDistribution, + nSamples : Int, + (expectedMean : Double, expectedVariance : Double), + tolerance : Double + ) : Unit { + let (mean, variance) = EstimateMeanAndVariance( + distribution, + nSamples + ); + Fact( + expectedMean - tolerance <= mean and + mean <= expectedMean + tolerance, + $"Mean of {name} distribution should be {expectedMean}, was {mean}." + ); + Fact( + expectedVariance - tolerance <= variance and + variance <= expectedVariance + tolerance, + $"Variance of {name} distribution should be {expectedVariance}, was {variance}." + ); + } + + /// # Summary + /// Checks that @"microsoft.quantum.random.drawrandomdouble" obeys ranges. + @Test("QuantumSimulator") + @Test("ToffoliSimulator") + operation CheckDrawRandomDoubleObeysRanges() : Unit { + for (j in 0..10000) { + let random = DrawRandomDouble(0.0, 1.0); + if (random < 0.0 or random > 1.0) { + fail $"DrawRandomDouble(0.0, 1.0) returned {random}, outside the allowed interval."; + } + } + } + + /// # Summary + /// Checks that @"microsoft.quantum.random.drawrandomdint" obeys ranges. + @Test("QuantumSimulator") + @Test("ToffoliSimulator") + operation CheckDrawRandomIntObeysRanges() : Unit { + let randomInt = DrawRandomInt(0, 45); + if (randomInt > 45 or randomInt < 0) { + fail $"DrawRandomInt(0, 45) returned {randomInt}, outside the allowed range."; + } + } + + /// # Summary + /// Checks that @"microsoft.quantum.random.continuousuniformdistribution" has the + /// expected moments. + @Test("QuantumSimulator") + operation CheckContinuousUniformDistributionHasRightMoments() : Unit { + CheckMeanAndVariance( + "uniform", + ContinuousUniformDistribution(0.0, 1.0), + 1000000, + (0.5, 1.0 / 12.0), + 0.02 + ); + } + + /// # Summary + /// Checks that @"microsoft.quantum.random.standardnormaldistribution" has the + /// expected moments. + @Test("QuantumSimulator") + operation CheckStandardNormalDistributionHasRightMoments() : Unit { + CheckMeanAndVariance( + "standard normal", + StandardNormalDistribution(), + 1000000, + (0.0, 1.0), + 0.02 + ); + } + + /// # Summary + /// Checks that @"microsoft.quantum.random.normaldistribution" has the + /// expected moments. + @Test("QuantumSimulator") + operation CheckNormalDistributionHasRightMoments() : Unit { + CheckMeanAndVariance( + "normal(-2.0, 5.0)", + NormalDistribution(-2.0, 5.0), + 1000000, + (-2.0, 5.0), + 0.02 + ); + } + + /// # Summary + /// Checks that @"microsoft.quantum.random.drawrandombool" has the right + /// first moment. Note that since DrawRandomBool represents a Bernoulli + /// trial, it is entirely characterized by its first moment; we don't need + /// to check variance here. + @Test("QuantumSimulator") + operation CheckDrawRandomBoolHasRightExpectation() : Unit { + // NB: DrawMany isn't available yet, since it's in the + // Microsoft.Quantum.Standard package, not QSharpCore. + let prHeads = 0.65; + let nFlips = 1000000; + let stdDev = Sqrt(IntAsDouble(nFlips) * prHeads * (1.0 - prHeads)); + let expected = IntAsDouble(nFlips) * prHeads; + let nAllowedStdDev = 4.0; + mutable nHeads = 0; + for (idx in 0..nFlips - 1) { + if (DrawRandomBool(prHeads)) { + set nHeads += 1; + } + } + + let delta = IntAsDouble(nHeads) - expected; + + Fact( + -nAllowedStdDev * stdDev <= delta and + delta <= nAllowedStdDev * stdDev, + "First moment of Bernoulli distribution was incorrect." + ); + } + + /// # Summary + /// Checks that DrawCategorical never draws elements with probability zero. + @Test("QuantumSimulator") + operation CheckImpossibleEventsAreNotDrawn() : Unit { + let distribution = CategoricalDistribution([0.5, 0.0, 0.5]); + let nTrials = 100000; + for (idxTrial in 0..nTrials - 1) { + let variate = distribution::Sample(); + Fact( + variate != 1, + "A variate of 1 was drawn from a categorical distribution, despite having a probability of 0." + ); + } + } + + // We define a couple callables to help us run continuous tests on discrete + // distributions as well. + + internal operation DrawDiscreteAsContinuous(discrete : DiscreteDistribution, delay : Unit) : Double { + return IntAsDouble(discrete::Sample()); + } + + internal function DiscreteAsContinuous(discrete : DiscreteDistribution) : ContinuousDistribution { + return ContinuousDistribution(DrawDiscreteAsContinuous(discrete, _)); + } + + @Test("QuantumSimulator") + operation CheckCategoricalMomentsAreCorrect() : Unit { + let categorical = DiscreteAsContinuous( + CategoricalDistribution([0.2, 0.5, 0.3]) + ); + let expected = 0.0 * 0.2 + 1.0 * 0.5 + 2.0 * 0.3; + let variance = PowD(0.0 - expected, 2.0) * 0.2 + + PowD(1.0 - expected, 2.0) * 0.5 + + PowD(2.0 - expected, 2.0) * 0.3; + + CheckMeanAndVariance( + "categorical([0.2, 0.5, 0.3])", + categorical, + 1000000, + (expected, variance), + 0.04 + ); + } + + @Test("QuantumSimulator") + operation CheckRescaledCategoricalMomentsAreCorrect() : Unit { + let categorical = DiscreteAsContinuous( + CategoricalDistribution([2.0, 5.0, 3.0]) + ); + let expected = 0.0 * 0.2 + 1.0 * 0.5 + 2.0 * 0.3; + let variance = PowD(0.0 - expected, 2.0) * 0.2 + + PowD(1.0 - expected, 2.0) * 0.5 + + PowD(2.0 - expected, 2.0) * 0.3; + + CheckMeanAndVariance( + "categorical([0.2, 0.5, 0.3])", + categorical, + 1000000, + (expected, variance), + 0.04 + ); + } + + @Test("QuantumSimulator") + operation CheckCategoricalHistogramIsCorrect() : Unit { + let categorical = CategoricalDistribution([0.2, 0.5, 0.3]); + mutable counts = new Int[3]; + let nSamples = 1000000; + + for (idx in 0..nSamples - 1) { + let sample = categorical::Sample(); + set counts w/= sample <- counts[sample] + 1; + } + + Fact(190000 <= counts[0] and counts[0] <= 210000, $"counts[0] was {counts[0]}, expected about 200000."); + Fact(490000 <= counts[1] and counts[1] <= 510000, $"counts[1] was {counts[1]}, expected about 500000."); + Fact(290000 <= counts[2] and counts[2] <= 310000, $"counts[2] was {counts[2]}, expected about 300000."); + } + + @Test("QuantumSimulator") + operation CheckDiscreteUniformMomentsAreCorrect() : Unit { + let (min, max) = (-3, 7); + let expected = 0.5 * (IntAsDouble(min + max)); + let variance = (1.0 / 12.0) * ( + PowD(IntAsDouble(max - min + 1), 2.0) - 1.0 + ); + CheckMeanAndVariance( + $"discrete uniform ({min}, {max})", + DiscreteAsContinuous( + DiscreteUniformDistribution(min, max) + ), + 1000000, + (expected, variance), + 0.1 + ); + } + +} diff --git a/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.Primitive.random.cs b/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.Primitive.random.cs index 2a5578ed962..14523f44531 100644 --- a/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.Primitive.random.cs +++ b/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.Primitive.random.cs @@ -19,7 +19,7 @@ public TracerRandom(QCTraceSimulatorImpl m) : base(m) public override Func, Int64> Body => (p) => { - return CommonUtils.SampleDistribution(p, core.random.NextDouble()); + return CommonUtils.SampleDistribution(p, core.RandomGenerator.NextDouble()); }; } } diff --git a/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulatorImpl.cs b/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulatorImpl.cs index 53088993426..c3bd7f2de57 100644 --- a/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulatorImpl.cs +++ b/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulatorImpl.cs @@ -19,8 +19,6 @@ public partial class QCTraceSimulatorImpl : SimulatorBase protected readonly QCTraceSimulatorConfiguration configuration; private readonly QCTraceSimulatorCore tracingCore; private readonly double[] gateTimes; - - private readonly Random random = new Random(DateTime.Now.Millisecond); protected readonly QCTraceSimulatorCoreConfiguration tCoreConfig; private Dictionary primitiveOperationsIdToNames = diff --git a/src/Simulation/Simulators/QuantumProcessor/QuantumProcessorDispatcher.cs b/src/Simulation/Simulators/QuantumProcessor/QuantumProcessorDispatcher.cs index fa530a28316..c941ec7e133 100644 --- a/src/Simulation/Simulators/QuantumProcessor/QuantumProcessorDispatcher.cs +++ b/src/Simulation/Simulators/QuantumProcessor/QuantumProcessorDispatcher.cs @@ -12,10 +12,6 @@ namespace Microsoft.Quantum.Simulation.QuantumProcessor public partial class QuantumProcessorDispatcher : SimulatorBase { private const int PreallocatedQubitCount = 256; - /// - /// Random number generator used for Microsoft.Quantum.Intrinsic.Random - /// - public readonly System.Random random; public override string Name => "QuantumProcessorDispatcher"; @@ -35,9 +31,14 @@ public IQuantumProcessor QuantumProcessor /// An instance of a class implementing interface. If the parameter is null is used. /// A seed to be used by Q# Microsoft.Quantum.Intrinsic.Random operation. public QuantumProcessorDispatcher(IQuantumProcessor? quantumProcessor = null, IQubitManager? qubitManager = null, int? randomSeed = null) - : base(qubitManager ?? new QubitManagerTrackingScope(PreallocatedQubitCount, mayExtendCapacity:true, disableBorrowing:false)) + : base( + qubitManager ?? new QubitManagerTrackingScope( + PreallocatedQubitCount, + mayExtendCapacity: true, disableBorrowing: false + ), + randomSeed + ) { - random = new System.Random(randomSeed == null ? DateTime.Now.Millisecond : randomSeed.Value); QuantumProcessor = quantumProcessor ?? new QuantumProcessorBase(); OnOperationStart += QuantumProcessor.OnOperationStart; OnOperationEnd += QuantumProcessor.OnOperationEnd; diff --git a/src/Simulation/Simulators/QuantumProcessor/random.cs b/src/Simulation/Simulators/QuantumProcessor/random.cs index 0b0452c23c8..4badfd98802 100644 --- a/src/Simulation/Simulators/QuantumProcessor/random.cs +++ b/src/Simulation/Simulators/QuantumProcessor/random.cs @@ -20,7 +20,7 @@ public QuantumProcessorDispatcherRandom(QuantumProcessorDispatcher m) : base(m) public override Func, Int64> Body => (p) => { - return CommonUtils.SampleDistribution(p, Simulator.random.NextDouble()); + return CommonUtils.SampleDistribution(p, Simulator.RandomGenerator.NextDouble()); }; } } diff --git a/src/Simulation/Simulators/QuantumSimulator/QuantumSimulator.cs b/src/Simulation/Simulators/QuantumSimulator/QuantumSimulator.cs index e073a4ac39b..a4f7bf96ece 100644 --- a/src/Simulation/Simulators/QuantumSimulator/QuantumSimulator.cs +++ b/src/Simulation/Simulators/QuantumSimulator/QuantumSimulator.cs @@ -31,8 +31,6 @@ public partial class QuantumSimulator : SimulatorBase, IDisposable [DllImport(QSIM_DLL_NAME, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl, EntryPoint = "seed")] private static extern void SetSeed(uint id, UInt32 seedValue); - public uint Seed{ get; private set; } - /// /// Creates a an instance of a quantum simulator. /// @@ -43,14 +41,15 @@ public QuantumSimulator( bool throwOnReleasingQubitsNotInZeroState = true, UInt32? randomNumberGeneratorSeed = null, bool disableBorrowing = false) - : base(new QSimQubitManager(throwOnReleasingQubitsNotInZeroState, disableBorrowing : disableBorrowing)) + : base( + new QSimQubitManager(throwOnReleasingQubitsNotInZeroState, disableBorrowing : disableBorrowing), + (int?)randomNumberGeneratorSeed + ) { - Seed = (randomNumberGeneratorSeed.HasValue) - ? randomNumberGeneratorSeed.Value - : (uint)Guid.NewGuid().GetHashCode(); - Id = Init(); - SetSeed(this.Id, this.Seed); + // Make sure that the same seed used by the built-in System.Random + // instance is also used by the native simulator itself. + SetSeed(this.Id, (uint)this.Seed); ((QSimQubitManager)QubitManager).Init(Id); } diff --git a/src/Simulation/Simulators/ToffoliSimulator/Random.cs b/src/Simulation/Simulators/ToffoliSimulator/Random.cs index 1d9d4a3520d..aa64984ec4e 100644 --- a/src/Simulation/Simulators/ToffoliSimulator/Random.cs +++ b/src/Simulation/Simulators/ToffoliSimulator/Random.cs @@ -3,6 +3,7 @@ using System; using System.Linq; +using Microsoft.Quantum.Simulation.Common; using Microsoft.Quantum.Simulation.Core; namespace Microsoft.Quantum.Simulation.Simulators @@ -12,9 +13,9 @@ public partial class ToffoliSimulator /// /// Implementation of the Random operation for the Toffoli simulator. /// - public class ToffSimRandom : Quantum.Intrinsic.Random + public class ToffSimRandom : Microsoft.Quantum.Intrinsic.Random { - Random random = new Random(); + private ToffoliSimulator Simulator; /// /// Constructs a new operation instance. @@ -22,36 +23,14 @@ public class ToffSimRandom : Quantum.Intrinsic.Random /// The simulator that this operation affects. public ToffSimRandom(ToffoliSimulator m) : base(m) { + Simulator = m; } /// /// The implementation of the operation. /// public override Func, Int64> Body => (probs) => - { - if (probs.Any(d => d < 0.0)) - { - throw new ArgumentOutOfRangeException("probs", "All probabilities must be greater than or equal to zero"); - } - var sum = probs.Sum(); - if (sum <= 0.0) - { - throw new ArgumentOutOfRangeException("probs", "At least one probability must be greater than zero"); - } - - var threshhold = random.NextDouble() * sum; - for (int i = 0; i < probs.Length; i++) - { - threshhold -= probs[i]; - if (threshhold <= 0.0) - { - return i; - } - } - - // This line should never be reached. - return probs.Length - 1; - }; + CommonUtils.SampleDistribution(probs, Simulator.RandomGenerator.NextDouble()); } } } From 55e12bd1adc1c8e1132265a33623faf6afaf68ad Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza <43434922+ricardo-espinoza@users.noreply.github.com> Date: Wed, 19 Aug 2020 13:22:38 -0700 Subject: [PATCH 29/32] Updating Notice.txt with a more recent list of third party libraries. (#350) Through a recent component governance audit we're extending the list of third party libraries used by components in this repository. --- NOTICE.txt | 3971 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 3780 insertions(+), 191 deletions(-) diff --git a/NOTICE.txt b/NOTICE.txt index 47a426eb9c4..98ac8599c49 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -4,7 +4,7 @@ Do Not Translate or Localize This software incorporates material from third parties. Microsoft makes certain open source code available at https://3rdpartysource.microsoft.com, or you may send a check or money order for US $5.00, including the product name, -the open source component name, and version number, to: +the open source component name, platform, and version number, to: Source Code Compliance Team Microsoft Corporation @@ -15,235 +15,3778 @@ USA Notwithstanding any other terms, you may reverse engineer this software to the extent required to debug changes to any libraries licensed under the GNU Lesser General Public License. +------------------------------------------------------------------- + +Quantum Simulator Kernel +Copyright (c) ETH Zurich (Kernel developed by ETH Zurich (Switzerland), group of Prof. Troyer, authors Thomas Häner and Damian Steiger) + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Castle.Core 4.4.0 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +Copyright 2004-2016 Castle Project +Copyright (c) 2004-2019 Castle Project +GCopyright (c) 2004-2019 Castle Project + +Copyright 2004-2016 Castle Project - http://www.castleproject.org/ + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.Build.Tasks.Git 1.0.0 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + + + + + + + 'Apache-2.0' reference + + +
+ + + +

SPDX identifier

+

Apache-2.0

+ +

License text

+
 Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      
+
+      "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+      
+
+      "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+      
+
+      "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+      
+
+      "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+      
+
+      "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+      
+
+      "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+      
+
+      "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+      
+
+      "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+      
+
+      "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+      
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+      (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+Copyright _____
+
+Licensed under the Apache License, Version 2.0 (the "License");
+
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+
+distributed under the License is distributed on an "AS IS" BASIS,
+
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+See the License for the specific language governing permissions and
+
+limitations under the License.
+ 
+ + +
+ + + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.CodeAnalysis.Analyzers 3.0.0 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. +Copyright (c) 2013 Scott Kirkland +Copyright (c) 2012-2014 Mehdi Khalili +Copyright (c) 2013-2014 Omar Khudeira + + + + + + + 'Apache-2.0' reference + + +
+ + + +

SPDX identifier

+

Apache-2.0

+ +

License text

+
 Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      
+
+      "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+      
+
+      "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+      
+
+      "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+      
+
+      "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+      
+
+      "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+      
+
+      "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+      
+
+      "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+      
+
+      "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+      
+
+      "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+      
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+      (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+Copyright _____
+
+Licensed under the Apache License, Version 2.0 (the "License");
+
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+
+distributed under the License is distributed on an "AS IS" BASIS,
+
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+See the License for the specific language governing permissions and
+
+limitations under the License.
+ 
+ + +
+ + + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.SourceLink.Common 1.0.0 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + + + + + + + 'Apache-2.0' reference + + +
+ + + +

SPDX identifier

+

Apache-2.0

+ +

License text

+
 Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      
+
+      "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+      
+
+      "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+      
+
+      "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+      
+
+      "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+      
+
+      "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+      
+
+      "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+      
+
+      "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+      
+
+      "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+      
+
+      "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+      
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+      (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+Copyright _____
+
+Licensed under the Apache License, Version 2.0 (the "License");
+
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+
+distributed under the License is distributed on an "AS IS" BASIS,
+
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+See the License for the specific language governing permissions and
+
+limitations under the License.
+ 
+ + +
+ + + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.SourceLink.GitHub 1.0.0 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + + + + + + + 'Apache-2.0' reference + + +
+ + + +

SPDX identifier

+

Apache-2.0

+ +

License text

+
 Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      
+
+      "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+      
+
+      "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+      
+
+      "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+      
+
+      "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+      
+
+      "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+      
+
+      "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+      
+
+      "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+      
+
+      "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+      
+
+      "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+      
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+      (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+Copyright _____
+
+Licensed under the Apache License, Version 2.0 (the "License");
+
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+
+distributed under the License is distributed on an "AS IS" BASIS,
+
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+See the License for the specific language governing permissions and
+
+limitations under the License.
+ 
+ + +
+ + + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +NuGet.Frameworks 5.0.0 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +StyleCop.Analyzers 1.1.118 - Apache-2.0 + + +copyright company +(c) 2008 VeriSign, Inc. +Copyright (c) 2015 Dennis Fischer +Copyright (c) 2017 Marcos Lopez C. +Copyright 2014 Giovanni Bassi and Elemar Jr. +Copyright (c) Tunnel Vision Laboratories, LLC. +Copyright Tunnel Vision Laboratories, LLC 2015 +1Copyright Tunnel Vision Laboratories, LLC 2015 +GetCopyrightText copyrightText WithDocumentText +copyright tag should contain a non-empty company +1Copyright Tunnel Vision Laboratories, LLC 2015 DAn +Copyright 2015 Tunnel Vision Laboratories, LLC StyleCop DotNetAnalyzers Roslyn Diagnostic Analyzer + +Copyright (c) Tunnel Vision Laboratories, LLC. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +these files except in compliance with the License. You may obtain a copy of the +License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + +--- + +This project uses other open source projects, which are used under the terms +of the following license(s). + +.NET Compiler Platform ("Roslyn") + + Copyright Microsoft. + + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + these files except in compliance with the License. You may obtain a copy of the + License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software distributed + under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for the + specific language governing permissions and limitations under the License. + +Code Cracker + + Copyright 2014 Giovanni Bassi and Elemar Jr. + + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + these files except in compliance with the License. You may obtain a copy of the + License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software distributed + under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for the + specific language governing permissions and limitations under the License. + +LightJson + + Copyright (c) 2017 Marcos López C. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +StyleCop.Analyzers 1.2.0-beta.164 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +Copyright (c) 2015 Dennis Fischer +Copyright (c) 2017 Marcos Lopez C. +Copyright 2014 Giovanni Bassi and Elemar Jr. +Copyright (c) Tunnel Vision Laboratories, LLC. +Copyright 2015 Tunnel Vision Laboratories, LLC StyleCop DotNetAnalyzers Roslyn Diagnostic Analyzer + +Copyright (c) Tunnel Vision Laboratories, LLC. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +these files except in compliance with the License. You may obtain a copy of the +License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + +--- + +This project uses other open source projects, which are used under the terms +of the following license(s). + +.NET Compiler Platform ("Roslyn") + + Copyright Microsoft. + + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + these files except in compliance with the License. You may obtain a copy of the + License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software distributed + under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for the + specific language governing permissions and limitations under the License. + +Code Cracker + + Copyright 2014 Giovanni Bassi and Elemar Jr. + + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + these files except in compliance with the License. You may obtain a copy of the + License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software distributed + under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for the + specific language governing permissions and limitations under the License. + +LightJson + + Copyright (c) 2017 Marcos López C. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + + + + + + + 'Apache-2.0' reference + + +
+ + + +

SPDX identifier

+

Apache-2.0

+ +

License text

+
 Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      
+
+      "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+      
+
+      "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+      
+
+      "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+      
+
+      "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+      
+
+      "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+      
+
+      "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+      
+
+      "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+      
+
+      "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+      
+
+      "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+      
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+      (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+Copyright _____
+
+Licensed under the Apache License, Version 2.0 (the "License");
+
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+
+distributed under the License is distributed on an "AS IS" BASIS,
+
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+See the License for the specific language governing permissions and
+
+limitations under the License.
+ 
+ + +
+ + + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +StyleCop.Analyzers.Unstable 1.2.0.164 - Apache-2.0 + + + +Copyright (c) Tunnel Vision Laboratories, LLC. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +these files except in compliance with the License. You may obtain a copy of the +License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + +--- + +This project uses other open source projects, which are used under the terms +of the following license(s). + +.NET Compiler Platform ("Roslyn") + + Copyright Microsoft. + + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + these files except in compliance with the License. You may obtain a copy of the + License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software distributed + under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for the + specific language governing permissions and limitations under the License. + +Code Cracker + + Copyright 2014 Giovanni Bassi and Elemar Jr. + + Licensed under the Apache License, Version 2.0 (the "License"); you may not use + these files except in compliance with the License. You may obtain a copy of the + License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software distributed + under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. See the License for the + specific language governing permissions and limitations under the License. + +LightJson + + Copyright (c) 2017 Marcos López C. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +WindowsAzure.Storage 9.3.3 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright 2018 Microsoft Corp. + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +xunit 2.4.1 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +xunit.abstractions 2.0.3 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +Copyright (c) Outercurve Foundation +Copyright (c) Outercurve Foundation WrapNonExceptionThrows RSDS + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +xunit.analyzers 0.10.0 - Apache-2.0 + + + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +xunit.assert 2.4.1 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +Copyright (c) .NET Foundation +Copyright (c) .NET Foundation xUnit.net Assertion Library + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +xunit.core 2.4.1 - Apache-2.0 + + + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +xunit.extensibility.core 2.4.1 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +Copyright (c) .NET Foundation +Copyright (c) .NET Foundation xUnit.net +Copyright (c) .NET Foundation 0xUnit.net +Copyright (c) .NET Foundation xUnit.net Runner Utility + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +xunit.extensibility.execution 2.4.1 - Apache-2.0 + + + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +xunit.runner.visualstudio 2.4.1 - Apache-2.0 + + +(c) 2008 VeriSign, Inc. +Copyright (c) .NET Foundation +Copyright (c) Outercurve Foundation +Copyright (c) .NET Foundation xUnit.net +Copyright (c) .NET Foundation 2xUnit.net +Copyright (c) .NET Foundation xUnit.net Runner Utility +Copyright (c) .NET Foundation 1xUnit.net Runner Utility +Copyright (c) .NET Foundation xUnit.net Runner Reporters +Copyright (c) .NET Foundation .xUnit.net Runner Reporters +Copyright (c) Outercurve Foundation WrapNonExceptionThrows RSDS + +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + + + + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + + + + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + + + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + + + + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + + + + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + + + + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + + + + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + + + + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + + + + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); + +you may not use this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software + +distributed under the License is distributed on an "AS IS" BASIS, + +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and + +limitations under the License. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +FParsec 1.0.3 - BSD-2-Clause + + +(c) 2008 VeriSign, Inc. +Copyright Stephan Tolksdorf +Copyright (c) Stephan Tolksdorf +Copyright Stephan Tolksdorf FParsec +Copyright Stephan Tolksdorf FParsecCS +Copyright Stephan Tolksdorf VarFileInfo + +Copyright (c) . All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Markdig.Signed 0.20.0 - BSD-2-Clause + + +(c) 2008 VeriSign, Inc. + +Copyright (c) . All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Moq 4.13.1 - BSD-3-Clause + + +(c) 2008 VeriSign, Inc. + +Copyright (c) . All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Azure.Core 1.0.1 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Azure.Identity 1.1.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Azure.Storage.Blobs 12.2.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Azure.Storage.Common 12.1.1 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Bond.Core.CSharp 8.2.0 - MIT + + +(c) 2019 +(c) 2008 VeriSign, Inc. +Copyright (c) Microsoft. +(c) Microsoft Corporation. +Copyright (c) 2014 Microsoft + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Bond.CSharp 8.2.0 - MIT + + +(c) 2019 +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) 2014 Microsoft +Copyright, Microsoft Corporation + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Bond.Runtime.CSharp 8.2.0 - MIT + + +(c) 2019 +(c) 2008 VeriSign, Inc. +Copyright (c) Microsoft. +(c) Microsoft Corporation. +Copyright (c) 2014 Microsoft + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +CommandLineParser 2.5.0 - MIT + + +(c) 2008 VeriSign, Inc. +copyright Excepting NotParsed +copyright symbol. name author' The company +Copyright WrapNonExceptionThrows CommandLine.Tests, PublicKey +Copyright (c) 2005 - 2018 Giacomo Stelluti Scala & Contributors + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +coverlet.collector 1.0.1 - MIT + + +(c) 2008 VeriSign, Inc. +Copyright 2008 - 2018 Jb Evain +Copyright Microsoft Corporation +Copyright James Newton-King 2008 + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +FSharp.Core 4.7.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +FSharp.Core 4.5.2 - MIT + + +(c) 2008 VeriSign, Inc. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +FSharp.Core 4.7.1 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Humanizer.Core 2.2.0 - MIT + + +Copyright 2012-2016 +(c) 2008 VeriSign, Inc. +Copyright 2012-2017 Mehdi Khalili + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.Bcl.AsyncInterfaces 1.0.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 2007 James Newton-King +Copyright (c) 1991-2017 Unicode, Inc. +Copyright (c) 2013-2017, Alfred Klomp +Copyright (c) 2015-2017, Wojciech Mula +Copyright (c) 2005-2007, Nick Galbreath +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) 2016-2017, Matthieu Darbois +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.Bcl.AsyncInterfaces 1.1.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 2007 James Newton-King +Copyright (c) 1991-2017 Unicode, Inc. +Copyright (c) 2013-2017, Alfred Klomp +Copyright (c) 2015-2017, Wojciech Mula +Copyright (c) 2005-2007, Nick Galbreath +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) 2016-2017, Matthieu Darbois +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.CodeAnalysis.Common 3.6.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.CodeAnalysis.CSharp 3.6.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. +Copyright (c) Microsoft Corporation. +9Copyright (c) Microsoft Corporation. +ACopyright (c) Microsoft Corporation. +BCopyright (c) Microsoft Corporation. +CCopyright (c) Microsoft Corporation. +DCopyright (c) Microsoft Corporation. +OCopyright (c) Microsoft Corporation. +Copyright (c) Microsoft Corporation. Alle Rechte + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.CodeAnalysis.CSharp.Workspaces 3.6.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.CodeAnalysis.Workspaces.Common 3.6.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.CSharp 4.5.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.Identity.Client 4.13.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.Identity.Client.Extensions.Msal 2.10.0-preview - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.NETCore.Platforms 2.1.2 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.Quantum.Compiler 0.12.20072031 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.Rest.ClientRuntime 2.3.21 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) 2019 Microsoft +Copyright (c) Microsoft Corporation + +The MIT License (MIT) + +Copyright (c) 2019 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Microsoft.Rest.ClientRuntime.Azure 3.3.19 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) Microsoft Corporation + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +MSTest.TestAdapter 2.0.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) Microsoft Corporation. + +MSTest Framework + +Copyright (c) Microsoft Corporation. All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Newtonsoft.Json 12.0.3 - MIT + + +(c) 2008 VeriSign, Inc. +Copyright James Newton-King 2008 +Copyright (c) 2007 James Newton-King +Copyright (c) James Newton-King 2008 + +The MIT License (MIT) + +Copyright (c) 2007 James Newton-King + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +Newtonsoft.Json.Bson 1.0.2 - MIT + + +(c) 2008 VeriSign, Inc. +Copyright James Newton-King 2017 +Copyright (c) 2017 James Newton-King +Copyright (c) James Newton-King 2017 + +The MIT License (MIT) + +Copyright (c) 2017 James Newton-King + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +System.Buffers 4.5.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +System.Buffers 4.4.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +System.Collections.Immutable 1.5.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +System.Collections.Immutable 1.6.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 2007 James Newton-King +Copyright (c) 1991-2017 Unicode, Inc. +Copyright (c) 2013-2017, Alfred Klomp +Copyright (c) 2015-2017, Wojciech Mula +Copyright (c) 2005-2007, Nick Galbreath +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) 2016-2017, Matthieu Darbois +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +System.CommandLine 2.0.0-beta1.20213.1 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +System.Diagnostics.DiagnosticSource 4.6.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 2007 James Newton-King +Copyright (c) 1991-2017 Unicode, Inc. +Copyright (c) 2013-2017, Alfred Klomp +Copyright (c) 2015-2017, Wojciech Mula +Copyright (c) 2005-2007, Nick Galbreath +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) 2016-2017, Matthieu Darbois +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + ------------------------------------------------------------------- -Quantum Simulator Kernel -Copyright (c) ETH Zurich (Kernel developed by ETH Zurich (Switzerland), group of Prof. Troyer, authors Thomas Häner and Damian Steiger) +------------------------------------------------------------------- + +System.Memory 4.5.3 - MIT + + +(c) 2008 VeriSign, Inc. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + ------------------------------------------------------------------- ------------------------------------------------------------------- -FParsec 1.0.3 - BSD-2-Clause +System.Numerics.Vectors 4.4.0 - MIT + + (c) 2008 VeriSign, Inc. -Copyright Stephan Tolksdorf -Copyright (c) Stephan Tolksdorf -Copyright Stephan Tolksdorf FParsec -Copyright Stephan Tolksdorf FParsecCS -Copyright Stephan Tolksdorf VarFileInfo +(c) Microsoft Corporation. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -Copyright (c) . All rights reserved. +The MIT License (MIT) -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +Copyright (c) .NET Foundation and Contributors - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +All rights reserved. - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- ------------------------------------------------------------------- -Markdig 0.16.0 - BSD-2-Clause +System.Numerics.Vectors 4.5.0 - MIT + + (c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -Copyright (c) . All rights reserved. +The MIT License (MIT) -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +Copyright (c) .NET Foundation and Contributors - 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +All rights reserved. - 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------- ------------------------------------------------------------------- -CommandLineParser 2.5.0 - MIT +System.Reflection.Metadata 1.6.0 - MIT + + + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +System.Reflection.Metadata 1.7.0 - MIT + + (c) 2008 VeriSign, Inc. -copyright Excepting NotParsed -copyright symbol. name author' The company -Copyright WrapNonExceptionThrows CommandLine.Tests, PublicKey -Copyright (c) 2005 - 2018 Giacomo Stelluti Scala & Contributors +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 2007 James Newton-King +Copyright (c) 1991-2017 Unicode, Inc. +Copyright (c) 2013-2017, Alfred Klomp +Copyright (c) 2015-2017, Wojciech Mula +Copyright (c) 2005-2007, Nick Galbreath +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) 2016-2017, Matthieu Darbois +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -MIT License +The MIT License (MIT) -Copyright (c) +Copyright (c) .NET Foundation and Contributors -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +All rights reserved. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- ------------------------------------------------------------------- -FSharp.Core 4.5.2 - MIT +System.Runtime.CompilerServices.Unsafe 4.5.2 - MIT + + (c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -MIT License +The MIT License (MIT) -Copyright (c) +Copyright (c) .NET Foundation and Contributors -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +All rights reserved. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- ------------------------------------------------------------------- -FSharp.Core 4.6.2 - MIT +System.Runtime.CompilerServices.Unsafe 4.6.0 - MIT + + (c) 2008 VeriSign, Inc. (c) Microsoft Corporation. +Copyright (c) .NET Foundation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 2007 James Newton-King +Copyright (c) 1991-2017 Unicode, Inc. +Copyright (c) 2013-2017, Alfred Klomp +Copyright (c) 2015-2017, Wojciech Mula +Copyright (c) 2005-2007, Nick Galbreath +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) 2016-2017, Matthieu Darbois +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -MIT License +The MIT License (MIT) -Copyright (c) +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +System.Runtime.CompilerServices.Unsafe 4.7.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) .NET Foundation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 2007 James Newton-King +Copyright (c) 1991-2017 Unicode, Inc. +Copyright (c) 2013-2017, Alfred Klomp +Copyright (c) 2015-2017, Wojciech Mula +Copyright (c) 2005-2007, Nick Galbreath +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) 2016-2017, Matthieu Darbois +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +System.Security.Cryptography.ProtectedData 4.5.0 - MIT + + +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. +Copyright (c) 2011, Google Inc. +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) .NET Foundation and Contributors +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +------------------------------------------------------------------- + +------------------------------------------------------------------- + +System.Text.Encoding.CodePages 4.5.1 - MIT + + + +The MIT License (MIT) + +Copyright (c) .NET Foundation and Contributors + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- ------------------------------------------------------------------- -Microsoft.NETCore.DotNetAppHost 2.1.0 - MIT +System.Text.Encodings.Web 4.6.0 - MIT + + (c) 2008 VeriSign, Inc. (c) Microsoft Corporation. +Copyright (c) .NET Foundation. Copyright (c) 2011, Google Inc. -Copyright (c) 1998 Microsoft. To (c) 1997-2005 Sean Eron Anderson. -Copyright (c) 2015 .NET Foundation -Copyright (c) Microsoft Corporation -Copyright (c) 2012-2014, Yann Collet +Copyright (c) 2007 James Newton-King Copyright (c) 1991-2017 Unicode, Inc. +Copyright (c) 2013-2017, Alfred Klomp +Copyright (c) 2015-2017, Wojciech Mula +Copyright (c) 2005-2007, Nick Galbreath Portions (c) International Organization Copyright (c) 2015 The Chromium Authors. -Copyright (c) The Internet Society 1997. Copyright (c) 2004-2006 Intel Corporation +Copyright (c) 2016-2017, Matthieu Darbois Copyright (c) .NET Foundation Contributors -Copyright (c) The Internet Society (2003). +Copyright (c) .NET Foundation and Contributors Copyright (c) 2011 Novell, Inc (http://www.novell.com) Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. -Copyright (c) 2014 Ryan Juckett http://www.ryanjuckett.com -Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc. -Copyright (c) 2003-2005 Hewlett-Packard Development Company, L.P. Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. -Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. To -MIT License +The MIT License (MIT) -Copyright (c) +Copyright (c) .NET Foundation and Contributors -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +All rights reserved. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- ------------------------------------------------------------------- -Microsoft.NETCore.DotNetHostPolicy 2.1.0 - MIT +System.Text.Json 4.6.0 - MIT + + (c) 2008 VeriSign, Inc. (c) Microsoft Corporation. +Copyright (c) .NET Foundation. Copyright (c) 2011, Google Inc. -Copyright (c) 1998 Microsoft. To (c) 1997-2005 Sean Eron Anderson. -Copyright (c) 2015 .NET Foundation -Copyright (c) Microsoft Corporation -Copyright (c) 2012-2014, Yann Collet +Copyright (c) 2007 James Newton-King Copyright (c) 1991-2017 Unicode, Inc. +Copyright (c) 2013-2017, Alfred Klomp +Copyright (c) 2015-2017, Wojciech Mula +Copyright (c) 2005-2007, Nick Galbreath Portions (c) International Organization Copyright (c) 2015 The Chromium Authors. -Copyright (c) The Internet Society 1997. Copyright (c) 2004-2006 Intel Corporation +Copyright (c) 2016-2017, Matthieu Darbois Copyright (c) .NET Foundation Contributors -Copyright (c) The Internet Society (2003). +Copyright (c) .NET Foundation and Contributors Copyright (c) 2011 Novell, Inc (http://www.novell.com) Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. -Copyright (c) 2014 Ryan Juckett http://www.ryanjuckett.com -Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc. -Copyright (c) 2003-2005 Hewlett-Packard Development Company, L.P. Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. -Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. To -MIT License +The MIT License (MIT) -Copyright (c) +Copyright (c) .NET Foundation and Contributors -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +All rights reserved. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- ------------------------------------------------------------------- -Microsoft.NETCore.DotNetHostResolver 2.1.0 - MIT +System.Threading.Tasks.Extensions 4.5.2 - MIT + + (c) 2008 VeriSign, Inc. (c) Microsoft Corporation. Copyright (c) 2011, Google Inc. -Copyright (c) 1998 Microsoft. To (c) 1997-2005 Sean Eron Anderson. -Copyright (c) 2015 .NET Foundation -Copyright (c) Microsoft Corporation -Copyright (c) 2012-2014, Yann Collet Copyright (c) 1991-2017 Unicode, Inc. Portions (c) International Organization Copyright (c) 2015 The Chromium Authors. -Copyright (c) The Internet Society 1997. Copyright (c) 2004-2006 Intel Corporation Copyright (c) .NET Foundation Contributors -Copyright (c) The Internet Society (2003). +Copyright (c) .NET Foundation and Contributors Copyright (c) 2011 Novell, Inc (http://www.novell.com) Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. -Copyright (c) 2014 Ryan Juckett http://www.ryanjuckett.com -Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc. -Copyright (c) 2003-2005 Hewlett-Packard Development Company, L.P. Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. -Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. To -MIT License +The MIT License (MIT) -Copyright (c) +Copyright (c) .NET Foundation and Contributors -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +All rights reserved. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- ------------------------------------------------------------------- -Microsoft.NETCore.Platforms 2.1.0 - MIT +System.Threading.Tasks.Extensions 4.5.3 - MIT + + (c) 2008 VeriSign, Inc. (c) Microsoft Corporation. Copyright (c) 2011, Google Inc. @@ -260,108 +3803,174 @@ Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -MIT License +The MIT License (MIT) -Copyright (c) +Copyright (c) .NET Foundation and Contributors -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +All rights reserved. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- ------------------------------------------------------------------- -Microsoft.NETCore.Targets 2.1.0 - MIT +System.ValueTuple 4.4.0 - MIT + + (c) 2008 VeriSign, Inc. (c) Microsoft Corporation. -Copyright (c) 2011, Google Inc. (c) 1997-2005 Sean Eron Anderson. Copyright (c) 1991-2017 Unicode, Inc. Portions (c) International Organization -Copyright (c) 2015 The Chromium Authors. Copyright (c) 2004-2006 Intel Corporation Copyright (c) .NET Foundation Contributors Copyright (c) .NET Foundation and Contributors Copyright (c) 2011 Novell, Inc (http://www.novell.com) Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) -Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS -MIT License +The MIT License (MIT) -Copyright (c) +Copyright (c) .NET Foundation and Contributors -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +All rights reserved. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- ------------------------------------------------------------------- -Microsoft.VisualStudio.Threading 16.0.102 - MIT +YamlDotNet 7.0.0 - MIT + + (c) 2008 VeriSign, Inc. -(c) Microsoft Corporation. +Copyright (c) Antoine Aubry and contributors 2008 - 2019 +8Copyright (c) Antoine Aubry and contributors 2008 - 2019 +Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Antoine Aubry and contributors -MIT License +Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Antoine Aubry and contributors -Copyright (c) +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- ------------------------------------------------------------------- -Microsoft.VisualStudio.Validation 15.3.15 - MIT -(c) 2008 VeriSign, Inc. -(c) Microsoft Corporation. - -MIT License - -Copyright (c) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +johnazariah/roslyn-wrapper 49f5d9b9e26b0cc9925447e09a50b812df6f0cfb - Unlicense -------------------------------------------------------------------- -------------------------------------------------------------------- +Copyright 2015 -NETStandard.Library 2.0.3 - MIT +This is free and unencumbered software released into the public domain. -MIT License +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. -Copyright (c) +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +For more information, please refer to -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- ------------------------------------------------------------------- -Newtonsoft.Json 12.0.1 - MIT +Microsoft.NETCore.DotNetHostPolicy 2.1.0 - MIT (c) 2008 VeriSign, Inc. -Copyright James Newton-King 2008 -Copyright (c) 2007 James Newton-King -Copyright (c) James Newton-King 2008 +(c) Microsoft Corporation. +Copyright (c) 2011, Google Inc. +Copyright (c) 1998 Microsoft. To +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 2015 .NET Foundation +Copyright (c) Microsoft Corporation +Copyright (c) 2012-2014, Yann Collet +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) The Internet Society 1997. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) The Internet Society (2003). +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) 2014 Ryan Juckett http://www.ryanjuckett.com +Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc. +Copyright (c) 2003-2005 Hewlett-Packard Development Company, L.P. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS +Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. +Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. To MIT License @@ -377,11 +3986,32 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ------------------------------------------------------------------- -Newtonsoft.Json.Bson 1.0.2 - MIT +Microsoft.NETCore.DotNetHostResolver 2.1.0 - MIT (c) 2008 VeriSign, Inc. -Copyright James Newton-King 2017 -Copyright (c) 2017 James Newton-King -Copyright (c) James Newton-King 2017 +(c) Microsoft Corporation. +Copyright (c) 2011, Google Inc. +Copyright (c) 1998 Microsoft. To +(c) 1997-2005 Sean Eron Anderson. +Copyright (c) 2015 .NET Foundation +Copyright (c) Microsoft Corporation +Copyright (c) 2012-2014, Yann Collet +Copyright (c) 1991-2017 Unicode, Inc. +Portions (c) International Organization +Copyright (c) 2015 The Chromium Authors. +Copyright (c) The Internet Society 1997. +Copyright (c) 2004-2006 Intel Corporation +Copyright (c) .NET Foundation Contributors +Copyright (c) The Internet Society (2003). +Copyright (c) 2011 Novell, Inc (http://www.novell.com) +Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler +Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) +Copyright (c) 2009, 2010, 2013-2016 by the Brotli Authors. +Copyright (c) 2014 Ryan Juckett http://www.ryanjuckett.com +Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc. +Copyright (c) 2003-2005 Hewlett-Packard Development Company, L.P. +Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS +Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. +Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & Digital Equipment Corporation, Maynard, Mass. To MIT License @@ -397,7 +4027,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ------------------------------------------------------------------- -System.Collections.Immutable 1.5.0 - MIT +Microsoft.NETCore.Targets 2.1.0 - MIT (c) 2008 VeriSign, Inc. (c) Microsoft Corporation. Copyright (c) 2011, Google Inc. @@ -428,7 +4058,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ------------------------------------------------------------------- -System.Reflection.Metadata 1.6.0 - MIT +Microsoft.VisualStudio.Threading 16.0.102 - MIT +(c) 2008 VeriSign, Inc. +(c) Microsoft Corporation. MIT License @@ -444,19 +4076,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ------------------------------------------------------------------- -System.ValueTuple 4.4.0 - MIT +Microsoft.VisualStudio.Validation 15.3.15 - MIT (c) 2008 VeriSign, Inc. (c) Microsoft Corporation. -(c) 1997-2005 Sean Eron Anderson. -Copyright (c) 1991-2017 Unicode, Inc. -Portions (c) International Organization -Copyright (c) 2004-2006 Intel Corporation -Copyright (c) .NET Foundation Contributors -Copyright (c) .NET Foundation and Contributors -Copyright (c) 2011 Novell, Inc (http://www.novell.com) -Copyright (c) 1995-2017 Jean-loup Gailly and Mark Adler -Copyright (c) 2015 Xamarin, Inc (http://www.xamarin.com) -Copyright (c) YEAR W3C(r) (MIT, ERCIM, Keio, Beihang). Disclaimers THIS WORK IS PROVIDED AS MIT License @@ -472,7 +4094,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ------------------------------------------------------------------- -YamlDotNet 6.0.0 - MIT +NETStandard.Library 2.0.3 - MIT MIT License @@ -485,36 +4107,3 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------- - -------------------------------------------------------------------- - -johnazariah/roslyn-wrapper 49f5d9b9e26b0cc9925447e09a50b812df6f0cfb - Unlicense -Copyright 2015 - -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to http://unlicense.org/ - - -------------------------------------------------------------------- \ No newline at end of file From 5f8268e42a938dc9603b8f1cf640f33e7665dedf Mon Sep 17 00:00:00 2001 From: bettinaheim <34236215+bettinaheim@users.noreply.github.com> Date: Wed, 19 Aug 2020 17:39:24 -0700 Subject: [PATCH 30/32] Fixing a unit test and the solution paths (#351) --- Simulation.sln | 17 +++-------------- .../Simulators.Tests/Circuits/Recursion.qs | 2 +- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/Simulation.sln b/Simulation.sln index 265863d4ce3..8b6e60cdf10 100644 --- a/Simulation.sln +++ b/Simulation.sln @@ -63,17 +63,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IonQExe", "src\Simulation\S EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QCIExe", "src\Simulation\Simulators.Tests\TestProjects\QCIExe\QCIExe.csproj", "{C015FF41-9A51-4AF0-AEFC-2547D596B10A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TargetedExe", "src\Simulation\Simulators.Tests\TestProjects\TargetedExe\TargetedExe.csproj", "{D292BF18-3956-4827-820E-254C3F81EF09}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TargetedExe", "src\Simulation\Simulators.Tests\TestProjects\TargetedExe\TargetedExe.csproj", "{D292BF18-3956-4827-820E-254C3F81EF09}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{EBDE31D8-BB73-4E7E-B035-DE92657F3700}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Simulation", "Simulation", "{5497B844-8266-4B66-B51B-AE26148E9F78}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Simulators.Tests", "Simulators.Tests", "{C64D5562-CF69-4FF0-8A44-19FE8BEB8CE4}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestProjects", "TestProjects", "{877C3E74-5533-4517-8EB1-CA24EBAB4A25}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IntrinsicTests", "src\Simulation\Simulators.Tests\TestProjects\IntrinsicTests\IntrinsicTests.csproj", "{D5D41201-101F-4C0D-B6A0-201D8FC3AB91}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntrinsicTests", "src\Simulation\Simulators.Tests\TestProjects\IntrinsicTests\IntrinsicTests.csproj", "{D5D41201-101F-4C0D-B6A0-201D8FC3AB91}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -534,10 +526,7 @@ Global {55833C6C-6E91-4413-9F77-96B3A09666B8} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} {C015FF41-9A51-4AF0-AEFC-2547D596B10A} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} {D292BF18-3956-4827-820E-254C3F81EF09} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} - {5497B844-8266-4B66-B51B-AE26148E9F78} = {EBDE31D8-BB73-4E7E-B035-DE92657F3700} - {C64D5562-CF69-4FF0-8A44-19FE8BEB8CE4} = {5497B844-8266-4B66-B51B-AE26148E9F78} - {877C3E74-5533-4517-8EB1-CA24EBAB4A25} = {C64D5562-CF69-4FF0-8A44-19FE8BEB8CE4} - {D5D41201-101F-4C0D-B6A0-201D8FC3AB91} = {877C3E74-5533-4517-8EB1-CA24EBAB4A25} + {D5D41201-101F-4C0D-B6A0-201D8FC3AB91} = {09C842CB-930C-4C7D-AD5F-E30DE4A55820} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {929C0464-86D8-4F70-8835-0A5EAF930821} diff --git a/src/Simulation/Simulators.Tests/Circuits/Recursion.qs b/src/Simulation/Simulators.Tests/Circuits/Recursion.qs index 7583d384a3f..f32486ecaa9 100644 --- a/src/Simulation/Simulators.Tests/Circuits/Recursion.qs +++ b/src/Simulation/Simulators.Tests/Circuits/Recursion.qs @@ -46,7 +46,7 @@ namespace Microsoft.Quantum.Simulation.Simulators.Tests.Circuits { return x; } else { - let fct = GenRecursionPartial(_, cnt - 1); + let fct = GenRecursionPartial<'T>(_, cnt - 1); return fct(x); } } From 43ab25df1b370df0afe0808586d4117bbfd22bb2 Mon Sep 17 00:00:00 2001 From: bettinaheim <34236215+bettinaheim@users.noreply.github.com> Date: Thu, 20 Aug 2020 20:53:04 -0700 Subject: [PATCH 31/32] classical control tracer ... (#354) Co-authored-by: Bettina Heim --- .../Circuits/ClassicalControl.qs | 72 ++--------------- .../QCTraceSimulator/Circuits/Interface.qs | 52 +++++++++++-- .../QCTraceSimulator.ClassicalControl.cs | 78 +++++++++++++++++-- 3 files changed, 122 insertions(+), 80 deletions(-) diff --git a/src/Simulation/Simulators/QCTraceSimulator/Circuits/ClassicalControl.qs b/src/Simulation/Simulators/QCTraceSimulator/Circuits/ClassicalControl.qs index 04b7b85ab33..5ea025c9b56 100644 --- a/src/Simulation/Simulators/QCTraceSimulator/Circuits/ClassicalControl.qs +++ b/src/Simulation/Simulators/QCTraceSimulator/Circuits/ClassicalControl.qs @@ -7,93 +7,37 @@ namespace Microsoft.Quantum.Simulation.Simulators.QCTraceSimulators.Circuits // Private helper operations. operation ApplyIfElseIntrinsic(measurementResult : Result, onResultZeroOp : (Unit => Unit) , onResultOneOp : (Unit => Unit)) : Unit { - body (...) { - Interface_ApplyIfElse(measurementResult, onResultZeroOp, onResultOneOp); - } + Interface_ApplyIfElse(measurementResult, onResultZeroOp, onResultOneOp); } operation ApplyIfElseIntrinsicA(measurementResult : Result, onResultZeroOp : (Unit => Unit is Adj) , onResultOneOp : (Unit => Unit is Adj)) : Unit is Adj { - body (...) { - Interface_ApplyIfElse(measurementResult, onResultZeroOp, onResultOneOp); - } - - adjoint (...) { - Interface_ApplyIfElseA(measurementResult, onResultZeroOp, onResultOneOp); - } + Interface_ApplyIfElseA(measurementResult, onResultZeroOp, onResultOneOp); } operation ApplyIfElseIntrinsicC(measurementResult : Result, onResultZeroOp : (Unit => Unit is Ctl) , onResultOneOp : (Unit => Unit is Ctl)) : Unit is Ctl { - body (...) { - Interface_ApplyIfElse(measurementResult, onResultZeroOp, onResultOneOp); - } - - controlled (ctrls, ...) { - Interface_ApplyIfElseC(ctrls, measurementResult, onResultZeroOp, onResultOneOp); - } + Interface_ApplyIfElseC(measurementResult, onResultZeroOp, onResultOneOp); } operation ApplyIfElseIntrinsicCA(measurementResult : Result, onResultZeroOp : (Unit => Unit is Ctl + Adj) , onResultOneOp : (Unit => Unit is Ctl + Adj)) : Unit is Ctl + Adj { - body (...) { - Interface_ApplyIfElse(measurementResult, onResultZeroOp, onResultOneOp); - } - - adjoint (...) { - Interface_ApplyIfElseA(measurementResult, onResultZeroOp, onResultOneOp); - } - - controlled (ctrls, ...) { - Interface_ApplyIfElseC(ctrls, measurementResult, onResultZeroOp, onResultOneOp); - } - - controlled adjoint (ctrls, ...) { - Interface_ApplyIfElseCA(ctrls, measurementResult, onResultZeroOp, onResultOneOp); - } + Interface_ApplyIfElseCA(measurementResult, onResultZeroOp, onResultOneOp); } // Private helper operations. operation ApplyConditionallyIntrinsic(measurementResults : Result[], resultsValues : Result[], onEqualOp : (Unit => Unit) , onNonEqualOp : (Unit => Unit)) : Unit { - body (...) { - Interface_ApplyConditionally(measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } + Interface_ApplyConditionally(measurementResults, resultsValues, onEqualOp, onNonEqualOp); } operation ApplyConditionallyIntrinsicA(measurementResults : Result[], resultsValues : Result[], onEqualOp : (Unit => Unit is Adj) , onNonEqualOp : (Unit => Unit is Adj)) : Unit is Adj { - body (...) { - Interface_ApplyConditionally(measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } - - adjoint (...) { - Interface_ApplyConditionallyA(measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } + Interface_ApplyConditionallyA(measurementResults, resultsValues, onEqualOp, onNonEqualOp); } operation ApplyConditionallyIntrinsicC(measurementResults : Result[], resultsValues : Result[], onEqualOp : (Unit => Unit is Ctl) , onNonEqualOp : (Unit => Unit is Ctl)) : Unit is Ctl { - body (...) { - Interface_ApplyConditionally(measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } - - controlled (ctrls, ...) { - Interface_ApplyConditionallyC(ctrls, measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } + Interface_ApplyConditionallyC(measurementResults, resultsValues, onEqualOp, onNonEqualOp); } operation ApplyConditionallyIntrinsicCA(measurementResults : Result[], resultsValues : Result[], onEqualOp : (Unit => Unit is Ctl + Adj) , onNonEqualOp : (Unit => Unit is Ctl + Adj)) : Unit is Ctl + Adj { - body (...) { - Interface_ApplyConditionally(measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } - - adjoint (...) { - Interface_ApplyConditionallyA(measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } - - controlled (ctrls, ...) { - Interface_ApplyConditionallyC(ctrls, measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } - - controlled adjoint (ctrls, ...) { - Interface_ApplyConditionallyCA(ctrls, measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } + Interface_ApplyConditionallyCA(measurementResults, resultsValues, onEqualOp, onNonEqualOp); } } diff --git a/src/Simulation/Simulators/QCTraceSimulator/Circuits/Interface.qs b/src/Simulation/Simulators/QCTraceSimulator/Circuits/Interface.qs index b33effcbbe1..3f69a55bd11 100644 --- a/src/Simulation/Simulators/QCTraceSimulator/Circuits/Interface.qs +++ b/src/Simulation/Simulators/QCTraceSimulator/Circuits/Interface.qs @@ -81,7 +81,11 @@ namespace Microsoft.Quantum.Simulation.Simulators.QCTraceSimulators.Implementati /// /// Performs the onResultZeroOp when measurementResult is Zero, else performs the onResultOneOp. /// - operation Interface_ApplyIfElse (measurementResult : Result, onResultZeroOp : (Unit => Unit) , onResultOneOp : (Unit => Unit)) : Unit { + operation Interface_ApplyIfElse ( + measurementResult : Result, + onResultZeroOp : (Unit => Unit), + onResultOneOp : (Unit => Unit) + ) : Unit { body intrinsic; } @@ -89,7 +93,11 @@ namespace Microsoft.Quantum.Simulation.Simulators.QCTraceSimulators.Implementati /// Performs the onResultZeroOp when measurementResult is Zero, else performs the onResultOneOp. /// onReusltZeroOp and onResultOneOp must both be adjointable. ///
- operation Interface_ApplyIfElseA (measurementResult : Result, onResultZeroOp : (Unit => Unit is Adj) , onResultOneOp : (Unit => Unit is Adj)) : Unit { + operation Interface_ApplyIfElseA ( + measurementResult : Result, + onResultZeroOp : (Unit => Unit is Adj), + onResultOneOp : (Unit => Unit is Adj) + ) : Unit is Adj { body intrinsic; } @@ -97,7 +105,11 @@ namespace Microsoft.Quantum.Simulation.Simulators.QCTraceSimulators.Implementati /// Performs the onResultZeroOp when measurementResult is Zero, else performs the onResultOneOp. /// onReusltZeroOp and onResultOneOp must both be controllable. /// - operation Interface_ApplyIfElseC (ctrls : Qubit[], measurementResult : Result, onResultZeroOp : (Unit => Unit is Ctl) , onResultOneOp : (Unit => Unit is Ctl)) : Unit { + operation Interface_ApplyIfElseC ( + measurementResult : Result, + onResultZeroOp : (Unit => Unit is Ctl), + onResultOneOp : (Unit => Unit is Ctl) + ) : Unit is Ctl { body intrinsic; } @@ -105,7 +117,11 @@ namespace Microsoft.Quantum.Simulation.Simulators.QCTraceSimulators.Implementati /// Performs the onResultZeroOp when measurementResult is Zero, else performs the onResultOneOp. /// onReusltZeroOp and onResultOneOp must both be controllable and adjointable. /// - operation Interface_ApplyIfElseCA (ctrls : Qubit[], measurementResult : Result, onResultZeroOp : (Unit => Unit is Ctl + Adj) , onResultOneOp : (Unit => Unit is Ctl + Adj)) : Unit { + operation Interface_ApplyIfElseCA ( + measurementResult : Result, + onResultZeroOp : (Unit => Unit is Ctl + Adj), + onResultOneOp : (Unit => Unit is Ctl + Adj) + ) : Unit is Adj + Ctl { body intrinsic; } @@ -113,7 +129,12 @@ namespace Microsoft.Quantum.Simulation.Simulators.QCTraceSimulators.Implementati /// Performs the onEqualOp when each element of measurementResults is equal to the corresponding /// element of resultsValues, else performs onNonEqualOp. /// - operation Interface_ApplyConditionally (measurementResults : Result[], resultsValues : Result[], onEqualOp : (Unit => Unit) , onNonEqualOp : (Unit => Unit)) : Unit { + operation Interface_ApplyConditionally ( + measurementResults : Result[], + resultsValues : Result[], + onEqualOp : (Unit => Unit), + onNonEqualOp : (Unit => Unit) + ) : Unit { body intrinsic; } @@ -122,7 +143,12 @@ namespace Microsoft.Quantum.Simulation.Simulators.QCTraceSimulators.Implementati /// element of resultsValues, else performs onNonEqualOp. /// onEqualOp and onNonEqualOp must both be adjointable. /// - operation Interface_ApplyConditionallyA (measurementResults : Result[], resultsValues : Result[], onEqualOp : (Unit => Unit is Adj) , onNonEqualOp : (Unit => Unit is Adj)) : Unit { + operation Interface_ApplyConditionallyA ( + measurementResults : Result[], + resultsValues : Result[], + onEqualOp : (Unit => Unit is Adj), + onNonEqualOp : (Unit => Unit is Adj) + ) : Unit is Adj { body intrinsic; } @@ -131,7 +157,12 @@ namespace Microsoft.Quantum.Simulation.Simulators.QCTraceSimulators.Implementati /// element of resultsValues, else performs onNonEqualOp. /// onEqualOp and onNonEqualOp must both be controllable. /// - operation Interface_ApplyConditionallyC (ctrls : Qubit[], measurementResults : Result[], resultsValues : Result[], onEqualOp : (Unit => Unit is Ctl) , onNonEqualOp : (Unit => Unit is Ctl)) : Unit { + operation Interface_ApplyConditionallyC ( + measurementResults : Result[], + resultsValues : Result[], + onEqualOp : (Unit => Unit is Ctl), + onNonEqualOp : (Unit => Unit is Ctl) + ) : Unit is Ctl { body intrinsic; } @@ -140,7 +171,12 @@ namespace Microsoft.Quantum.Simulation.Simulators.QCTraceSimulators.Implementati /// element of resultsValues, else performs onNonEqualOp. /// onEqualOp and onNonEqualOp must both be controllable and adjointable. /// - operation Interface_ApplyConditionallyCA (ctrls : Qubit[], measurementResults : Result[], resultsValues : Result[], onEqualOp : (Unit => Unit is Ctl + Adj) , onNonEqualOp : (Unit => Unit is Ctl + Adj)) : Unit { + operation Interface_ApplyConditionallyCA ( + measurementResults : Result[], + resultsValues : Result[], + onEqualOp : (Unit => Unit is Ctl + Adj), + onNonEqualOp : (Unit => Unit is Ctl + Adj) + ) : Unit is Adj + Ctl { body intrinsic; } diff --git a/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.ClassicalControl.cs b/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.ClassicalControl.cs index df7d799a8f1..c9b52f916e4 100644 --- a/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.ClassicalControl.cs +++ b/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.ClassicalControl.cs @@ -140,6 +140,12 @@ public TracerApplyIfElseA(QCTraceSimulatorImpl m) : base(m) } public override Func<(Result, IAdjointable, IAdjointable), QVoid> Body => (q) => + { + (Result measurementResult, ICallable onZero, ICallable onOne) = q; + return ExecuteConditionalStatement(measurementResult, onZero, onOne, OperationFunctor.Body, null); + }; + + public override Func<(Result, IAdjointable, IAdjointable), QVoid> AdjointBody => (q) => { (Result measurementResult, ICallable onZero, ICallable onOne) = q; return ExecuteConditionalStatement(measurementResult, onZero, onOne, OperationFunctor.Adjoint, null); @@ -155,9 +161,15 @@ public TracerApplyIfElseC(QCTraceSimulatorImpl m) : base(m) this.tracerCore = m; } - public override Func<(IQArray, Result, IControllable, IControllable), QVoid> Body => (q) => + public override Func<(Result, IControllable, IControllable), QVoid> Body => (q) => { - (IQArray ctrls, Result measurementResult, ICallable onZero, ICallable onOne) = q; + (Result measurementResult, ICallable onZero, ICallable onOne) = q; + return ExecuteConditionalStatement(measurementResult, onZero, onOne, OperationFunctor.Body, null); + }; + + public override Func<(IQArray, (Result, IControllable, IControllable)), QVoid> ControlledBody => (q) => + { + (IQArray ctrls, (Result measurementResult, ICallable onZero, ICallable onOne)) = q; OperationFunctor type = AdjustForNoControls(OperationFunctor.Controlled, ctrls); return ExecuteConditionalStatement(measurementResult, onZero, onOne, type, ctrls); }; @@ -172,9 +184,28 @@ public TracerApplyIfElseCA(QCTraceSimulatorImpl m) : base(m) this.tracerCore = m; } - public override Func<(IQArray, Result, IUnitary, IUnitary), QVoid> Body => (q) => + public override Func<(Result, IUnitary, IUnitary), QVoid> Body => (q) => + { + (Result measurementResult, ICallable onZero, ICallable onOne) = q; + return ExecuteConditionalStatement(measurementResult, onZero, onOne, OperationFunctor.Body, null); + }; + + public override Func<(Result, IUnitary, IUnitary), QVoid> AdjointBody => (q) => + { + (Result measurementResult, ICallable onZero, ICallable onOne) = q; + return ExecuteConditionalStatement(measurementResult, onZero, onOne, OperationFunctor.Adjoint, null); + }; + + public override Func<(IQArray, (Result, IUnitary, IUnitary)), QVoid> ControlledBody => (q) => + { + (IQArray ctrls, (Result measurementResult, ICallable onZero, ICallable onOne)) = q; + OperationFunctor type = AdjustForNoControls(OperationFunctor.Controlled, ctrls); + return ExecuteConditionalStatement(measurementResult, onZero, onOne, type, ctrls); + }; + + public override Func<(IQArray, (Result, IUnitary, IUnitary)), QVoid> ControlledAdjointBody => (q) => { - (IQArray ctrls, Result measurementResult, ICallable onZero, ICallable onOne) = q; + (IQArray ctrls, (Result measurementResult, ICallable onZero, ICallable onOne)) = q; OperationFunctor type = AdjustForNoControls(OperationFunctor.ControlledAdjoint, ctrls); return ExecuteConditionalStatement(measurementResult, onZero, onOne, type, ctrls); }; @@ -210,6 +241,12 @@ public TracerApplyConditionallyA(QCTraceSimulatorImpl m) : base(m) } public override Func<(IQArray, IQArray, IAdjointable, IAdjointable), QVoid> Body => (q) => + { + (IQArray measurementResults, IQArray comparisonResults, ICallable onEqualOp, ICallable onNonEqualOp) = q; + return ExecuteConditionalStatement(measurementResults, comparisonResults, onEqualOp, onNonEqualOp, OperationFunctor.Body, null); + }; + + public override Func<(IQArray, IQArray, IAdjointable, IAdjointable), QVoid> AdjointBody => (q) => { (IQArray measurementResults, IQArray comparisonResults, ICallable onEqualOp, ICallable onNonEqualOp) = q; return ExecuteConditionalStatement(measurementResults, comparisonResults, onEqualOp, onNonEqualOp, OperationFunctor.Adjoint, null); @@ -225,9 +262,15 @@ public TracerApplyConditionallyC(QCTraceSimulatorImpl m) : base(m) this.tracerCore = m; } - public override Func<(IQArray, IQArray, IQArray, IControllable, IControllable), QVoid> Body => (q) => + public override Func<(IQArray, IQArray, IControllable, IControllable), QVoid> Body => (q) => { - (IQArray ctrls, IQArray measurementResults, IQArray comparisonResults, ICallable onEqualOp, ICallable onNonEqualOp) = q; + (IQArray measurementResults, IQArray comparisonResults, ICallable onEqualOp, ICallable onNonEqualOp) = q; + return ExecuteConditionalStatement(measurementResults, comparisonResults, onEqualOp, onNonEqualOp, OperationFunctor.Body, null); + }; + + public override Func<(IQArray, (IQArray, IQArray, IControllable, IControllable)), QVoid> ControlledBody => (q) => + { + (IQArray ctrls, (IQArray measurementResults, IQArray comparisonResults, ICallable onEqualOp, ICallable onNonEqualOp)) = q; OperationFunctor type = AdjustForNoControls(OperationFunctor.Controlled, ctrls); return ExecuteConditionalStatement(measurementResults, comparisonResults, onEqualOp, onNonEqualOp, type, ctrls); }; @@ -242,12 +285,31 @@ public TracerApplyConditionallyCA(QCTraceSimulatorImpl m) : base(m) this.tracerCore = m; } - public override Func<(IQArray, IQArray, IQArray, IUnitary, IUnitary), QVoid> Body => (q) => + public override Func<(IQArray, IQArray, IUnitary, IUnitary), QVoid> Body => (q) => { - (IQArray ctrls, IQArray measurementResults, IQArray comparisonResults, ICallable onEqualOp, ICallable onNonEqualOp) = q; + (IQArray measurementResults, IQArray comparisonResults, ICallable onEqualOp, ICallable onNonEqualOp) = q; + return ExecuteConditionalStatement(measurementResults, comparisonResults, onEqualOp, onNonEqualOp, OperationFunctor.Body, null); + }; + + public override Func<(IQArray, IQArray, IUnitary, IUnitary), QVoid> AdjointBody => (q) => + { + (IQArray measurementResults, IQArray comparisonResults, ICallable onEqualOp, ICallable onNonEqualOp) = q; + return ExecuteConditionalStatement(measurementResults, comparisonResults, onEqualOp, onNonEqualOp, OperationFunctor.Adjoint, null); + }; + + public override Func<(IQArray, (IQArray, IQArray, IUnitary, IUnitary)), QVoid> ControlledBody => (q) => + { + (IQArray ctrls, (IQArray measurementResults, IQArray comparisonResults, ICallable onEqualOp, ICallable onNonEqualOp)) = q; OperationFunctor type = AdjustForNoControls(OperationFunctor.Controlled, ctrls); return ExecuteConditionalStatement(measurementResults, comparisonResults, onEqualOp, onNonEqualOp, type, ctrls); }; + + public override Func<(IQArray, (IQArray, IQArray, IUnitary, IUnitary)), QVoid> ControlledAdjointBody => (q) => + { + (IQArray ctrls, (IQArray measurementResults, IQArray comparisonResults, ICallable onEqualOp, ICallable onNonEqualOp)) = q; + OperationFunctor type = AdjustForNoControls(OperationFunctor.ControlledAdjoint, ctrls); + return ExecuteConditionalStatement(measurementResults, comparisonResults, onEqualOp, onNonEqualOp, type, ctrls); + }; } #endregion From 25635471f7f902accff6910b7f0af6a8eb79e606 Mon Sep 17 00:00:00 2001 From: "Stefan J. Wernli" Date: Thu, 20 Aug 2020 23:26:49 -0700 Subject: [PATCH 32/32] Fixing ResourceEstimator conditional support --- ...Microsoft.Quantum.Simulation.Common.csproj | 1 - src/Simulation/Common/Simulators.Dev.props | 1 - .../Tests.CsharpGeneration.fsproj | 1 - .../HoneywellExe/HoneywellExe.csproj | 1 - .../TestProjects/IonQExe/IonQExe.csproj | 1 - .../Library with Spaces.csproj | 1 - .../TestProjects/Library1/Library1.csproj | 1 - .../TestProjects/Library2/Library2.csproj | 1 - .../TestProjects/QCIExe/QCIExe.csproj | 1 - .../TargetedExe/TargetedExe.csproj | 1 - .../TestProjects/UnitTests/UnitTests.csproj | 1 - .../Circuits/ClassicalControl.qs | 43 -------- .../QCTraceSimulator/Circuits/Interface.qs | 102 ------------------ .../QCTraceSimulator.ClassicalControl.cs | 16 +-- 14 files changed, 8 insertions(+), 164 deletions(-) delete mode 100644 src/Simulation/Simulators/QCTraceSimulator/Circuits/ClassicalControl.qs diff --git a/src/Simulation/Common/Microsoft.Quantum.Simulation.Common.csproj b/src/Simulation/Common/Microsoft.Quantum.Simulation.Common.csproj index 42301caae01..db67c8130ed 100644 --- a/src/Simulation/Common/Microsoft.Quantum.Simulation.Common.csproj +++ b/src/Simulation/Common/Microsoft.Quantum.Simulation.Common.csproj @@ -15,7 +15,6 @@ -
diff --git a/src/Simulation/Common/Simulators.Dev.props b/src/Simulation/Common/Simulators.Dev.props index 26f91dc7e75..7c44b437a38 100644 --- a/src/Simulation/Common/Simulators.Dev.props +++ b/src/Simulation/Common/Simulators.Dev.props @@ -21,7 +21,6 @@ - diff --git a/src/Simulation/CsharpGeneration.Tests/Tests.CsharpGeneration.fsproj b/src/Simulation/CsharpGeneration.Tests/Tests.CsharpGeneration.fsproj index 958a094630f..906f812078b 100644 --- a/src/Simulation/CsharpGeneration.Tests/Tests.CsharpGeneration.fsproj +++ b/src/Simulation/CsharpGeneration.Tests/Tests.CsharpGeneration.fsproj @@ -54,7 +54,6 @@ - diff --git a/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj index 6dfde6c6e7e..2556f1ae507 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj @@ -14,7 +14,6 @@ - diff --git a/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj index 2c5d4810e0c..c625e48ab23 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj @@ -14,7 +14,6 @@ - diff --git a/src/Simulation/Simulators.Tests/TestProjects/Library with Spaces/Library with Spaces.csproj b/src/Simulation/Simulators.Tests/TestProjects/Library with Spaces/Library with Spaces.csproj index a34a5937aff..f8f5cffa07f 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/Library with Spaces/Library with Spaces.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/Library with Spaces/Library with Spaces.csproj @@ -12,7 +12,6 @@ - diff --git a/src/Simulation/Simulators.Tests/TestProjects/Library1/Library1.csproj b/src/Simulation/Simulators.Tests/TestProjects/Library1/Library1.csproj index 5858f8419a2..2714be57fcf 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/Library1/Library1.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/Library1/Library1.csproj @@ -10,7 +10,6 @@ - diff --git a/src/Simulation/Simulators.Tests/TestProjects/Library2/Library2.csproj b/src/Simulation/Simulators.Tests/TestProjects/Library2/Library2.csproj index 5858f8419a2..2714be57fcf 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/Library2/Library2.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/Library2/Library2.csproj @@ -10,7 +10,6 @@ - diff --git a/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj index d9b0f822efd..dce291568b6 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj @@ -14,7 +14,6 @@ - diff --git a/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/TargetedExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/TargetedExe.csproj index f97574e67fc..f70061d4f60 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/TargetedExe.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/TargetedExe.csproj @@ -14,7 +14,6 @@ -
diff --git a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj index 8c25a24c8d8..ee89aad55fd 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj @@ -12,7 +12,6 @@ - diff --git a/src/Simulation/Simulators/QCTraceSimulator/Circuits/ClassicalControl.qs b/src/Simulation/Simulators/QCTraceSimulator/Circuits/ClassicalControl.qs deleted file mode 100644 index 5ea025c9b56..00000000000 --- a/src/Simulation/Simulators/QCTraceSimulator/Circuits/ClassicalControl.qs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Microsoft.Quantum.Simulation.Simulators.QCTraceSimulators.Circuits -{ - open Microsoft.Quantum.Simulation.Simulators.QCTraceSimulators.Implementation; - - // Private helper operations. - operation ApplyIfElseIntrinsic(measurementResult : Result, onResultZeroOp : (Unit => Unit) , onResultOneOp : (Unit => Unit)) : Unit { - Interface_ApplyIfElse(measurementResult, onResultZeroOp, onResultOneOp); - } - - operation ApplyIfElseIntrinsicA(measurementResult : Result, onResultZeroOp : (Unit => Unit is Adj) , onResultOneOp : (Unit => Unit is Adj)) : Unit is Adj { - Interface_ApplyIfElseA(measurementResult, onResultZeroOp, onResultOneOp); - } - - operation ApplyIfElseIntrinsicC(measurementResult : Result, onResultZeroOp : (Unit => Unit is Ctl) , onResultOneOp : (Unit => Unit is Ctl)) : Unit is Ctl { - Interface_ApplyIfElseC(measurementResult, onResultZeroOp, onResultOneOp); - } - - operation ApplyIfElseIntrinsicCA(measurementResult : Result, onResultZeroOp : (Unit => Unit is Ctl + Adj) , onResultOneOp : (Unit => Unit is Ctl + Adj)) : Unit is Ctl + Adj { - Interface_ApplyIfElseCA(measurementResult, onResultZeroOp, onResultOneOp); - } - - - // Private helper operations. - operation ApplyConditionallyIntrinsic(measurementResults : Result[], resultsValues : Result[], onEqualOp : (Unit => Unit) , onNonEqualOp : (Unit => Unit)) : Unit { - Interface_ApplyConditionally(measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } - - operation ApplyConditionallyIntrinsicA(measurementResults : Result[], resultsValues : Result[], onEqualOp : (Unit => Unit is Adj) , onNonEqualOp : (Unit => Unit is Adj)) : Unit is Adj { - Interface_ApplyConditionallyA(measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } - - operation ApplyConditionallyIntrinsicC(measurementResults : Result[], resultsValues : Result[], onEqualOp : (Unit => Unit is Ctl) , onNonEqualOp : (Unit => Unit is Ctl)) : Unit is Ctl { - Interface_ApplyConditionallyC(measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } - - operation ApplyConditionallyIntrinsicCA(measurementResults : Result[], resultsValues : Result[], onEqualOp : (Unit => Unit is Ctl + Adj) , onNonEqualOp : (Unit => Unit is Ctl + Adj)) : Unit is Ctl + Adj { - Interface_ApplyConditionallyCA(measurementResults, resultsValues, onEqualOp, onNonEqualOp); - } - -} diff --git a/src/Simulation/Simulators/QCTraceSimulator/Circuits/Interface.qs b/src/Simulation/Simulators/QCTraceSimulator/Circuits/Interface.qs index 3f69a55bd11..158dd4dabf6 100644 --- a/src/Simulation/Simulators/QCTraceSimulator/Circuits/Interface.qs +++ b/src/Simulation/Simulators/QCTraceSimulator/Circuits/Interface.qs @@ -78,106 +78,4 @@ namespace Microsoft.Quantum.Simulation.Simulators.QCTraceSimulators.Implementati body intrinsic; } - /// - /// Performs the onResultZeroOp when measurementResult is Zero, else performs the onResultOneOp. - /// - operation Interface_ApplyIfElse ( - measurementResult : Result, - onResultZeroOp : (Unit => Unit), - onResultOneOp : (Unit => Unit) - ) : Unit { - body intrinsic; - } - - /// - /// Performs the onResultZeroOp when measurementResult is Zero, else performs the onResultOneOp. - /// onReusltZeroOp and onResultOneOp must both be adjointable. - /// - operation Interface_ApplyIfElseA ( - measurementResult : Result, - onResultZeroOp : (Unit => Unit is Adj), - onResultOneOp : (Unit => Unit is Adj) - ) : Unit is Adj { - body intrinsic; - } - - /// - /// Performs the onResultZeroOp when measurementResult is Zero, else performs the onResultOneOp. - /// onReusltZeroOp and onResultOneOp must both be controllable. - /// - operation Interface_ApplyIfElseC ( - measurementResult : Result, - onResultZeroOp : (Unit => Unit is Ctl), - onResultOneOp : (Unit => Unit is Ctl) - ) : Unit is Ctl { - body intrinsic; - } - - /// - /// Performs the onResultZeroOp when measurementResult is Zero, else performs the onResultOneOp. - /// onReusltZeroOp and onResultOneOp must both be controllable and adjointable. - /// - operation Interface_ApplyIfElseCA ( - measurementResult : Result, - onResultZeroOp : (Unit => Unit is Ctl + Adj), - onResultOneOp : (Unit => Unit is Ctl + Adj) - ) : Unit is Adj + Ctl { - body intrinsic; - } - - /// - /// Performs the onEqualOp when each element of measurementResults is equal to the corresponding - /// element of resultsValues, else performs onNonEqualOp. - /// - operation Interface_ApplyConditionally ( - measurementResults : Result[], - resultsValues : Result[], - onEqualOp : (Unit => Unit), - onNonEqualOp : (Unit => Unit) - ) : Unit { - body intrinsic; - } - - /// - /// Performs the onEqualOp when each element of measurementResults is equal to the corresponding - /// element of resultsValues, else performs onNonEqualOp. - /// onEqualOp and onNonEqualOp must both be adjointable. - /// - operation Interface_ApplyConditionallyA ( - measurementResults : Result[], - resultsValues : Result[], - onEqualOp : (Unit => Unit is Adj), - onNonEqualOp : (Unit => Unit is Adj) - ) : Unit is Adj { - body intrinsic; - } - - /// - /// Performs the onEqualOp when each element of measurementResults is equal to the corresponding - /// element of resultsValues, else performs onNonEqualOp. - /// onEqualOp and onNonEqualOp must both be controllable. - /// - operation Interface_ApplyConditionallyC ( - measurementResults : Result[], - resultsValues : Result[], - onEqualOp : (Unit => Unit is Ctl), - onNonEqualOp : (Unit => Unit is Ctl) - ) : Unit is Ctl { - body intrinsic; - } - - /// - /// Performs the onEqualOp when each element of measurementResults is equal to the corresponding - /// element of resultsValues, else performs onNonEqualOp. - /// onEqualOp and onNonEqualOp must both be controllable and adjointable. - /// - operation Interface_ApplyConditionallyCA ( - measurementResults : Result[], - resultsValues : Result[], - onEqualOp : (Unit => Unit is Ctl + Adj), - onNonEqualOp : (Unit => Unit is Ctl + Adj) - ) : Unit is Adj + Ctl { - body intrinsic; - } - } diff --git a/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.ClassicalControl.cs b/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.ClassicalControl.cs index c9b52f916e4..e208131c2a1 100644 --- a/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.ClassicalControl.cs +++ b/src/Simulation/Simulators/QCTraceSimulator/QCTraceSimulator.ClassicalControl.cs @@ -114,7 +114,7 @@ private static OperationFunctor AdjustForNoControls(OperationFunctor type, IQArr #region ApplyIfElse - public class TracerApplyIfElse : Interface_ApplyIfElse + public class TracerApplyIfElse : Microsoft.Quantum.Simulation.QuantumProcessor.Extensions.ApplyIfElseIntrinsic { private QCTraceSimulatorImpl tracerCore { get; } @@ -130,7 +130,7 @@ public TracerApplyIfElse(QCTraceSimulatorImpl m) : base(m) }; } - public class TracerApplyIfElseA : Interface_ApplyIfElseA + public class TracerApplyIfElseA : Microsoft.Quantum.Simulation.QuantumProcessor.Extensions.ApplyIfElseIntrinsicA { private QCTraceSimulatorImpl tracerCore { get; } @@ -152,7 +152,7 @@ public TracerApplyIfElseA(QCTraceSimulatorImpl m) : base(m) }; } - public class TracerApplyIfElseC : Interface_ApplyIfElseC + public class TracerApplyIfElseC : Microsoft.Quantum.Simulation.QuantumProcessor.Extensions.ApplyIfElseIntrinsicC { private QCTraceSimulatorImpl tracerCore { get; } @@ -175,7 +175,7 @@ public TracerApplyIfElseC(QCTraceSimulatorImpl m) : base(m) }; } - public class TracerApplyIfElseCA : Interface_ApplyIfElseCA + public class TracerApplyIfElseCA : Microsoft.Quantum.Simulation.QuantumProcessor.Extensions.ApplyIfElseIntrinsicCA { private QCTraceSimulatorImpl tracerCore { get; } @@ -215,7 +215,7 @@ public TracerApplyIfElseCA(QCTraceSimulatorImpl m) : base(m) #region ApplyConditionally - public class TracerApplyConditionally : Interface_ApplyConditionally + public class TracerApplyConditionally : Microsoft.Quantum.Simulation.QuantumProcessor.Extensions.ApplyConditionallyIntrinsic { private QCTraceSimulatorImpl tracerCore { get; } @@ -231,7 +231,7 @@ public TracerApplyConditionally(QCTraceSimulatorImpl m) : base(m) }; } - public class TracerApplyConditionallyA : Interface_ApplyConditionallyA + public class TracerApplyConditionallyA : Microsoft.Quantum.Simulation.QuantumProcessor.Extensions.ApplyConditionallyIntrinsicA { private QCTraceSimulatorImpl tracerCore { get; } @@ -253,7 +253,7 @@ public TracerApplyConditionallyA(QCTraceSimulatorImpl m) : base(m) }; } - public class TracerApplyConditionallyC : Interface_ApplyConditionallyC + public class TracerApplyConditionallyC : Microsoft.Quantum.Simulation.QuantumProcessor.Extensions.ApplyConditionallyIntrinsicC { private QCTraceSimulatorImpl tracerCore { get; } @@ -276,7 +276,7 @@ public TracerApplyConditionallyC(QCTraceSimulatorImpl m) : base(m) }; } - public class TracerApplyConditionallyCA : Interface_ApplyConditionallyCA + public class TracerApplyConditionallyCA : Microsoft.Quantum.Simulation.QuantumProcessor.Extensions.ApplyConditionallyIntrinsicCA { private QCTraceSimulatorImpl tracerCore { get; }