From 73b058c1bbcd2a391e1c7ef5f28cbabdff59f9bf Mon Sep 17 00:00:00 2001 From: Jiahao Yuan Date: Fri, 7 Jul 2023 12:46:26 +0800 Subject: [PATCH] docs: :memo: add basic usage instructions (#30) --- README.md | 50 ++++++++++++--------- src/Qynit.PulseGen.Server/PulseGenRunner.cs | 2 +- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 6a2549e..72a626b 100644 --- a/README.md +++ b/README.md @@ -2,33 +2,39 @@ Waveform generator for superconducting circuits. -## Simple waveform generator +> **Note:** This package is still under development and the API may change. -A basic waveform generator without scheduling support. +> **Related projects:** [pulsegen-client](https://github.com/kahojyun/pulsegen-client) -* Place waveform at +## Usage - * shape - * width - * plateau - * position -* Shift phase -* Set LO +> **Note:** This package requires .NET 7 or higher. Install the latest .NET SDK from [here](https://dotnet.microsoft.com/download/dotnet/7.0). - * frequency - * phase - * position +First, clone the repository: -Channel options +```bash +git clone https://github.com/kahojyun/Qynit.PulseGen.git +``` -* delay -* crosstalk +Then, build the project: - * complex amplitude - * delay? -* IQ mixer calibration +```bash +cd Qynit.PulseGen +dotnet build +``` - * imbalance - * skew - * offset - * delay? \ No newline at end of file +Finally, run the server: + +```bash +dotnet run --project src/Qynit.PulseGen.Server +``` + +You can specify the url and port number to listen to: + +```bash +dotnet run --project src/Qynit.PulseGen.Server --urls http://localhost:5200 +``` + +## Development + +Use Visual Studio or Visual Studio Code with the [C# extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp). \ No newline at end of file diff --git a/src/Qynit.PulseGen.Server/PulseGenRunner.cs b/src/Qynit.PulseGen.Server/PulseGenRunner.cs index 51ed1ef..edfd8f4 100644 --- a/src/Qynit.PulseGen.Server/PulseGenRunner.cs +++ b/src/Qynit.PulseGen.Server/PulseGenRunner.cs @@ -106,7 +106,7 @@ void Play(Play play) { var channelId = play.ChannelId; var shapeId = play.ShapeId; - var pulseShape = _shapeTable[shapeId].GetPulseShape(); + var pulseShape = (shapeId == -1) ? null : _shapeTable[shapeId].GetPulseShape(); var width = play.Width; var plateau = play.Plateau; var envelope = new Envelope(pulseShape, width, plateau);