| page_type | sample | ||
|---|---|---|---|
| languages |
|
||
| products |
|
||
| description | This sample demonstrates how to use Q# to write variational quantum algorithms. | ||
| urlFragment | variational-quantum-algorithms |
This sample demonstrates:
- How variational quantum algorithms use classical and quantum computation together to solve problems.
- How to use Q# and QuTiP together to estimate the energy of different quantum states.
- Using Q# to implement the variational quantum eigensolver.
- The Microsoft Quantum Development Kit.
This sample is designed to work with the conda environment specified by environment.yml. To create this environment:
conda env create -f environment.ymlThis sample can be run as a Jupyter Notebook:
conda activate variational
jupyter notebook- Variational Quantum Algorithms.ipynb: Main Jupyter Notebook for this sample.
- Optimization.qs: Q# implementation of the SPSA algorithm.
- VariationalAlgorithms.csproj: Main Q# project for this sample.
- enviornment.yml: Specification of a conda environment for this sample.
- .iqsharp-config.json: Preferences for Q# visualization in Jupyter Notebooks.
- For an example of using variational quantum eigensolvers in chemistry, see the azure-quantum/chemistry sample.
- For an example of using iterative phase estimation to more efficiently learn energies, see the characterization/phase-estimation sample.