Skip to content

di-unipi-socc/TheQuantumBroker-experiments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quantum Broker Experiments

This repository contains experiments using the Quantum Broker tool (qb.py) for benchmarking quantum circuit executions and exploring solver strategies. It is designed for researchers and students interested in quantum computing, optimization, and hybrid solver workflows.

Main Experiment Files

  • Baseline Experiments: main_baseline.py

    • Runs baseline quantum circuit executions on simulated backends.
    • Outputs results to results_baseline/.
  • Main Experiments: main.py

    • Launches experiments comparing linear and nonlinear optimization strategies.
    • Outputs results to results_qb/.
  • Nonlinear Solver Experiments: main_nonlinear.py

    • Explores nonlinear solver configurations across circuit groups.
    • Outputs results to results_nonlinear_vm2/.

Results Analysis and Plotting

  • Two Jupyter notebooks are provided for analyzing and plotting the results:
    • analyze.ipynb: Analysis and visualization of baseline and main experiment results.
    • analyze_nonlinear.ipynb: Analysis and visualization of nonlinear solver experiment results.

Setup Instructions

  1. Clone the repository:

    git clone https://github.com/yourusername/quantum-broker-experiments.git
    cd quantum-broker-experiments
  2. Install dependencies:

    pip install numpy scipy sympy pulp qiskit tqdm qbraid jupyter
  3. Configure settings:

    • Edit config.ini to adjust providers, backends, circuit files, optimizer type, and result folder.

Usage Examples

  • Run baseline experiments:

    python main_baseline.py
  • Run main experiments:

    python main.py
  • Run nonlinear solver experiments (specify circuit group folder of circuits_nonlinear/):

    python main_nonlinear.py 1
  • Analyze and plot results:

    jupyter notebook analyze.ipynb
    jupyter notebook analyze_nonlinear.ipynb

Results

  • Baseline results: results_baseline/
  • Main experiment results: results_qb/
  • Nonlinear solver results: results_nonlinear_vm1/

Each output file is a JSON containing:

  • Algorithm, circuit size, scenario values
  • Total cost, max execution time, minimum fidelity
  • Dispatch information

Workflow Diagram

flowchart TD
    A[Start] --> B[Choose experiment type]
    B --> C[Quantum Broker vs baselines]
    B --> D[Non linear solver parameter sweep] 
    C --> E[Run main_baseline.py for baseline]
    C --> F[Run main.py for main experiments]
    D --> G[Run main_nonlinear.py for nonlinear solver]
    E --> H[Results in results_baseline/]
    F --> I[Results in results_qb/]
    G --> J[Results in results_nonlinear_vm1/]
    H --> K[Analyze with analyze.ipynb]
    I --> K
    J --> M[Analyze with analyze_nonlinear.ipynb]
Loading

License

This project is licensed under the AGPL-3.0 License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •