Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Commit eec61bc

Browse files
authored
Adapting to API update in qsharp-runtime/#370 (#363)
1 parent e7fb6ef commit eec61bc

File tree

14 files changed

+47
-30
lines changed

14 files changed

+47
-30
lines changed

Build/props/tests.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Microsoft.Quantum.Xunit" Version="0.13.20102604" />
9+
<PackageReference Include="Microsoft.Quantum.Xunit" Version="0.13.201118141-beta" />
1010
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
1111
<PackageReference Include="xunit" Version="2.4.1" />
1212
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />

Chemistry/src/Runtime/Runtime.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.Quantum.Sdk/0.13.20102604">
1+
<Project Sdk="Microsoft.Quantum.Sdk/0.13.201118141-beta">
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
@@ -40,7 +40,7 @@
4040
</ItemGroup>
4141

4242
<ItemGroup>
43-
<PackageReference Include="Microsoft.Quantum.Simulators" Version="0.13.20102604" />
43+
<PackageReference Include="Microsoft.Quantum.Simulators" Version="0.13.201118141-beta" />
4444
</ItemGroup>
4545

4646
<ItemGroup>

Chemistry/tests/ChemistryTests/QSharpTests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.Quantum.Sdk/0.13.20102604">
1+
<Project Sdk="Microsoft.Quantum.Sdk/0.13.201118141-beta">
22

33
<Import Project="..\..\..\Build\props\tests.props" />
44

Chemistry/tests/SystemTests/SystemTests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.Quantum.Sdk/0.13.20102604">
1+
<Project Sdk="Microsoft.Quantum.Sdk/0.13.201118141-beta">
22

33
<Import Project="..\..\..\Build\props\tests.props" />
44

MachineLearning.sln

+24-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26124.0
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.30413.136
55
MinimumVisualStudioVersion = 15.0.26124.0
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MachineLearning", "MachineLearning", "{D067C787-94C3-4DB8-9012-1F22AE784BEF}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MachineLearningTests", "MachineLearning\tests\MachineLearningTests.csproj", "{94EBDF5F-0A9D-4CE5-9D16-3FF323B8792C}"
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MachineLearningTests", "MachineLearning\tests\MachineLearningTests.csproj", "{94EBDF5F-0A9D-4CE5-9D16-3FF323B8792C}"
99
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MachineLearning", "MachineLearning\src\MachineLearning.csproj", "{B045BF35-6BE6-4982-9618-8725C70D3F91}"
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MachineLearning", "MachineLearning\src\MachineLearning.csproj", "{B045BF35-6BE6-4982-9618-8725C70D3F91}"
11+
EndProject
12+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Standard", "Standard\src\Standard.csproj", "{9907AAA7-10DA-470B-A154-5A19D1A831E6}"
1113
EndProject
1214
Global
1315
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -18,9 +20,6 @@ Global
1820
Release|x64 = Release|x64
1921
Release|x86 = Release|x86
2022
EndGlobalSection
21-
GlobalSection(SolutionProperties) = preSolution
22-
HideSolutionNode = FALSE
23-
EndGlobalSection
2423
GlobalSection(ProjectConfigurationPlatforms) = postSolution
2524
{94EBDF5F-0A9D-4CE5-9D16-3FF323B8792C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2625
{94EBDF5F-0A9D-4CE5-9D16-3FF323B8792C}.Debug|Any CPU.Build.0 = Debug|Any CPU
@@ -46,9 +45,27 @@ Global
4645
{B045BF35-6BE6-4982-9618-8725C70D3F91}.Release|x64.Build.0 = Release|Any CPU
4746
{B045BF35-6BE6-4982-9618-8725C70D3F91}.Release|x86.ActiveCfg = Release|Any CPU
4847
{B045BF35-6BE6-4982-9618-8725C70D3F91}.Release|x86.Build.0 = Release|Any CPU
48+
{9907AAA7-10DA-470B-A154-5A19D1A831E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
49+
{9907AAA7-10DA-470B-A154-5A19D1A831E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
50+
{9907AAA7-10DA-470B-A154-5A19D1A831E6}.Debug|x64.ActiveCfg = Debug|Any CPU
51+
{9907AAA7-10DA-470B-A154-5A19D1A831E6}.Debug|x64.Build.0 = Debug|Any CPU
52+
{9907AAA7-10DA-470B-A154-5A19D1A831E6}.Debug|x86.ActiveCfg = Debug|Any CPU
53+
{9907AAA7-10DA-470B-A154-5A19D1A831E6}.Debug|x86.Build.0 = Debug|Any CPU
54+
{9907AAA7-10DA-470B-A154-5A19D1A831E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
55+
{9907AAA7-10DA-470B-A154-5A19D1A831E6}.Release|Any CPU.Build.0 = Release|Any CPU
56+
{9907AAA7-10DA-470B-A154-5A19D1A831E6}.Release|x64.ActiveCfg = Release|Any CPU
57+
{9907AAA7-10DA-470B-A154-5A19D1A831E6}.Release|x64.Build.0 = Release|Any CPU
58+
{9907AAA7-10DA-470B-A154-5A19D1A831E6}.Release|x86.ActiveCfg = Release|Any CPU
59+
{9907AAA7-10DA-470B-A154-5A19D1A831E6}.Release|x86.Build.0 = Release|Any CPU
60+
EndGlobalSection
61+
GlobalSection(SolutionProperties) = preSolution
62+
HideSolutionNode = FALSE
4963
EndGlobalSection
5064
GlobalSection(NestedProjects) = preSolution
5165
{94EBDF5F-0A9D-4CE5-9D16-3FF323B8792C} = {D067C787-94C3-4DB8-9012-1F22AE784BEF}
5266
{B045BF35-6BE6-4982-9618-8725C70D3F91} = {D067C787-94C3-4DB8-9012-1F22AE784BEF}
5367
EndGlobalSection
68+
GlobalSection(ExtensibilityGlobals) = postSolution
69+
SolutionGuid = {08B056E4-F7DA-4802-B23C-BB11D6616F5E}
70+
EndGlobalSection
5471
EndGlobal

MachineLearning/src/MachineLearning.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.Quantum.Sdk/0.13.20102604">
1+
<Project Sdk="Microsoft.Quantum.Sdk/0.13.201118141-beta">
22
<PropertyGroup>
33
<TargetFramework>netstandard2.1</TargetFramework>
44
<AssemblyName>Microsoft.Quantum.MachineLearning</AssemblyName>

MachineLearning/tests/MachineLearningTests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.Quantum.Sdk/0.13.20102604">
1+
<Project Sdk="Microsoft.Quantum.Sdk/0.13.201118141-beta">
22

33
<Import Project="..\..\Build\props\tests.props" />
44

Numerics/src/Numerics.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.Quantum.Sdk/0.13.20102604">
1+
<Project Sdk="Microsoft.Quantum.Sdk/0.13.201118141-beta">
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
@@ -41,7 +41,7 @@
4141
</ItemGroup>
4242

4343
<ItemGroup>
44-
<PackageReference Include="Microsoft.Quantum.Simulators" Version="0.13.20102604" />
44+
<PackageReference Include="Microsoft.Quantum.Simulators" Version="0.13.201118141-beta" />
4545
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
4646
</ItemGroup>
4747

Numerics/tests/NumericsTests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.Quantum.Sdk/0.13.20102604">
1+
<Project Sdk="Microsoft.Quantum.Sdk/0.13.201118141-beta">
22

33
<Import Project="..\..\Build\props\tests.props" />
44

Standard/src/Diagnostics/Emulation/AllowQubitAllocations.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,17 @@ public Native(IOperationFactory m) : base(m)
5151
);
5252
}
5353
},
54-
setup: handler => Simulator.OnAllocateQubits += handler,
55-
cleanup: handler => Simulator.OnAllocateQubits -= handler
54+
setup: handler => Simulator.BeforeAllocateQubits += handler,
55+
cleanup: handler => Simulator.BeforeAllocateQubits -= handler
5656
),
5757

58-
new ActionDisposer<Action<IQArray<Qubit>>>(
59-
register =>
58+
new ActionDisposer<Action<long>>(
59+
nQubits =>
6060
{
61-
nQubitsAllocated -= register.Length;
61+
nQubitsAllocated -= nQubits;
6262
},
63-
setup: handler => Simulator.OnReleaseQubits += handler,
64-
cleanup: handler => Simulator.OnReleaseQubits -= handler
63+
setup: handler => Simulator.AfterReleaseQubits += handler,
64+
cleanup: handler => Simulator.AfterReleaseQubits -= handler
6565
)
6666
));
6767

Standard/src/Diagnostics/Emulation/Internal.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public override bool Callback(uint idx, double real, double img)
3333

3434
public override bool Dump(IQArray<Qubit>? qubits = null)
3535
{
36-
var count = qubits?.Length ?? Simulator.QubitManager!.GetAllocatedQubitsCount();
36+
var count = qubits?.Length ?? Simulator.QubitManager!.AllocatedQubitsCount;
3737
var nQubitsPerRegister = ((int)count / 2);
3838
Data = np.empty(new Shape(1 << ((int)count), 2));
3939
var result = base.Dump(qubits);

Standard/src/Standard.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.Quantum.Sdk/0.13.20102604">
1+
<Project Sdk="Microsoft.Quantum.Sdk/0.13.201118141-beta">
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
@@ -37,7 +37,7 @@
3737
</ItemGroup>
3838

3939
<ItemGroup>
40-
<PackageReference Include="Microsoft.Quantum.Simulators" Version="0.13.20102604" />
40+
<PackageReference Include="Microsoft.Quantum.Simulators" Version="0.13.201118141-beta" />
4141
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
4242
<PackageReference Include="NumSharp" Version="0.20.5" />
4343
</ItemGroup>

Standard/tests/Standard.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.Quantum.Sdk/0.13.20102604">
1+
<Project Sdk="Microsoft.Quantum.Sdk/0.13.201118141-beta">
22

33
<Import Project="..\..\Build\props\tests.props" />
44

Visualization/src/Visualization.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
</ItemGroup>
3333

3434
<ItemGroup>
35-
<PackageReference Include="Microsoft.Quantum.Simulators" Version="0.13.20102604" />
35+
<PackageReference Include="Microsoft.Quantum.Simulators" Version="0.13.201118141-beta" />
3636
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
37-
<PackageReference Include="Microsoft.Quantum.IQSharp.Jupyter" Version="0.13.20102604" PrivateAssets="All" />
37+
<PackageReference Include="Microsoft.Quantum.IQSharp.Jupyter" Version="0.13.201118141-beta" PrivateAssets="All" />
3838
<PackageReference Include="NumSharp" Version="0.20.5" />
3939
</ItemGroup>
4040

0 commit comments

Comments
 (0)