Skip to content

A project investigating quality-estimation methods and associated uncertainties for single-photon sources (i.e. quantum dots).

License

Notifications You must be signed in to change notification settings

UTS-CASLab/sps-quality

Repository files navigation

Repository Name: sps-quality

Overview

This repository contains the data and Python scripts associated with the scientific article titled "Harnessing data augmentation to quantify uncertainty in the early estimation of single-photon source quality" (DOI: 10.1088/2632-2153/ad0d11).
The article cautions against overconfidence when estimating the quality of a quantum dot intended to be a single-photon source (SPS). It does so by highlighting uncertainty statistics derived from experimental datasets that are supplemented by data augmentation.
The scripts provided here demonstratively implement these procedures of data augmentation and uncertainty analysis.

This repository also contains the data and Python scripts associated with a follow-up machine learning (ML) investigation.

Requirements

  • Anaconda (Python 3.x)
  • Required packages:
    • numpy (version 1.24.3 or later)
    • matplotlib (version 3.6.2 or later)
    • pandas (version 1.4.4 or later)
    • lmfit (version 1.2.1 or later)
    • numdifftools (version 0.9.41 or later)
    • seaborn (version 0.12.2 or later)

If you are interested in viewing ML data/results, you will need to install Git Large File Storage (LFS) on your local system, otherwise, when you clone this repository, data\ml\ml.zip and results\ml\ml.zip will appear as pointer files. We recommend installing GitHub Desktop, which automatically includes Git LFS.

If you are interested in regenerating ML results, you will also need to locally install the AutonoML package (commit a4dd47d): https://github.com/UTS-CASLab/autonoml

Installation

  1. Clone this repository to your local machine using the following command:

    git clone https://github.com/UTS-CASLab/sps-quality.git
    

    Alternatively, you can download the repository as a ZIP file and extract it.

  2. Install Anaconda by following the instructions from the official Anaconda website:
    https://www.anaconda.com/products/individual

  3. Open Anaconda Prompt (Windows) or Terminal (macOS/Linux). Create and activate a virtual environment.

conda create --name sps python=3.11

conda activate sps
  1. Install the required packages:

    conda install -c conda-forge "numpy>=1.24.3" "matplotlib>=3.6.2" "pandas>=1.4.4" "lmfit>=1.2.1" "numdifftools>=0.9.41" "seaborn>=0.12.2"
    
  2. Navigate to the repository's directory:

    cd sps-quality
    

Usage

The repository provides several Python scripts for data analysis and visualisation. They can be accessed by navigating to the code subdirectory:

cd sps-quality/code

Here are the main scripts:

  • mc.py: This script loops through select experimental interferometry datasets stored in the data directory, fits their histograms, bootstraps new data samples from these best fits, fits histograms of the bootstrapped samples, and compiles statistics for the fit parameters, including SPS quality. The statistics are saved to .pkl files in appropriate saves sub-directories. Sample fits are also plotted and saved in appropriate results sub-directories.
    To run this script, execute the following command:

    python mc.py
    

    Note that pre-existing .pkl files will force mc.py to skip over data augmentation for the settings they represent, so delete them in the appropriate saves subdirectories if fresh data augmentation and sample-fit plots are desired.

  • plot_paper.py: This script generates plots based on the fit-parameter statistics obtained from the mc.py script, saving them in the top level of the results directory.
    To run this script, execute the following command:

    python plot_paper.py
    

If you are interested in regenerating ML results, examine ml_basic.py, ml_synth.py and ml_adapt.py.

If you are interested in plotting ML results, examine analysis_basic.py, analysis_synth.py and analysis_adapt.py

Data

The data\InGaAs-GaAs QDs\FI-SEQUR project demonstrator sample directory contains the experimental data specific to the paper generated by interferometry measurements of an intended SPS. Their format is described in the paper. These files serve as input for the mc.py script, which augments them with a data-generative procedure, fits their histograms to derive a metric for SPS quality, and compiles their uncertainty statistics.

If you are interested in viewing experimental and synthetic data generated for ML investigation (by gen_ml_data.py and gen_ml_data_mc.py), examine the data\ml directory. Ensure you unzip ml.zip directly into the data\ml directory.

Saves

The saves\InGaAs-GaAs QDs\FI-SEQUR project demonstrator sample directory contains .pkl files storing the uncertainty statistics generated by the mc.py script. These files serve as input for the plot_paper.py script, which visualises aggregate results.

Results

The results directory contains plots of aggregate results generated by the plot_paper.py script. These are produced for the paper. The saves\InGaAs-GaAs QDs\FI-SEQUR project demonstrator sample directory also contains sample histogram plots generated by the mc.py script.

If you are interested in viewing raw results generated by ML investigation, examine the results\ml directory. Ensure you unzip ml.zip directly into the results\ml directory.

License

This repository is licensed under the MIT License. For more information, refer to the LICENSE file.

Contact

For any questions, issues, or collaborations, please contact:

About

A project investigating quality-estimation methods and associated uncertainties for single-photon sources (i.e. quantum dots).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages