Skip to content

Commit

Permalink
updates to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nulinspiratie committed Oct 14, 2024
1 parent 88babc3 commit 29069ba
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 21 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ QUAlibrate is an open-source calibration platform designed specifically for quan

## Installation

QUAlibrate requires Python ≥ 3.9.
To get started, follow these steps:
**Requirements**
QUAlibrate requires Python ≥ 3.9. It is also recommended to use a [virtual environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/).

1. **Install QUAlibrate**
Run the following command in a terminal:

```bash
pip install qualibrate
Expand Down
Binary file modified docs/assets/simulated_data_output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 9 additions & 7 deletions docs/calibration_nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ import numpy as np
from matplotlib import pyplot as plt

# Define input parameters
span = 20
span = 20e3
num_points = 101

# Generate data
offset = np.random.rand() * 3
offset = np.random.rand() * span / 5
width = span / 20
noise_factor = 0.2
sweep_values = np.linspace(-span / 2, span / 2, num_points)
gaussian = np.exp(-((sweep_values + offset) ** 2))
gaussian = np.exp(-((sweep_values + offset) / width) ** 2)
noise = noise_factor * np.random.rand(num_points)
data = gaussian + noise

Expand Down Expand Up @@ -54,7 +55,7 @@ Instead of defining parameters as standalone variables, we group them together i

```python
class Parameters(NodeParameters):
span: float = 20
span: float = 20e3
num_points: int = 101
```
Using `NodeParameters` allows parameters to be modified externally, such as through the QUAlibrate web interface. For example, this makes it easy to adapt calibration settings for different hardware configurations without changing the code.
Expand Down Expand Up @@ -129,21 +130,22 @@ from qualibrate import NodeParameters, QualibrationNode

# Define input parameters for QualibrationNode
class Parameters(NodeParameters):
span: float = 20
span: float = 20e3
num_points: int = 101

# Create QualibrationNode
node = QualibrationNode("emulated_calibration", parameters=Parameters())

# Generate data using node parameters
offset = np.random.rand() * 3
offset = np.random.rand() * node.parameters.span / 5
width = node.parameters.span / 20
noise_factor = 0.2
sweep_values = np.linspace(
-node.parameters.span / 2,
node.parameters.span / 2,
node.parameters.num_points
)
gaussian = np.exp(-((sweep_values + offset) ** 2))
gaussian = np.exp(-((sweep_values + offset) / width) ** 2)
noise = noise_factor * np.random.rand(node.parameters.num_points)
data = gaussian + noise

Expand Down
9 changes: 0 additions & 9 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,6 @@ QUAlibrate is a comprehensive platform that enables users to create, manage, and
3. **Run Calibrations**: Start running calibration nodes or graphs through either the Python interface or the web app. Learn more about each method in the [Calibration Nodes](calibration_nodes.md) and [Calibration Graphs](calibration_graphs.md) sections.
4. **Use the Web App**: Access and operate your calibration routines through an easy-to-use web interface. More information is available on the [Web App](web_app.md) page.

## Documentation Roadmap
Explore the following sections to dive deeper into QUAlibrate:
- **[Installation](installation.md)**: Step-by-step instructions for installing QUAlibrate.
- **[Calibration Nodes](calibration_nodes.md)**: Learn how to create and use individual calibration nodes.
- **[Calibration Library](calibration_library.md)**: Understand how to organize and manage calibration nodes and graphs.
- **[Calibration Graphs](calibration_graphs.md)**: Discover how to build complex calibration workflows that adapt to outcomes in real-time.
- **[Web App](web_app.md)**: A guide to using the QUAlibrate web app for calibration operations.
- **[Configuration](configuration.md)**: Details on the QUAlibrate configuration file

## Core Components

### [Calibration Nodes](calibration_nodes.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This guide will provide a detailed walkthrough for installing QUAlibrate, a user

/// tab | For Windows
- Windows 10 (build 1809 and later), or Windows 11
- 3.9 ≤ Python 3.11, we recommend Python 3.10 or 3.11
- Python 3.9, we recommend Python 3.10 or higher

/// details | Using a virtual environment in Windows
type: tip
Expand Down
2 changes: 1 addition & 1 deletion docs/web_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ Here you can see the progress of the graph execution, including the results of e
The `Data` page shows the results of all nodes that have been executed.
This includes the node results, but also the QUAM state, and any updates to QUAM that occured while executing this node.

![Node Page](assets/web_app/node_page.png){ max-width="700px" }
![Node Page](assets/web_app/data_page.png){ max-width="700px" }
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ theme:
# - navigation.tabs # Add tabs to the top of the page
# - navigation.sections # Expand sections in the navigation
- navigation.top # Add "back to top" button when scrolling back up
- toc.integrate # Invlude TOC in left sidebar instead of separate right
- toc.integrate # Include TOC in left sidebar instead of separate right
- search.suggest
- search.highlight
- content.tabs.link
Expand Down

0 comments on commit 29069ba

Please sign in to comment.