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

Conversation

@bamarsha
Copy link
Contributor

@bamarsha bamarsha commented Sep 2, 2020

This merges feature/capability-inference to main (via a user branch).

TODO:

Closes #586.

@microsoft-github-updates microsoft-github-updates bot changed the base branch from master to main September 9, 2020 07:51
@bamarsha bamarsha changed the base branch from main to features/CallGraphWalker September 11, 2020 22:43
@bamarsha bamarsha changed the base branch from features/CallGraphWalker to main September 11, 2020 22:44
@bamarsha bamarsha changed the base branch from main to features/CallGraphWalker September 13, 2020 03:11
@bamarsha
Copy link
Contributor Author

Build failing on qsharp-runtime:

D:\a\1\s\submodules\qsharp-runtime\src\Simulation\Simulators.Tests\TestProjects\IonQExe\MeasurementSupportTests.qs(26,13): error QS5027: The callable Reset requires runtime capabilities that are not supported by the target IonQProcessor. [D:\a\1\s\submodules\qsharp-runtime\src\Simulation\Simulators.Tests\TestProjects\IonQExe\IonQExe.csproj]
D:\a\1\s\submodules\qsharp-runtime\src\Simulation\Simulators.Tests\TestProjects\IonQExe\MeasurementSupportTests.qs(16,13): error QS5027: The callable Reset requires runtime capabilities that are not supported by the target IonQProcessor. [D:\a\1\s\submodules\qsharp-runtime\src\Simulation\Simulators.Tests\TestProjects\IonQExe\IonQExe.csproj]
D:\a\1\s\submodules\qsharp-runtime\src\Simulation\Simulators.Tests\TestProjects\IonQExe\MeasurementSupportTests.qs(15,13): error QS5027: The callable Reset requires runtime capabilities that are not supported by the target IonQProcessor. [D:\a\1\s\submodules\qsharp-runtime\src\Simulation\Simulators.Tests\TestProjects\IonQExe\IonQExe.csproj]
C:\Users\VssAdministrator\.nuget\packages\microsoft.quantum.sdk\0.12.200914858-pull\Sdk\Sdk.targets(118,5): error MSB3073: The command "dotnet "C:\Users\VssAdministrator\.nuget\packages\microsoft.quantum.sdk\0.12.200914858-pull\DefaultItems\../tools/qsc/qsc.dll" build --format MsBuild -v Normal --response-files obj/qsharp/config/qsc.rsp" exited with code -3. [D:\a\1\s\submodules\qsharp-runtime\src\Simulation\Simulators.Tests\TestProjects\IonQExe\IonQExe.csproj]
C:\Users\VssAdministrator\.nuget\packages\microsoft.quantum.sdk\0.12.200914858-pull\Sdk\Sdk.targets(123,5): error : Q# compiler failed with exit code: -3. [D:\a\1\s\submodules\qsharp-runtime\src\Simulation\Simulators.Tests\TestProjects\IonQExe\IonQExe.csproj]

This is actually working as intended, because Reset is implemented in QsharpCore as

    operation Reset (target : Qubit) : Unit {
        
        if (M(target) == One)
        {
            X(target);
        }
    }

which is not supported on IonQ. I suspect IonQ has a custom implementation of reset that does not use a measurement branch. It might need a capability override, or for the IonQExe test to use the IonQ-specific Reset implementation.

@bamarsha bamarsha changed the base branch from features/CallGraphWalker to sccarda/CallGraphToMaster September 30, 2020 19:13
@bamarsha
Copy link
Contributor Author

bamarsha commented Sep 30, 2020

After adding an @Capability("QPRGen0") override to Reset, the QDK pipeline passes: https://dev.azure.com/ms-quantum-public/Microsoft%20Quantum%20(public)/_build/results?buildId=15395&view=results

@bamarsha bamarsha added this to the October 2020 milestone Oct 7, 2020
@bamarsha bamarsha requested a review from bettinaheim October 20, 2020 01:59
@bettinaheim bettinaheim merged commit 200bf8e into main Oct 22, 2020
@bettinaheim bettinaheim deleted the samarsha/capability-inference branch October 22, 2020 04:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Verify runtime capabilities of callables defined in referenced libraries

4 participants