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/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/assets/qdk-nuget-icon.png b/build/assets/qdk-nuget-icon.png new file mode 100644 index 00000000000..ca63d20e32e Binary files /dev/null and b/build/assets/qdk-nuget-icon.png differ 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 befde1b5847..694ba89302a 100644 --- a/build/steps-init.yml +++ b/build/steps-init.yml @@ -4,22 +4,20 @@ 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' ## # 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/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/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/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/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); } diff --git a/src/Simulation/Common/Simulators.Dev.props b/src/Simulation/Common/Simulators.Dev.props index f92092e9568..7c44b437a38 100644 --- a/src/Simulation/Common/Simulators.Dev.props +++ b/src/Simulation/Common/Simulators.Dev.props @@ -5,23 +5,18 @@ 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) - - - - Microsoft.Quantum.Simulator.Runtime.dll - PreserveNewest - false - - @@ -31,6 +26,14 @@ + + + Microsoft.Quantum.Simulator.Runtime.dll + PreserveNewest + false + + + 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/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/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/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..6a20d69af6c 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; @@ -14,7 +16,7 @@ public partial interface ICallable : ICallable { O Apply(I args); - ICallable Partial

(Func mapper); + ICallable Partial

(Func mapper); } ///

@@ -32,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; @@ -54,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)] @@ -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()?.Distinct() ?? new List(), + }; public O Apply(I a) { @@ -85,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; @@ -95,7 +105,7 @@ public O Apply(I a) this.Factory?.EndOperation(this, __dataOut(__result__)); } - return __result__; + return __result__; } public T Partial(object partialInfo) @@ -202,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/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..d61f63050f9 --- /dev/null +++ b/src/Simulation/Core/RuntimeMetadata.cs @@ -0,0 +1,136 @@ +// 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. + /// + ///
+ /// + /// This is used in composite operations, such as ApplyToEach. + /// + public bool IsComposite { get; set; } + + /// + /// Group of operations for each classical branch (true and false). + /// + /// + /// This is used in 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..59cb0370b52 100644 --- a/src/Simulation/Core/TypeExtensions.cs +++ b/src/Simulation/Core/TypeExtensions.cs @@ -1,8 +1,12 @@ // 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.Collections.Generic; using System.Diagnostics; using System.Linq; @@ -144,6 +148,59 @@ 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, 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(); + } + + // 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 +316,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/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/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/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/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/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/EntryPointDriver.Tests/Tests.fs b/src/Simulation/EntryPointDriver.Tests/Tests.fs index 9d3c9c5d0aa..7206cf9f44e 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 = @@ -466,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 @@ -509,7 +513,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 +521,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!" @@ -534,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`` () = @@ -546,11 +549,29 @@ 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. + |> yields "Subscription: mySubscription + Resource Group: myResourceGroup + Workspace: myWorkspace Target: test.nothing - Subscription: mySubscription + Storage: + AAD Token: + Base URI: + Job Name: + Shots: 500 + Output: FriendlyUri + Dry Run: False + Verbose: True + + 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 "Subscription: mySubscription Resource Group: myResourceGroup Workspace: myWorkspace + Target: test.nothing Storage: AAD Token: Base URI: @@ -560,7 +581,7 @@ 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 allows overriding default values`` () = @@ -578,11 +599,41 @@ 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. + |> yields "Subscription: mySubscription + Resource Group: myResourceGroup + Workspace: myWorkspace Target: test.nothing - Subscription: mySubscription + Storage: myStorage + AAD Token: myToken + Base URI: myBaseUri + Job Name: myJobName + Shots: 750 + Output: FriendlyUri + Dry Run: False + Verbose: True + + https://www.example.com/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 "Subscription: mySubscription Resource Group: myResourceGroup Workspace: myWorkspace + Target: test.nothing Storage: myStorage AAD Token: myToken Base URI: myBaseUri @@ -592,14 +643,13 @@ 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 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 @@ -634,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 [] @@ -685,10 +734,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 +750,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..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); @@ -150,9 +161,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 +203,6 @@ internal enum OutputFormat /// internal sealed class AzureSettings { - /// - /// The target device ID. - /// - public string? Target { get; set; } - /// /// The subscription ID. /// @@ -210,6 +218,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 +274,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. /// 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/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/bootstrap.cmd b/src/Simulation/Native/bootstrap.cmd index 59903c782db..cd32571ecd4 100644 --- a/src/Simulation/Native/bootstrap.cmd +++ b/src/Simulation/Native/bootstrap.cmd @@ -12,14 +12,21 @@ 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% +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" ^ .. 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 diff --git a/src/Simulation/QsharpCore/Intrinsic.cs b/src/Simulation/QsharpCore/Intrinsic.cs new file mode 100644 index 00000000000..f7bbd4d953b --- /dev/null +++ b/src/Simulation/QsharpCore/Intrinsic.cs @@ -0,0 +1,91 @@ +// 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; + } + } + + 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/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/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.Tests/Circuits/RuntimeMetadataTest.qs b/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs new file mode 100644 index 00000000000..4e721723832 --- /dev/null +++ b/src/Simulation/Simulators.Tests/Circuits/RuntimeMetadataTest.qs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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 WrapperOp (op: (Qubit => Unit), q : Qubit) : Unit { + op(q); + Reset(q); + } + + operation HOp (q : Qubit) : Unit { + H(q); + Reset(q); + } + + operation NestedOp () : Unit { + using (q = Qubit()) { + HOp(q); + } + } + + operation TwoQubitOp (q1 : Qubit, q2 : Qubit) : Unit { + // ... + } + +} 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. /// diff --git a/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs b/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs new file mode 100644 index 00000000000..e9f6e69e626 --- /dev/null +++ b/src/Simulation/Simulators.Tests/RuntimeMetadataTests.cs @@ -0,0 +1,799 @@ +// 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 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() + { + 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); + } + + [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() + { + 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 = true, + Children = null, + Controls = new List() { }, + Targets = targets, + }; + + 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 CustomCircuitTests + { + [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 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 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); + } + + [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 + { + [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/TestProjects/HoneywellExe/ClassicallyControlledSupportTests.qs b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/ClassicallyControlledSupportTests.qs new file mode 100644 index 00000000000..34f140ee6b0 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/ClassicallyControlledSupportTests.qs @@ -0,0 +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(); + } + } + + 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..38aa57ee876 --- /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..f6aa40b1a84 --- /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..26a4213a328 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/ClassicallyControlledSupportTests.qs @@ -0,0 +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(); + } + } + + 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..62b81376407 --- /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..5325dca658a --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/HoneywellSimulation.qs @@ -0,0 +1,298 @@ +// 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 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(); + } + +} 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..46ae721dce1 --- /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..8585758f894 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/QCISimulation.qs @@ -0,0 +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(); + } + + @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)*" /> - + diff --git a/src/Simulation/Simulators.Tests/TypeExtensionsTest.cs b/src/Simulation/Simulators.Tests/TypeExtensionsTest.cs new file mode 100644 index 00000000000..a7942f7f110 --- /dev/null +++ b/src/Simulation/Simulators.Tests/TypeExtensionsTest.cs @@ -0,0 +1,149 @@ +// 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 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() + { + 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() + { + 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()); + + 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()); + } + + [Fact] + public void ArrayTypes() + { + Assert.Equal("[1, 2, 3]", new[] { 1, 2, 3 }.GetNonQubitArgumentsAsString()); + Assert.Equal("[\"foo\", \"bar\"]", new[] { "foo", "bar" }.GetNonQubitArgumentsAsString()); + + 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\")]", qTupleArr.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()); + + 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()); + + 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()); + + 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()); + } + } +} 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 8229c9e9bc7..98541863364 100644 --- a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj +++ b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj @@ -23,5 +23,23 @@ - + + + + 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..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/ @@ -17,16 +17,15 @@ - - - - - + + + + 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()); }; } } 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