| page_type | sample | |||
|---|---|---|---|---|
| languages |
|
|||
| products |
|
|||
| description | This sample demonstrates using Bayesian inference to learn phases of quantum operations. | |||
| urlFragment | iterative-phase-estimation |
This sample demonstrates iterative phase estimation using Bayesian inference to provide a simple method to perform the classical statistical analysis.
- The Microsoft Quantum Development Kit.
This sample can be run in a number of different ways, depending on your preferred environment.
At a terminal, run the following command:
python host.pyAt a terminal, run the following command:
dotnet run
Open the folder containing this sample in Visual Studio ("Open a local folder" from the Getting Started screen or "File → Open → Folder..." from the menu bar) and set PhaseEstimationSample.csproj as the startup project.
Press Start in Visual Studio to run the sample.
- PhaseEstimationSample.csproj: Main C# project for the example.
- Host.cs: C# code to call the operations defined in Q#.
- host.py: a sample Python program to call the Q# phase estimation operation.
- BayesianPhaseEstimation.qs: The Q# implementation of iterative phase estimation and Bayesian inference.