Skip to main content

PyPI Version Python Version CI/CD Integration Coverage docs: numpy

YOTSE - Your Optimization Tool for Scientific Experiments

drawing

YOTSE is a powerful tool designed to enable computational experiments using any software, with a particular emphasis on NetSquid in the context of the Quantum Internet Alliance. This library offers a set of predefined functions for performing parameter explorations and optimizations in a scalable and efficient manner.

Documentation can be found here.

Note: If you use this package for research purposes, consider checking out the underlying optimization libraries and citing them.

Table of Contents

  1. Installation
  2. Usage
  3. Contributing
  4. Testing
  5. License

Installation

Python Package

To install this project, simply:

pip install yotse

Manual

If you want to contribute to the project, then clone the repository as follows: (Make sure you have the necessary permissions.)

git clone https://github.com/SURFQuantum/yotse.git

Once the repository is cloned, navigate to the project's root directory, with:

cd yotse

If you do not have poetry already installed you need will need to install it first. Then install yotse using:

poetry install

To verify your installation you can now do:

poetry run tests && poetry run examples

Usage

General

YOTSE is versatile, catering to a wide range of software. While it has a special focus on NetSquid, it is flexible enough to accommodate any software you wish to use for your computational experiments.

Our library offers predefined functions for parameter exploration and optimization. We base our tools on the QCG-PilotJob project, a job manager executable both locally and in HPC centers. You can find more information about QCG-PilotJob in their official docs or in the original paper.

The optimization component of YOTSE involves a base class that can be used with any external optimization library. This flexibility allows you to tailor your optimization process to your specific needs and preferences.

Detailed examples of usage are provided in the /examples directory.

---
title: Workflow
---
flowchart LR
    p("`user_pre
    (Experiment)`")
    a(analysis script)
    s(user script)
    c{{"`csv output
     input params, cost
     (Core)`"}}
    S[[Best Solution]]
    q["`QcgPilotJob
    (Executor)`"]
    G["`GenericOptimization
    (Optimizer)`"]

    p --> q -- schedules jobs of --> s --> c --> G --  generates new datapoints for --> q
    G --> S
    s -.-> a -.-> c

Usage with SLURM

In order to make usage with HPC resources and SLURM as smooth and simple as possible, yotse can generate its own SLURM files ready for execution.

Simply specify your SLURM parameters (such as required nodes or time) and modules to be imported in the SystemSetup and then execute

python <your_yotse_script.py> --slurm

This will generate a SLURM script for your (default name: slurm.job) which you can then submit by:

sbatch slurm.job

In order to keep dependencies as clean as possible, we suggest using two virtual environments for SLURM execution:

  1. A virtual environment that has all dependencies of your own script installed and can execute your owns script without errors. Pass this as SystemSetup.venv.
  2. A virtual environment that has yotse installed. Pass this as SystemSetup.slurm_venv such that it is activated before SLURM executes the yotse commands.

Class structure

---
title: Class diagram
---
flowchart TB
  E["Executor"]
  c["cost function"]
  O["Optimizer"]
  G["GenericOptimization"]
  D[("database_from_csv")]
  Ex["Experiment"]
  E --> Ex --> O
  E -- generates --> O -- contains --> G -- contains --> D
  c -- replaced by --x D
  D -- fitness fun in --> G

Contributing

We appreciate contributions. To contribute:

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/MyNewFeature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin feature/MyNewFeature)
  5. Execute make verify to check if your changes pass the required checks
  6. Open a Pull Request

Testing

To run tests on the project, navigate to the project's root directory and:

poetry run tests

If you want to open the coverage report do:

poetry run show-cov

and the coverage report should open in your default browser.

To run the examples, in the root directory execute

poetry run examples

License

This project is licensed under the terms of the Apache License 2.0. For more details, refer to the LICENSE file in the project root.

Metadata

Release files for yotse 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yotse 1.0.0
File Size Uploaded Provenance
yotse-1.0.0.tar.gz 42.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for yotse 1.0.0
File Interpreter ABI Platform
yotse-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 89.4 kB

Release files / yotse-1.0.0.tar.gz

Download URL yotse-1.0.0.tar.gz
Size 42.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1800ecd754ce81dab82c2dc172bc2da6d8be52c3c04d9c15947f312357bec035
BLAKE2b-256 checksum
How to use checksums
000977808d612cdf6f39513f836665972b3faf1439c4790e360cfd85bab6a715
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.0 Linux/6.2.0-1018-azure

Release files / yotse-1.0.0-py3-none-any.whl

Download URL yotse-1.0.0-py3-none-any.whl
Size 47.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
537348527331dee609836eac8e85ec25d6df1cb763911ded7b486c1bcc226d8c
BLAKE2b-256 checksum
How to use checksums
b9cae7661818bc36a500e23d6a85da8abd2fe0d812c3265ea8100c5d016ebaf5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.0 Linux/6.2.0-1018-azure

Security for yotse 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page