page_type | languages | products | description | urlFragment | jupyter | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sample |
|
|
This sample demonstrates counting the resources required to run quantum numerics applications. |
resource-counting-numerics |
|
This sample demonstrates:
- How to configure project files for Q# standalone applications to estimate the quantum resources required to run a Q# operation.
- How to use the
%estimate
magic command provided by the IQ# kernel to estimate the quantum resources required to run a Q# operation.
- The Microsoft Quantum Development Kit.
To run the sample, use the dotnet run
command from your terminal:
dotnet run
The .csproj file provided for this Q# standalone application sets the default simulator to be ResourcesEstimator
, such that the above command will report the resources required to run the Q# program.
This sample can also be used as a Q# notebook:
jupyter notebook
- ResourceCounting.qs: Q# code implementing polynomial function evaluation.
- Program.qs: A Q# standalone application for use with the
-s ResourcesEstimator
option. - ResourceCounting.csproj: Main Q# project for the sample.
- ResourceEstimation.ipynb: A Jupyter Notebook version of the sample.