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
Show all changes
35 commits
Select commit Hold shift + click to select a range
0997916
Use a default target when submitting to Azure Quantum (#290)
bamarsha Jul 6, 2020
d160a88
Implement friendly URI option for Azure quantum machines (#294)
cesarzc Jul 7, 2020
2f9c6f2
Simulator Classical Control Execution Tests (#297)
ScottCarda-MS Jul 7, 2020
edc3ad2
Remove negative tests from execution testing. (#300)
ScottCarda-MS Jul 8, 2020
b351b1b
Extends #257 (fixing #256) to QuantumProcessor sim (#302)
yusudz Jul 9, 2020
2dd6079
Include native files in Simulators project (#305)
anpaz Jul 10, 2020
ebd5a47
Generic Parameter Bug Fix (#306)
ScottCarda-MS Jul 11, 2020
a2064f7
Update to C++17 (#310)
swernli Jul 15, 2020
8342993
Replacing deprecated IconUrl with Icon and updating the assets for Nu…
ricardo-espinoza Jul 15, 2020
b1af02d
Add Runtime Metadata to Operations (#301)
theRoughCode Jul 15, 2020
08ae4a4
Fix stack overflow bug for Qubit array types on RuntimeMetadata (#312)
theRoughCode Jul 16, 2020
49393b9
Allow operations in arguments for `GetNonQubitArgumentsAsString` (#314)
theRoughCode Jul 22, 2020
161ed8a
Copy Runtime.dll to build\Release if available on drop. (#315)
anpaz Jul 23, 2020
3d335d0
Make ResetAll a composite operation (#318)
theRoughCode Jul 24, 2020
7d3d0f5
QDK build improvements. (#317)
anpaz Jul 28, 2020
0fbdeab
Make MaybeDisplayDiagnostic public. (#319)
Jul 28, 2020
8d60075
EncourageReuse option in QubitManager. (#320)
avasch01 Aug 4, 2020
b87c1c5
Remove duplicate qubits from RuntimeMetadata.Targets (#324)
Aug 10, 2020
38d00d1
Fix asserts in QubitManager (#332)
swernli Aug 13, 2020
477dfa8
Use processor architecture to determine what code needs to be generat…
bettinaheim Aug 13, 2020
5de1e41
Protect simulator accessors via shared lock (#336)
swernli Aug 14, 2020
898be56
Fixing circuit in test_gates to be deterministic (#338)
swernli Aug 14, 2020
d264e26
Slice Bug Fix (#330)
ScottCarda-MS Aug 14, 2020
c0b5f70
Fixing capi_test use of Pauli basis (#340)
swernli Aug 17, 2020
8d11a6f
Fix stackoverflow error in GetNonQubitArgsAsString for QArray args (#…
Aug 17, 2020
b69e9a9
Fixing namespace references with global:: (#346)
swernli Aug 18, 2020
50df7b3
Use culture-dependent string for decimals in RuntimeMetadataTests (#339)
bamarsha Aug 18, 2020
56476fe
Improvements to Microsoft.Quantum.Random namespace (#328)
Aug 18, 2020
80a9c6d
Merge remote-tracking branch 'origin/master' into swernli/decomp-merg…
swernli Aug 18, 2020
55e12bd
Updating Notice.txt with a more recent list of third party libraries.…
ricardo-espinoza Aug 19, 2020
5f8268e
Fixing a unit test and the solution paths (#351)
bettinaheim Aug 20, 2020
8a88b4e
Merge remote-tracking branch 'origin/master' into swernli/decomp-merg…
swernli Aug 21, 2020
43ab25d
classical control tracer ... (#354)
bettinaheim Aug 21, 2020
5d670a8
Merge remote-tracking branch 'origin/master' into swernli/decomp-merg…
swernli Aug 21, 2020
2563547
Fixing ResourceEstimator conditional support
swernli Aug 21, 2020
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -336,3 +336,4 @@ ASALocalRun/
# MFractors (Xamarin productivity tool) working folder
.mfractor/
/src/Simulation/Simulators.Tests/TestProjects/QsharpExe/built
/src/Simulation/Simulators.Tests/TestProjects/TargetedExe/built
3,971 changes: 3,780 additions & 191 deletions NOTICE.txt

Large diffs are not rendered by default.

156 changes: 113 additions & 43 deletions Simulation.sln

Large diffs are not rendered by default.

14 changes: 0 additions & 14 deletions bootstrap.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ git --version || GOTO missingGit
:: Initialize C++ runtime project
CALL :runtimeBootstrap || EXIT /B 1

:: Initialize the compiler's nuspec file
CALL :nuspecBootstrap || EXIT /B 1

:: Next steps are only needed for developers environment, they are skipped for cloud builds.
IF NOT "%AGENT_ID%" == "" GOTO EOF

Expand All @@ -33,17 +30,6 @@ popd
EXIT /B


:: Bootstrap the compiler nuspec
:nuspecBootstrap
pushd src\Simulation\CsharpGeneration
CALL powershell -NoProfile .\FindNuspecReferences.ps1 || EXIT /B 1
popd

pushd src\Simulation\Simulators
CALL powershell -NoProfile .\FindNuspecReferences.ps1 || EXIT /B 1
popd
EXIT /B

:missingGit
echo.
echo This script depends on git.
Expand Down
24 changes: 24 additions & 0 deletions bootstrap.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

$ErrorActionPreference = 'Stop'

Push-Location (Join-Path $PSScriptRoot "src/Simulation/CsharpGeneration")
.\FindNuspecReferences.ps1
Pop-Location

Push-Location (Join-Path $PSScriptRoot "src/Simulation/Simulators")
.\FindNuspecReferences.ps1
Pop-Location

# bootstrap native folder
if ($Env:ENABLE_NATIVE -ne "false") {
## Run the right script based on the OS.
if (-not (Test-Path Env:AGENT_OS) -or ($Env:AGENT_OS.StartsWith("Win"))) {
.\bootstrap.cmd
} else {
.\bootstrap.sh
}
} else {
Write-Host "Skipping native. ENABLE_NATIVE variable set to: $Env:ENABLE_NATIVE."
}
Binary file added build/assets/qdk-nuget-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 10 additions & 6 deletions build/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@ $ErrorActionPreference = 'Stop'
& "$PSScriptRoot/set-env.ps1"
$all_ok = $True

Write-Host "##[info]Build Native simulator"
cmake --build (Join-Path $PSScriptRoot "../src/Simulation/Native/build") --config $Env:BUILD_CONFIGURATION
if ($LastExitCode -ne 0) {
Write-Host "##vso[task.logissue type=error;]Failed to build Native simulator."
$script:all_ok = $False
if ($Env:ENABLE_NATIVE -ne "false") {
Write-Host "##[info]Build Native simulator"
$nativeBuild = (Join-Path $PSScriptRoot "../src/Simulation/Native/build")
cmake --build $nativeBuild --config $Env:BUILD_CONFIGURATION
if ($LastExitCode -ne 0) {
Write-Host "##vso[task.logissue type=error;]Failed to build Native simulator."
$script:all_ok = $False
}
} else {
Write-Host "Skipping native. ENABLE_NATIVE variable set to: $Env:ENABLE_NATIVE."
}


function Build-One {
param(
[string]$action,
Expand Down
38 changes: 13 additions & 25 deletions build/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,22 @@ variables:
Drop.Native: $(System.DefaultWorkingDirectory)/xplat

jobs:
- job: macOS
pool:
vmImage: 'macOS-latest'
steps:
- template: steps-xplat.yml

- job: build
displayName: Build
strategy:
matrix:
linux:
imageName: 'ubuntu-latest'
mac:
imageName: 'macOS-latest'
windows:
imageName: 'windows-latest'
pool:
vmImage: $(imageName)

- job: Linux
pool:
vmImage: 'ubuntu-latest'
steps:
- template: steps-xplat.yml


- job: Windows
pool:
vmImage: 'windows-2019'
dependsOn:
- macOS
- Linux
condition: succeeded()
steps:
- task: DownloadBuildArtifacts@0
displayName: 'Download xplat native binaries'
inputs:
artifactName: xplat
downloadPath: $(System.DefaultWorkingDirectory)
- template: steps.yml

- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
inputs:
Expand Down
19 changes: 10 additions & 9 deletions build/manifest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@
);
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",
".\src\simulation\Core\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Runtime.Core.dll",
".\src\simulation\EntryPointDriver\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.EntryPointDriver.dll",
".\src\simulation\QsharpCore\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.QSharp.Core.dll",
".\src\simulation\Simulators\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Simulation.Common.dll",
".\src\simulation\Simulators\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.dll",
".\src\simulation\Simulators\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Simulators.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",
".\src\Simulation\Core\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Runtime.Core.dll",
".\src\Simulation\EntryPointDriver\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.EntryPointDriver.dll",
".\src\Simulation\QsharpCore\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.QSharp.Core.dll",
".\src\Simulation\QsharpFoundation\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.QSharp.Foundation.dll",
".\src\Simulation\Simulators\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Simulation.Common.dll",
".\src\Simulation\Simulators\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Simulation.QCTraceSimulatorRuntime.dll",
".\src\Simulation\Simulators\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Simulators.dll",
".\src\Xunit\bin\$Env:BUILD_CONFIGURATION\netstandard2.1\Microsoft.Quantum.Xunit.dll"
) | ForEach-Object { Get-Item (Join-Path $PSScriptRoot (Join-Path ".." $_)) };
} | Write-Output;
16 changes: 7 additions & 9 deletions build/steps-init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,20 @@ steps:
# Pre-reqs
##
- task: NuGetToolInstaller@0
displayName: 'Use NuGet 5.2.0'
displayName: 'Use NuGet 5.6.0'
inputs:
versionSpec: '5.2.0'
versionSpec: '5.6.0'

- task: UseDotNet@2
displayName: 'Use .NET Core SDK 3.1.100'
displayName: 'Use .NET Core SDK 3.1.300'
inputs:
packageType: sdk
version: '3.1.100'
version: '3.1.300'


##
# Bootstrap
##
- task: BatchScript@1
displayName: 'Prepare build'
inputs:
filename: bootstrap.cmd
modifyEnvironment: true
- pwsh: ./bootstrap.ps1
displayName: "Bootstrap repository"
workingDirectory: $(System.DefaultWorkingDirectory)
3 changes: 2 additions & 1 deletion build/steps-wrap-up.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ steps:
testRunTitle: 'Q# runtime tests'

- task: PublishSymbols@1
displayName: 'Publish symbols'
displayName: 'Publish symbols (Windows only)'
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
continueOnError: true
inputs:
SearchPattern: '$(System.DefaultWorkingDirectory)/src/**/*.pdb'
Expand Down
50 changes: 0 additions & 50 deletions build/steps-xplat.yml

This file was deleted.

3 changes: 2 additions & 1 deletion build/steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ steps:


- powershell: ./pack.ps1
displayName: "Pack Q# runtime"
displayName: "Pack Q# runtime (Windows only)"
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
workingDirectory: $(System.DefaultWorkingDirectory)/build


Expand Down
21 changes: 12 additions & 9 deletions build/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@
& "$PSScriptRoot/set-env.ps1"
$all_ok = $True

Write-Host "##[info]Test Native simulator"
pushd (Join-Path $PSScriptRoot "../src/Simulation/Native/build")
cmake --build . --config $Env:BUILD_CONFIGURATION
ctest -C $Env:BUILD_CONFIGURATION
if ($LastExitCode -ne 0) {
Write-Host "##vso[task.logissue type=error;]Failed to test Native Simulator"
$script:all_ok = $False
if ($Env:ENABLE_NATIVE -ne "false") {
Write-Host "##[info]Test Native simulator"
pushd (Join-Path $PSScriptRoot "../src/Simulation/Native/build")
cmake --build . --config $Env:BUILD_CONFIGURATION
ctest -C $Env:BUILD_CONFIGURATION
if ($LastExitCode -ne 0) {
Write-Host "##vso[task.logissue type=error;]Failed to test Native Simulator"
$script:all_ok = $False
}
popd
} else {
Write-Host "Skipping native. ENABLE_NATIVE variable set to: $Env:ENABLE_NATIVE."
}
popd


function Test-One {
Param($project)
Expand Down
13 changes: 12 additions & 1 deletion src/Azure/Azure.Quantum.Client/JobManagement/CloudJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public CloudJob(IWorkspace workspace, JobDetails jobDetails)
/// <summary>
/// Gets an URI to access the job.
/// </summary>
public Uri Uri => throw new NotImplementedException();
public Uri Uri => GenerateUri();

/// <summary>
/// Gets the workspace.
Expand Down Expand Up @@ -91,5 +91,16 @@ public async Task CancelAsync(CancellationToken cancellationToken = default)
CloudJob job = (CloudJob)await this.Workspace.CancelJobAsync(this.Details.Id, cancellationToken);
this.Details = job.Details;
}

private Uri GenerateUri()
{
if (!(this.Workspace is Workspace cloudWorkspace))
{
throw new NotSupportedException($"{typeof(CloudJob)}'s Workspace is not of type {typeof(Workspace)} and does not have enough data to generate URI");
}

var uriStr = $"https://ms.portal.azure.com/#@microsoft.onmicrosoft.com/resource/subscriptions/{cloudWorkspace.SubscriptionId}/resourceGroups/{cloudWorkspace.ResourceGroupName}/providers/Microsoft.Quantum/Workspaces/{cloudWorkspace.WorkspaceName}/job_management?microsoft_azure_quantum_jobid={Id}";
return new Uri(uriStr);
}
}
}
6 changes: 6 additions & 0 deletions src/Azure/Azure.Quantum.Client/JobManagement/Workspace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ private Workspace(
}
}

public string ResourceGroupName { get => resourceGroupName; }

public string SubscriptionId { get => subscriptionId; }

public string WorkspaceName { get => workspaceName; }

/// <summary>
/// Gets or sets the jobs client.
/// Internal only.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/microsoft/qsharp-runtime</PackageProjectUrl>
<PackageTags>Azure Quantum Q# Qsharp</PackageTags>
<PackageIconUrl>https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png</PackageIconUrl>
<PackageIcon>qdk-nuget-icon.png</PackageIcon>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
</PropertyGroup>

Expand Down Expand Up @@ -46,4 +46,8 @@
<ProjectReference Include="..\..\Simulation\Core\Microsoft.Quantum.Runtime.Core.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\..\build\assets\qdk-nuget-icon.png" Pack="true" Visible="false" PackagePath="" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<package >
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>Microsoft.Quantum.Development.Kit</id>
<version>$version$</version>
Expand All @@ -9,7 +9,7 @@

<license type="expression">MIT</license>
<projectUrl>https://docs.microsoft.com/en-us/quantum</projectUrl>
<iconUrl>https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png</iconUrl>
<icon>images\qdk-nuget-icon.png</icon>

<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Provides tools for developing quantum algorithms in the Q# programming language.</description>
Expand All @@ -30,6 +30,7 @@
<file src="Props\*.xaml" target="build" />
<file src="..\..\NOTICE.txt" target="\ThirdPartyNotice.txt" />
<file src="..\Simulation\CsharpGeneration.App\bin\$Configuration$\netcoreapp3.1\publish\**" target="tools\qsc" exclude="**\*.pdb" />
<file src="..\..\build\assets\qdk-nuget-icon.png" target="images" />
</files>

</package>
Loading