From 92ee05ed460f9910ad83196eafa15fa4fd852b88 Mon Sep 17 00:00:00 2001 From: Sarah Marshall Date: Tue, 16 Mar 2021 17:43:01 -0700 Subject: [PATCH 1/3] Update packages --- .../CSharpGeneration/Microsoft.Quantum.CSharpGeneration.fsproj | 2 +- ....Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj | 2 +- src/Simulation/QSharpCore/Microsoft.Quantum.QSharp.Core.csproj | 2 +- .../QSharpFoundation/Microsoft.Quantum.QSharp.Foundation.csproj | 2 +- .../TestProjects/HoneywellExe/HoneywellExe.csproj | 2 +- .../TestProjects/IntrinsicTests/IntrinsicTests.csproj | 2 +- .../Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj | 2 +- .../TestProjects/Library with Spaces/Library with Spaces.csproj | 2 +- .../Simulators.Tests/TestProjects/Library1/Library1.csproj | 2 +- .../Simulators.Tests/TestProjects/Library2/Library2.csproj | 2 +- .../Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj | 2 +- .../Simulators.Tests/TestProjects/QSharpExe/QSharpExe.csproj | 2 +- .../TestProjects/TargetedExe/TargetedExe.csproj | 2 +- .../Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj | 2 +- .../Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj | 2 +- .../Tests.Microsoft.Quantum.Simulators.Type1.csproj | 2 +- .../Tests.Microsoft.Quantum.Simulators.Type2.csproj | 2 +- .../Tests.Microsoft.Quantum.Simulators.Type3.csproj | 2 +- src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj | 2 +- src/Simulation/Type1Core/Microsoft.Quantum.Type1.Core.csproj | 2 +- src/Simulation/Type2Core/Microsoft.Quantum.Type2.Core.csproj | 2 +- src/Simulation/Type3Core/Microsoft.Quantum.Type3.Core.csproj | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/Simulation/CSharpGeneration/Microsoft.Quantum.CSharpGeneration.fsproj b/src/Simulation/CSharpGeneration/Microsoft.Quantum.CSharpGeneration.fsproj index 96de234006b..8ef4c303196 100644 --- a/src/Simulation/CSharpGeneration/Microsoft.Quantum.CSharpGeneration.fsproj +++ b/src/Simulation/CSharpGeneration/Microsoft.Quantum.CSharpGeneration.fsproj @@ -22,7 +22,7 @@ - + diff --git a/src/Simulation/QCTraceSimulator.Tests/Tests.Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj b/src/Simulation/QCTraceSimulator.Tests/Tests.Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj index 5f4aac28c6c..1a47f479dc4 100644 --- a/src/Simulation/QCTraceSimulator.Tests/Tests.Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj +++ b/src/Simulation/QCTraceSimulator.Tests/Tests.Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/QSharpCore/Microsoft.Quantum.QSharp.Core.csproj b/src/Simulation/QSharpCore/Microsoft.Quantum.QSharp.Core.csproj index ef9adb3a974..3dac1685fa7 100644 --- a/src/Simulation/QSharpCore/Microsoft.Quantum.QSharp.Core.csproj +++ b/src/Simulation/QSharpCore/Microsoft.Quantum.QSharp.Core.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/QSharpFoundation/Microsoft.Quantum.QSharp.Foundation.csproj b/src/Simulation/QSharpFoundation/Microsoft.Quantum.QSharp.Foundation.csproj index 67c8c57b08d..1619ff6f6be 100644 --- a/src/Simulation/QSharpFoundation/Microsoft.Quantum.QSharp.Foundation.csproj +++ b/src/Simulation/QSharpFoundation/Microsoft.Quantum.QSharp.Foundation.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj index 15cd6554a4e..278337d271a 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/IntrinsicTests.csproj b/src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/IntrinsicTests.csproj index 7e99c1c2560..eb75b69eb50 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/IntrinsicTests.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/IntrinsicTests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj index b75f4c0d3a3..d0efb6d010e 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/src/Simulation/Simulators.Tests/TestProjects/Library with Spaces/Library with Spaces.csproj b/src/Simulation/Simulators.Tests/TestProjects/Library with Spaces/Library with Spaces.csproj index 6b3e10f2af4..04f5444016c 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/Library with Spaces/Library with Spaces.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/Library with Spaces/Library with Spaces.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 false diff --git a/src/Simulation/Simulators.Tests/TestProjects/Library1/Library1.csproj b/src/Simulation/Simulators.Tests/TestProjects/Library1/Library1.csproj index 4c59ca02d7e..cdd1b084414 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/Library1/Library1.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/Library1/Library1.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 diff --git a/src/Simulation/Simulators.Tests/TestProjects/Library2/Library2.csproj b/src/Simulation/Simulators.Tests/TestProjects/Library2/Library2.csproj index 4c59ca02d7e..cdd1b084414 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/Library2/Library2.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/Library2/Library2.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 diff --git a/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj index e8050a9b389..acc6050d3c1 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/QCIExe/QCIExe.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/src/Simulation/Simulators.Tests/TestProjects/QSharpExe/QSharpExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/QSharpExe/QSharpExe.csproj index d07e708f911..ef8e8395e82 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/QSharpExe/QSharpExe.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/QSharpExe/QSharpExe.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/TargetedExe.csproj b/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/TargetedExe.csproj index 30f06d01614..c0226fdbf1f 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/TargetedExe.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/TargetedExe.csproj @@ -1,4 +1,4 @@ - + Exe diff --git a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj index 9c382970e38..0cc3faeb6d4 100644 --- a/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj +++ b/src/Simulation/Simulators.Tests/TestProjects/UnitTests/UnitTests.csproj @@ -1,4 +1,4 @@ - + netcoreapp3.1 diff --git a/src/Simulation/Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj b/src/Simulation/Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj index 37493615768..da553f92fcf 100644 --- a/src/Simulation/Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj +++ b/src/Simulation/Simulators.Tests/Tests.Microsoft.Quantum.Simulators.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/Simulators.Type1.Tests/Tests.Microsoft.Quantum.Simulators.Type1.csproj b/src/Simulation/Simulators.Type1.Tests/Tests.Microsoft.Quantum.Simulators.Type1.csproj index f1834856919..200047a41f1 100644 --- a/src/Simulation/Simulators.Type1.Tests/Tests.Microsoft.Quantum.Simulators.Type1.csproj +++ b/src/Simulation/Simulators.Type1.Tests/Tests.Microsoft.Quantum.Simulators.Type1.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/Simulators.Type2.Tests/Tests.Microsoft.Quantum.Simulators.Type2.csproj b/src/Simulation/Simulators.Type2.Tests/Tests.Microsoft.Quantum.Simulators.Type2.csproj index 413069e786f..af779d07ace 100644 --- a/src/Simulation/Simulators.Type2.Tests/Tests.Microsoft.Quantum.Simulators.Type2.csproj +++ b/src/Simulation/Simulators.Type2.Tests/Tests.Microsoft.Quantum.Simulators.Type2.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/Simulators.Type3.Tests/Tests.Microsoft.Quantum.Simulators.Type3.csproj b/src/Simulation/Simulators.Type3.Tests/Tests.Microsoft.Quantum.Simulators.Type3.csproj index 8d8fbba1a19..14e000d1651 100644 --- a/src/Simulation/Simulators.Type3.Tests/Tests.Microsoft.Quantum.Simulators.Type3.csproj +++ b/src/Simulation/Simulators.Type3.Tests/Tests.Microsoft.Quantum.Simulators.Type3.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj index 433eecac3ac..a547f054dc4 100644 --- a/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj +++ b/src/Simulation/Simulators/Microsoft.Quantum.Simulators.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/Type1Core/Microsoft.Quantum.Type1.Core.csproj b/src/Simulation/Type1Core/Microsoft.Quantum.Type1.Core.csproj index 4e5201c870b..24c8e9fa4e5 100644 --- a/src/Simulation/Type1Core/Microsoft.Quantum.Type1.Core.csproj +++ b/src/Simulation/Type1Core/Microsoft.Quantum.Type1.Core.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/Type2Core/Microsoft.Quantum.Type2.Core.csproj b/src/Simulation/Type2Core/Microsoft.Quantum.Type2.Core.csproj index 380029157bd..5375fa804df 100644 --- a/src/Simulation/Type2Core/Microsoft.Quantum.Type2.Core.csproj +++ b/src/Simulation/Type2Core/Microsoft.Quantum.Type2.Core.csproj @@ -1,4 +1,4 @@ - + diff --git a/src/Simulation/Type3Core/Microsoft.Quantum.Type3.Core.csproj b/src/Simulation/Type3Core/Microsoft.Quantum.Type3.Core.csproj index 241477d177b..6290eefea15 100644 --- a/src/Simulation/Type3Core/Microsoft.Quantum.Type3.Core.csproj +++ b/src/Simulation/Type3Core/Microsoft.Quantum.Type3.Core.csproj @@ -1,4 +1,4 @@ - + From ccfd3943f04951c17e44bdbb1caaeefc50b67bb7 Mon Sep 17 00:00:00 2001 From: Sarah Marshall Date: Tue, 16 Mar 2021 17:43:16 -0700 Subject: [PATCH 2/3] Fix partial application code gen test --- .../SimulationCodeTests.fs | 40 +++++++++++++------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/src/Simulation/CSharpGeneration.Tests/SimulationCodeTests.fs b/src/Simulation/CSharpGeneration.Tests/SimulationCodeTests.fs index dfe7a2e216d..28dc149fa1e 100644 --- a/src/Simulation/CSharpGeneration.Tests/SimulationCodeTests.fs +++ b/src/Simulation/CSharpGeneration.Tests/SimulationCodeTests.fs @@ -2183,32 +2183,48 @@ namespace N1 (__arg19__.Item1, __arg19__.Item2, (1L, Result.One)) )) .Apply((0L, Result.Zero));" - "partialGeneric1__.Partial((0L, _, (1L, _))).Apply((Result.Zero, Result.One));" - "partialGeneric2__.Partial((0L, Result.Zero, (_, Result.One))).Apply(1L);" - "partialGeneric2__.Partial((_, _, (1L, Result.One))).Apply((0L, Result.Zero));" - "partialGeneric2__.Partial((0L, _, (1L, _))).Apply((Result.Zero, Result.One));" + "partialGeneric1__ + .Partial(new Func<(Result,Result), (Int64,Result,(Int64,Result))>((__arg20__) => + (0L, __arg20__.Item1, (1L, __arg20__.Item2)) + )) + .Apply((Result.Zero, Result.One));" + "partialGeneric2__ + .Partial(new Func((__arg21__) => + (0L, Result.Zero, (__arg21__, Result.One)) + )) + .Apply(1L);" + "partialGeneric2__ + .Partial(new Func<(Int64,Result), (Int64,Result,(Int64,Result))>((__arg22__) => + (__arg22__.Item1, __arg22__.Item2, (1L, Result.One)) + )) + .Apply((0L, Result.Zero));" + "partialGeneric2__ + .Partial(new Func<(Result,Result), (Int64,Result,(Int64,Result))>((__arg23__) => + (0L, __arg23__.Item1, (1L, __arg23__.Item2)) + )) + .Apply((Result.Zero, Result.One));" "partialInput - .Partial(new Func<(Double,(Result,Result)), (Int64,(Double,Double),(Result,Result,Result))>((__arg20__) => + .Partial(new Func<(Double,(Result,Result)), (Int64,(Double,Double),(Result,Result,Result))>((__arg24__) => ( 1L, - (__arg20__.Item1, 1.1D), - (Result.Zero, __arg20__.Item2.Item1, __arg20__.Item2.Item2) + (__arg24__.Item1, 1.1D), + (Result.Zero, __arg24__.Item2.Item1, __arg24__.Item2.Item2) ) )) .Apply((2.2D, (Result.One, Result.One)));" """ return partialUnitary - .Partial(new Func, (Double,ICallable,IQArray)>((__arg21__) => + .Partial(new Func, (Double,ICallable,IQArray)>((__arg25__) => ( 1.1D, - partialFunction__.Partial(new Func<(Int64,Double), (Int64,Double,Pauli)>((__arg22__) => + partialFunction__.Partial(new Func<(Int64,Double), (Int64,Double,Pauli)>((__arg26__) => ( - __arg22__.Item1, - __arg22__.Item2, + __arg26__.Item1, + __arg26__.Item2, Pauli.PauliX ) )), - __arg21__) + __arg25__) )); """ ] From f85c039e534ba47192240caf7408da1ac58045e9 Mon Sep 17 00:00:00 2001 From: Sarah Marshall <33814365+samarsha@users.noreply.github.com> Date: Wed, 7 Apr 2021 23:00:36 -0700 Subject: [PATCH 3/3] Update Microsoft.Quantum.CSharpGeneration.fsproj --- .../Microsoft.Quantum.CSharpGeneration.fsproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Simulation/CSharpGeneration/Microsoft.Quantum.CSharpGeneration.fsproj b/src/Simulation/CSharpGeneration/Microsoft.Quantum.CSharpGeneration.fsproj index edac14ab0b2..1385f79fe16 100644 --- a/src/Simulation/CSharpGeneration/Microsoft.Quantum.CSharpGeneration.fsproj +++ b/src/Simulation/CSharpGeneration/Microsoft.Quantum.CSharpGeneration.fsproj @@ -1,4 +1,4 @@ - + @@ -22,7 +22,7 @@ - +