Skip to content

Latest commit

 

History

History
63 lines (47 loc) · 2.3 KB

README.md

File metadata and controls

63 lines (47 loc) · 2.3 KB
page_type languages products description jupyter
sample
qsharp
python
csharp
qdk
This sample implements using the quantum machine learning library to train a sequential model on the half-moons dataset.
jupytext kernelspec
cell_markers text_representation
region,endregion
extension format_name format_version jupytext_version
.md
markdown
1.2
1.5.2
display_name language name
.NET (PowerShell)
PowerShell
.net-powershell

Training sequential models with Q#, using built-in datasets

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#.

Prerequisites

Running the Sample

This sample can be run in a number of different ways, depending on your preferred environment.

Python in Visual Studio Code or the Command Line

At a terminal, run the following command:

python host.py

C# in Visual Studio Code or the Command Line

At a terminal, run the following command:

dotnet run

C# in Visual Studio 2019

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 Wine.csproj as the startup project. Press Start in Visual Studio to run the sample.

Manifest

  • 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.