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
60 changes: 60 additions & 0 deletions Simulation.sln
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "StandaloneInputReference",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "qir-standalone-input-reference", "src\Qir\Samples\StandaloneInputReference\qsharp\qir-standalone-input-reference.csproj", "{D7D34736-A719-4B45-A33F-2723F59EC29D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Simulation", "Simulation", "{3CD26906-C7F3-47B8-AF43-FF6BCF1CB3EF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoSubstitution", "src\Simulation\AutoSubstitution\AutoSubstitution.csproj", "{33D66E90-049F-4A0B-A2B1-79E7E7E0ED0F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.AutoSubstitution", "src\Simulation\AutoSubstitution.Tests\Tests.AutoSubstitution.csproj", "{4EBC65DF-3B5E-419B-8E26-3EEF0B5CD300}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.AutoSubstitution.Integration", "src\Simulation\AutoSubstitution.Integration.Tests\Tests.AutoSubstitution.Integration.csproj", "{D23480EE-88FC-4DF2-86BD-1C5BDD6CD98C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -749,6 +757,54 @@ Global
{D7D34736-A719-4B45-A33F-2723F59EC29D}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU
{D7D34736-A719-4B45-A33F-2723F59EC29D}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU
{D7D34736-A719-4B45-A33F-2723F59EC29D}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU
{33D66E90-049F-4A0B-A2B1-79E7E7E0ED0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{33D66E90-049F-4A0B-A2B1-79E7E7E0ED0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{33D66E90-049F-4A0B-A2B1-79E7E7E0ED0F}.Debug|x64.ActiveCfg = Debug|Any CPU
{33D66E90-049F-4A0B-A2B1-79E7E7E0ED0F}.Debug|x64.Build.0 = Debug|Any CPU
{33D66E90-049F-4A0B-A2B1-79E7E7E0ED0F}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
{33D66E90-049F-4A0B-A2B1-79E7E7E0ED0F}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
{33D66E90-049F-4A0B-A2B1-79E7E7E0ED0F}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
{33D66E90-049F-4A0B-A2B1-79E7E7E0ED0F}.MinSizeRel|x64.Build.0 = Debug|Any CPU
{33D66E90-049F-4A0B-A2B1-79E7E7E0ED0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{33D66E90-049F-4A0B-A2B1-79E7E7E0ED0F}.Release|Any CPU.Build.0 = Release|Any CPU
{33D66E90-049F-4A0B-A2B1-79E7E7E0ED0F}.Release|x64.ActiveCfg = Release|Any CPU
{33D66E90-049F-4A0B-A2B1-79E7E7E0ED0F}.Release|x64.Build.0 = Release|Any CPU
{33D66E90-049F-4A0B-A2B1-79E7E7E0ED0F}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU
{33D66E90-049F-4A0B-A2B1-79E7E7E0ED0F}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU
{33D66E90-049F-4A0B-A2B1-79E7E7E0ED0F}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU
{33D66E90-049F-4A0B-A2B1-79E7E7E0ED0F}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU
{4EBC65DF-3B5E-419B-8E26-3EEF0B5CD300}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4EBC65DF-3B5E-419B-8E26-3EEF0B5CD300}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4EBC65DF-3B5E-419B-8E26-3EEF0B5CD300}.Debug|x64.ActiveCfg = Debug|Any CPU
{4EBC65DF-3B5E-419B-8E26-3EEF0B5CD300}.Debug|x64.Build.0 = Debug|Any CPU
{4EBC65DF-3B5E-419B-8E26-3EEF0B5CD300}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
{4EBC65DF-3B5E-419B-8E26-3EEF0B5CD300}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
{4EBC65DF-3B5E-419B-8E26-3EEF0B5CD300}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
{4EBC65DF-3B5E-419B-8E26-3EEF0B5CD300}.MinSizeRel|x64.Build.0 = Debug|Any CPU
{4EBC65DF-3B5E-419B-8E26-3EEF0B5CD300}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4EBC65DF-3B5E-419B-8E26-3EEF0B5CD300}.Release|Any CPU.Build.0 = Release|Any CPU
{4EBC65DF-3B5E-419B-8E26-3EEF0B5CD300}.Release|x64.ActiveCfg = Release|Any CPU
{4EBC65DF-3B5E-419B-8E26-3EEF0B5CD300}.Release|x64.Build.0 = Release|Any CPU
{4EBC65DF-3B5E-419B-8E26-3EEF0B5CD300}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU
{4EBC65DF-3B5E-419B-8E26-3EEF0B5CD300}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU
{4EBC65DF-3B5E-419B-8E26-3EEF0B5CD300}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU
{4EBC65DF-3B5E-419B-8E26-3EEF0B5CD300}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU
{D23480EE-88FC-4DF2-86BD-1C5BDD6CD98C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D23480EE-88FC-4DF2-86BD-1C5BDD6CD98C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D23480EE-88FC-4DF2-86BD-1C5BDD6CD98C}.Debug|x64.ActiveCfg = Debug|Any CPU
{D23480EE-88FC-4DF2-86BD-1C5BDD6CD98C}.Debug|x64.Build.0 = Debug|Any CPU
{D23480EE-88FC-4DF2-86BD-1C5BDD6CD98C}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
{D23480EE-88FC-4DF2-86BD-1C5BDD6CD98C}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
{D23480EE-88FC-4DF2-86BD-1C5BDD6CD98C}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
{D23480EE-88FC-4DF2-86BD-1C5BDD6CD98C}.MinSizeRel|x64.Build.0 = Debug|Any CPU
{D23480EE-88FC-4DF2-86BD-1C5BDD6CD98C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D23480EE-88FC-4DF2-86BD-1C5BDD6CD98C}.Release|Any CPU.Build.0 = Release|Any CPU
{D23480EE-88FC-4DF2-86BD-1C5BDD6CD98C}.Release|x64.ActiveCfg = Release|Any CPU
{D23480EE-88FC-4DF2-86BD-1C5BDD6CD98C}.Release|x64.Build.0 = Release|Any CPU
{D23480EE-88FC-4DF2-86BD-1C5BDD6CD98C}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU
{D23480EE-88FC-4DF2-86BD-1C5BDD6CD98C}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU
{D23480EE-88FC-4DF2-86BD-1C5BDD6CD98C}.RelWithDebInfo|x64.ActiveCfg = Debug|Any CPU
{D23480EE-88FC-4DF2-86BD-1C5BDD6CD98C}.RelWithDebInfo|x64.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -802,6 +858,10 @@ Global
{AAFB81D3-BC87-404D-BA64-AF40B2D2E45A} = {F6C2D4C0-12DC-40E3-9C86-FA5308D9B567}
{A7DB7367-9FD6-4164-8263-A05077BE54AB} = {AAFB81D3-BC87-404D-BA64-AF40B2D2E45A}
{D7D34736-A719-4B45-A33F-2723F59EC29D} = {A7DB7367-9FD6-4164-8263-A05077BE54AB}
{3CD26906-C7F3-47B8-AF43-FF6BCF1CB3EF} = {020356B7-C3FC-4100-AE37-97E5D8288D1D}
{33D66E90-049F-4A0B-A2B1-79E7E7E0ED0F} = {3CD26906-C7F3-47B8-AF43-FF6BCF1CB3EF}
{4EBC65DF-3B5E-419B-8E26-3EEF0B5CD300} = {3CD26906-C7F3-47B8-AF43-FF6BCF1CB3EF}
{D23480EE-88FC-4DF2-86BD-1C5BDD6CD98C} = {3CD26906-C7F3-47B8-AF43-FF6BCF1CB3EF}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {929C0464-86D8-4F70-8835-0A5EAF930821}
Expand Down
8 changes: 8 additions & 0 deletions bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ if (-not (Test-Path Env:AGENT_OS)) {
Pop-Location
$Env:BUILD_CONFIGURATION = $null
}
if ($Env:ENABLE_QIRRUNTIME -ne "false") {
Write-Host "Build release flavor of the QIR Runtime"
$Env:BUILD_CONFIGURATION = "Release"
Push-Location (Join-Path $PSScriptRoot "src/Qir/Runtime")
.\build-qir-runtime.ps1
Pop-Location
$Env:BUILD_CONFIGURATION = $null
}

Write-Host "Build simulation solution"
dotnet build Simulation.sln
Expand Down
2 changes: 2 additions & 0 deletions build/manifest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ param(
$artifacts = @{
Packages = @(
"Microsoft.Azure.Quantum.Client",
"Microsoft.Quantum.AutoSubstitution",
"Microsoft.Quantum.CSharpGeneration",
"Microsoft.Quantum.Development.Kit",
"Microsoft.Quantum.EntryPointDriver",
Expand All @@ -35,6 +36,7 @@ $artifacts = @{

Assemblies = @(
".\src\Azure\Azure.Quantum.Client\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Azure.Quantum.Client.dll",
".\src\Simulation\AutoSubstitution\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.AutoSubstitution.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\RoslynWrapper\bin\$Env:BUILD_CONFIGURATION\netstandard2.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 @@ -90,6 +90,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-One '../src/Simulation/AutoSubstitution/AutoSubstitution.csproj' '-IncludeReferencedProjects'
Pack-Dotnet '../src/Simulation/EntryPointDriver/Microsoft.Quantum.EntryPointDriver.csproj'
Pack-Dotnet '../src/Simulation/Core/Microsoft.Quantum.Runtime.Core.csproj'
Pack-Dotnet '../src/Simulation/TargetDefinitions/Interfaces/Microsoft.Quantum.Targets.Interfaces.csproj'
Expand Down
7 changes: 7 additions & 0 deletions src/Qir/Common/Include/QirUtils.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef QIRUTILS_HPP
#define QIRUTILS_HPP

// Calm down the "Unused Entity" compiler warning:
#define UNUSED(expr) ((void) (expr))

#endif // #ifndef QIRUTILS_HPP
62 changes: 31 additions & 31 deletions src/Qir/Common/Include/SimulatorStub.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,113 +15,113 @@ namespace Quantum
{
throw std::logic_error("not_implemented: AllocateQubit");
}
void ReleaseQubit(Qubit qubit) override
void ReleaseQubit(Qubit /* qubit */) override
{
throw std::logic_error("not_implemented: ReleaseQubit");
}
virtual std::string QubitToString(Qubit qubit) override
virtual std::string QubitToString(Qubit /* qubit */) override
{
throw std::logic_error("not_implemented: QubitToString");
}
void X(Qubit target) override
void X(Qubit /*target*/) override
{
throw std::logic_error("not_implemented: X");
}
void Y(Qubit target) override
void Y(Qubit /*target*/) override
{
throw std::logic_error("not_implemented: Y");
}
void Z(Qubit target) override
void Z(Qubit /* target */) override
{
throw std::logic_error("not_implemented: Z");
}
void H(Qubit target) override
void H(Qubit /*target*/) override
{
throw std::logic_error("not_implemented: H");
}
void S(Qubit target) override
void S(Qubit /*target*/) override
{
throw std::logic_error("not_implemented: S");
}
void T(Qubit target) override
void T(Qubit /*target*/) override
{
throw std::logic_error("not_implemented: T");
}
void R(PauliId axis, Qubit target, double theta) override
void R(PauliId /* axis */, Qubit /* target */, double /* theta */) override
{
throw std::logic_error("not_implemented: R");
}
void Exp(long numTargets, PauliId paulis[], Qubit targets[], double theta) override
void Exp(long /* numTargets */, PauliId* /* paulis */, Qubit* /* targets */, double /* theta */) override
{
throw std::logic_error("not_implemented: Exp");
}
void ControlledX(long numControls, Qubit controls[], Qubit target) override
void ControlledX(long /*numControls*/, Qubit* /*controls*/, Qubit /*target*/) override
{
throw std::logic_error("not_implemented: ControlledX");
}
void ControlledY(long numControls, Qubit controls[], Qubit target) override
void ControlledY(long /*numControls*/, Qubit* /*controls*/, Qubit /*target*/) override
{
throw std::logic_error("not_implemented: ControlledY");
}
void ControlledZ(long numControls, Qubit controls[], Qubit target) override
void ControlledZ(long /*numControls*/, Qubit* /*controls*/, Qubit /*target*/) override
{
throw std::logic_error("not_implemented: ControlledZ");
}
void ControlledH(long numControls, Qubit controls[], Qubit target) override
void ControlledH(long /*numControls*/, Qubit* /*controls*/, Qubit /*target*/) override
{
throw std::logic_error("not_implemented: ControlledH");
}
void ControlledS(long numControls, Qubit controls[], Qubit target) override
void ControlledS(long /*numControls*/, Qubit* /*controls*/, Qubit /*target*/) override
{
throw std::logic_error("not_implemented: ControlledS");
}
void ControlledT(long numControls, Qubit controls[], Qubit target) override
void ControlledT(long /*numControls*/, Qubit* /*controls*/, Qubit /*target*/) override
{
throw std::logic_error("not_implemented: ControlledT");
}
void ControlledR(long numControls, Qubit controls[], PauliId axis, Qubit target, double theta) override
void ControlledR(long /*numControls*/, Qubit* /*controls*/, PauliId /*axis*/, Qubit /*target*/, double /*theta*/) override
{
throw std::logic_error("not_implemented: ControlledR");
}
void ControlledExp(
long numControls,
Qubit controls[],
long numTargets,
PauliId paulis[],
Qubit targets[],
double theta) override
long /*numControls*/,
Qubit* /*controls*/,
long /*numTargets*/,
PauliId* /*paulis*/,
Qubit* /*targets*/,
double /*theta*/) override
{
throw std::logic_error("not_implemented: ControlledExp");
}
void AdjointS(Qubit target) override
void AdjointS(Qubit /*target*/) override
{
throw std::logic_error("not_implemented: AdjointS");
}
void AdjointT(Qubit target) override
void AdjointT(Qubit /*target*/) override
{
throw std::logic_error("not_implemented: AdjointT");
}
void ControlledAdjointS(long numControls, Qubit controls[], Qubit target) override
void ControlledAdjointS(long /*numControls*/, Qubit* /*controls*/, Qubit /*target*/) override
{
throw std::logic_error("not_implemented: ControlledAdjointS");
}
void ControlledAdjointT(long numControls, Qubit controls[], Qubit target) override
void ControlledAdjointT(long /*numControls*/, Qubit* /*controls*/, Qubit /*target*/) override
{
throw std::logic_error("not_implemented: ControlledAdjointT");
}
Result Measure(long numBases, PauliId bases[], long numTargets, Qubit targets[]) override
Result Measure(long /*numBases*/, PauliId* /*bases*/, long /*numTargets*/, Qubit* /*targets*/) override
{
throw std::logic_error("not_implemented: Measure");
}
void ReleaseResult(Result result) override
void ReleaseResult(Result /*result*/) override
{
throw std::logic_error("not_implemented: ReleaseResult");
}
bool AreEqualResults(Result r1, Result r2) override
bool AreEqualResults(Result /*r1*/, Result /*r2*/) override
{
throw std::logic_error("not_implemented: AreEqualResults");
}
ResultValue GetResultValue(Result result) override
ResultValue GetResultValue(Result /*result*/) override
{
throw std::logic_error("not_implemented: GetResultValue");
}
Expand Down
Loading