| page_type | sample | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| languages |
|
||||||||||||||||||||||
| products |
|
||||||||||||||||||||||
| description | This sample implements using the quantum machine learning library to train a sequential model on the half-moons dataset. | ||||||||||||||||||||||
| jupyter |
|
This sample uses Q# and the Microsoft.Quantum.MachineLearning library to train a simple sequential model. The model is trained on the wine dataset from the UCI Machine Learning Repository, using a classifier structure defined in Q#.
- 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 runOpen 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 Wine.csproj as the startup project.
Press Start in Visual Studio to run the sample.
- Training.qs: Q# code implementing quantum operations for this sample.
- host.py: Python code to interact with and print out results of the Q# operations for this sample.
- Host.cs: C# code to interact with and print out results of the Q# operations for this sample.
- Wine.csproj: Main C# project for the sample.