This repository was archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 90
Simulator Classical Control Execution Tests #297
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
808702a
Added class to simulator for supporting classical control API.
ScottCarda-MS ba5842d
Merge branch 'master' into sccarda/SimulatorClassicalControl
ScottCarda-MS 2a7cd52
Changed namespace back to Quantum.Simulation.QuantumProcessor.Extensi…
ScottCarda-MS ffaded3
Merge branch 'master' into sccarda/SimulatorClassicalControl
ScottCarda-MS e5a2763
Simplified loop logic for AreEqual.
ScottCarda-MS ac29301
Added ToDo for namespace rename, removed unnecessary qualifiers, and …
ScottCarda-MS 89f5abd
Added dummy classical control implementations for trace simulator.
ScottCarda-MS ff1db50
Added interface operations for the classical control operations. Adde…
ScottCarda-MS 1602361
Added implementation to the classical control operation handlers for …
ScottCarda-MS ef50736
Removed unused variable
ScottCarda-MS efc961b
Fixed controls being treated as the whole argument set.
ScottCarda-MS fc7b454
Made classical control handles internal.
ScottCarda-MS 6f86be7
Undoing making the operations internal.
ScottCarda-MS bbae112
Merge branch 'master' into sccarda/SimulatorClassicalControl
ScottCarda-MS 3592c8a
Removed trailing whitespace
ScottCarda-MS 106a1ed
Added two execution tests for testing the simulator and resources est…
ScottCarda-MS 557b45c
Merged in master
ScottCarda-MS 0cacfe7
Renamed 'classic control' to 'classical control'. Added to test that …
ScottCarda-MS e678a78
EOL conversion from CRLF to LF on Solution file.
ScottCarda-MS 630c9a7
Removed 'execution target' tag from test project.
ScottCarda-MS a65b2c3
test setup for testing simulation of targeted executables
b3d731b
Added execution test projects for various simulators.
ScottCarda-MS 053d857
merging in master
ScottCarda-MS 911cc55
WIP
ScottCarda-MS 98c05b4
Fixes from merge
ScottCarda-MS 458aa0f
spacing fix
ScottCarda-MS 89a797c
Fixed issue with Hello.qs not compiling.
ScottCarda-MS 041e991
updated targeted qdk version, removed IonQExe tests as that simulator…
ScottCarda-MS c2827f7
Added measurement execution tests for IonQ Simulator.
ScottCarda-MS f5c3bbf
merged in from master
ScottCarda-MS f21917e
Changed version to 3017-alpha
ScottCarda-MS 3456da8
Removed tests from a previous iteration of the implementation.
ScottCarda-MS 9f4e02b
Added tests to check measurements on qubits work.
ScottCarda-MS 7b99e34
Added tests for conditions on measurement results.
ScottCarda-MS 09ca709
Added ToDos for the generics support bug fix.
ScottCarda-MS 0ddc800
Merge branch 'master' into sccarda/SimulatorClassicalControl
ScottCarda-MS File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
746 changes: 746 additions & 0 deletions
746
...imulation/Simulators.Tests/TestProjects/HoneywellExe/ClassicallyControlledSupportTests.qs
Large diffs are not rendered by default.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/HoneywellExe.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| <Project Sdk="Microsoft.Quantum.Sdk/0.11.2006.3017-alpha"> | ||
|
|
||
| <PropertyGroup> | ||
| <OutputType>Library</OutputType> | ||
| <TargetFramework>netcoreapp3.1</TargetFramework> | ||
| <!-- we will provide our own --> | ||
| <CsharpGeneration>false</CsharpGeneration> | ||
| <IncludeQsharpCorePackages>false</IncludeQsharpCorePackages> | ||
| <IncludeProviderPackages>false</IncludeProviderPackages> | ||
| <NoEntryPoint>true</NoEntryPoint> | ||
| <ExecutionTarget>honeywell.qpu</ExecutionTarget> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <ProjectReference Include="..\..\..\CsharpGeneration\Microsoft.Quantum.CsharpGeneration.fsproj" PrivateAssets="All" IsQscReference="true" /> | ||
| <ProjectReference Include="..\..\..\QsharpCore\Microsoft.Quantum.QSharp.Core.csproj" /> | ||
| </ItemGroup> | ||
|
|
||
| <Target Name="BeforeCsharpCompile"> | ||
| <ItemGroup> | ||
| <Compile Include="$(GeneratedFilesOutputPath)**/*.g.cs" Exclude="@(Compile)" AutoGen="true" /> | ||
| </ItemGroup> | ||
| </Target> | ||
|
|
||
| </Project> |
30 changes: 30 additions & 0 deletions
30
src/Simulation/Simulators.Tests/TestProjects/HoneywellExe/MeasurementSupportTests.qs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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); | ||
| } | ||
| } | ||
|
|
||
| } |
25 changes: 25 additions & 0 deletions
25
src/Simulation/Simulators.Tests/TestProjects/IonQExe/IonQExe.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| <Project Sdk="Microsoft.Quantum.Sdk/0.11.2006.3017-alpha"> | ||
|
|
||
| <PropertyGroup> | ||
| <OutputType>Library</OutputType> | ||
| <TargetFramework>netcoreapp3.1</TargetFramework> | ||
| <!-- we will provide our own --> | ||
| <CsharpGeneration>false</CsharpGeneration> | ||
| <IncludeQsharpCorePackages>false</IncludeQsharpCorePackages> | ||
| <IncludeProviderPackages>false</IncludeProviderPackages> | ||
| <NoEntryPoint>true</NoEntryPoint> | ||
| <ExecutionTarget>ionq.qpu</ExecutionTarget> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <ProjectReference Include="..\..\..\CsharpGeneration\Microsoft.Quantum.CsharpGeneration.fsproj" PrivateAssets="All" IsQscReference="true" /> | ||
| <ProjectReference Include="..\..\..\QsharpCore\Microsoft.Quantum.QSharp.Core.csproj" /> | ||
| </ItemGroup> | ||
|
|
||
| <Target Name="BeforeCsharpCompile"> | ||
| <ItemGroup> | ||
| <Compile Include="$(GeneratedFilesOutputPath)**/*.g.cs" Exclude="@(Compile)" AutoGen="true" /> | ||
| </ItemGroup> | ||
| </Target> | ||
|
|
||
| </Project> |
30 changes: 30 additions & 0 deletions
30
src/Simulation/Simulators.Tests/TestProjects/IonQExe/MeasurementSupportTests.qs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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); | ||
| } | ||
| } | ||
|
|
||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.