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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Welcome to the Microsoft Quantum Development Kit!
This repository contains the runtime components for the [Quantum Development Kit](https://docs.microsoft.com/quantum/).
It consists of the libraries and packages needed to create and simulate quantum applications using Q#.

- **[Azure/](./src/Azure/)**: Source for client package to create and manage jobs in Azure Quantum.
- **[Simulation/](./src/Simulation/)**: Source for Q# simulation. Includes code generation, full-state and other simulators.
- **[xUnit/](./src/Xunit/)**: Source for the xUnit's Q# test-case discoverer.

Expand Down
43 changes: 43 additions & 0 deletions Simulation.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28809.33
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{99E234BC-997E-4E63-9F5C-3C3977543404}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Azure", "Azure", "{A1E878CB-ADF1-457A-9223-06F96ED8F7A6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Quantum.Client", "src\Azure\Azure.Quantum.Client\Microsoft.Azure.Quantum.Client.csproj", "{DF654202-0008-4CDE-B35E-018CEFD0FC68}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Quantum.Client.Test", "src\Azure\Azure.Quantum.Client.Test\Microsoft.Azure.Quantum.Client.Test.csproj", "{1467128C-90E4-4723-B5C7-9469B83F54A6}"
EndProject
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}"
Expand Down Expand Up @@ -53,6 +61,38 @@ Global
RelWithDebInfo|x64 = RelWithDebInfo|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DF654202-0008-4CDE-B35E-018CEFD0FC68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DF654202-0008-4CDE-B35E-018CEFD0FC68}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DF654202-0008-4CDE-B35E-018CEFD0FC68}.Debug|x64.ActiveCfg = Debug|Any CPU
{DF654202-0008-4CDE-B35E-018CEFD0FC68}.Debug|x64.Build.0 = Debug|Any CPU
{DF654202-0008-4CDE-B35E-018CEFD0FC68}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
{DF654202-0008-4CDE-B35E-018CEFD0FC68}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
{DF654202-0008-4CDE-B35E-018CEFD0FC68}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
{DF654202-0008-4CDE-B35E-018CEFD0FC68}.MinSizeRel|x64.Build.0 = Debug|Any CPU
{DF654202-0008-4CDE-B35E-018CEFD0FC68}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DF654202-0008-4CDE-B35E-018CEFD0FC68}.Release|Any CPU.Build.0 = Release|Any CPU
{DF654202-0008-4CDE-B35E-018CEFD0FC68}.Release|x64.ActiveCfg = Release|Any CPU
{DF654202-0008-4CDE-B35E-018CEFD0FC68}.Release|x64.Build.0 = Release|Any CPU
{DF654202-0008-4CDE-B35E-018CEFD0FC68}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU
{DF654202-0008-4CDE-B35E-018CEFD0FC68}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU
{DF654202-0008-4CDE-B35E-018CEFD0FC68}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU
{DF654202-0008-4CDE-B35E-018CEFD0FC68}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU
{1467128C-90E4-4723-B5C7-9469B83F54A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1467128C-90E4-4723-B5C7-9469B83F54A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1467128C-90E4-4723-B5C7-9469B83F54A6}.Debug|x64.ActiveCfg = Debug|Any CPU
{1467128C-90E4-4723-B5C7-9469B83F54A6}.Debug|x64.Build.0 = Debug|Any CPU
{1467128C-90E4-4723-B5C7-9469B83F54A6}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
{1467128C-90E4-4723-B5C7-9469B83F54A6}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
{1467128C-90E4-4723-B5C7-9469B83F54A6}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
{1467128C-90E4-4723-B5C7-9469B83F54A6}.MinSizeRel|x64.Build.0 = Debug|Any CPU
{1467128C-90E4-4723-B5C7-9469B83F54A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1467128C-90E4-4723-B5C7-9469B83F54A6}.Release|Any CPU.Build.0 = Release|Any CPU
{1467128C-90E4-4723-B5C7-9469B83F54A6}.Release|x64.ActiveCfg = Release|Any CPU
{1467128C-90E4-4723-B5C7-9469B83F54A6}.Release|x64.Build.0 = Release|Any CPU
{1467128C-90E4-4723-B5C7-9469B83F54A6}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU
{1467128C-90E4-4723-B5C7-9469B83F54A6}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU
{1467128C-90E4-4723-B5C7-9469B83F54A6}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU
{1467128C-90E4-4723-B5C7-9469B83F54A6}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU
{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
Expand Down Expand Up @@ -297,6 +337,9 @@ Global
{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}
{A1E878CB-ADF1-457A-9223-06F96ED8F7A6} = {99E234BC-997E-4E63-9F5C-3C3977543404}
{DF654202-0008-4CDE-B35E-018CEFD0FC68} = {A1E878CB-ADF1-457A-9223-06F96ED8F7A6}
{1467128C-90E4-4723-B5C7-9469B83F54A6} = {A1E878CB-ADF1-457A-9223-06F96ED8F7A6}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {929C0464-86D8-4F70-8835-0A5EAF930821}
Expand Down
2 changes: 2 additions & 0 deletions build/manifest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

@{
Packages = @(
"Microsoft.Azure.Quantum.Client",
"Microsoft.Quantum.CsharpGeneration",
"Microsoft.Quantum.Development.Kit",
"Microsoft.Quantum.QSharp.Core",
Expand All @@ -13,6 +14,7 @@
"Microsoft.Quantum.Xunit"
);
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",
Expand Down
1 change: 1 addition & 0 deletions build/pack.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function Pack-Dotnet() {


Write-Host "##[info]Using nuget to create packages"
Pack-Dotnet '../src/Azure/Azure.Quantum.Client/Microsoft.Azure.Quantum.Client.csproj'
Pack-One '../src/Simulation/CsharpGeneration/Microsoft.Quantum.CsharpGeneration.fsproj' '-IncludeReferencedProjects'
Pack-Dotnet '../src/Simulation/Core/Microsoft.Quantum.Runtime.Core.csproj'
Pack-Dotnet '../src/Simulation/QsharpCore/Microsoft.Quantum.QSharp.Core.csproj'
Expand Down
34 changes: 34 additions & 0 deletions src/Azure/Azure.Quantum.Client.Test/Helpers/MockHelper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// <copyright file="MockHelper.cs" company="Microsoft Corporation">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>

using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Moq;
using Moq.Protected;

namespace Microsoft.Azure.Quantum.Test
{
public static class MockHelper
{
internal static HttpRequestMessage RequestMessage { get; private set; }

internal static HttpResponseMessage ResponseMessage { get; set; }

public static HttpClient GetHttpClientMock()
{
Mock<HttpMessageHandler> mock = new Mock<HttpMessageHandler>();

mock.Protected()
.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>())
.Returns((HttpRequestMessage request, CancellationToken token) =>
{
RequestMessage = request;
return Task.FromResult(ResponseMessage);
});

return new HttpClient(mock.Object);
}
}
}
15 changes: 15 additions & 0 deletions src/Azure/Azure.Quantum.Client.Test/Helpers/TestConstants.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// <copyright file="TestConstants.cs" company="Microsoft Corporation">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>

namespace Microsoft.Azure.Quantum.Test
{
public static class TestConstants
{
public const string SubscriptionId = "sub1";
public const string ResourceGroupName = "rg1";
public const string WorkspaceName = "ws1";
public const string ProviderId = "provider1";
public const string Endpoint = "https://test";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.0.0" />
<PackageReference Include="MSTest.TestFramework" Version="2.0.0" />
<PackageReference Include="Moq" Version="4.13.1" />
<PackageReference Include="coverlet.collector" Version="1.0.1" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\Common\StyleCop.ruleset</CodeAnalysisRuleSet>
<RootNamespace>Microsoft.Azure.Quantum.Test</RootNamespace>
</PropertyGroup>

<ItemGroup>
<AdditionalFiles Include="..\Common\stylecop.json" Link="Properties\stylecop.json" />
<Compile Include="..\Common\DelaySign.cs" Link="Properties\DelaySign.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Azure.Quantum.Client\Microsoft.Azure.Quantum.Client.csproj" />
</ItemGroup>
</Project>
Loading