Skip to main content

Benchmarking suite for Quantum Computers integration into HPC Systems

Project description

What

An utility to benchmark the quality of an HPC and Quantum Computers integration. The benchmark allows the definition of a set of users for which a set of configurable quantum applications will be randomly selected. Example of currently supported quantum applications: VQE, PyMatching, RB. Users can create custom applications and use them together with the core applications. QStone generates different portable files (.tar.gz), each supporting a different user and a different scheduler (currently supporting: slurm, lsf, bare_metal). During execution of the benchmark, QStone gathers information on each steps of the applications, allowing investigations on bottlenecks and/or resource constraints at the interface between Quantum and HPC. The benchmark under the following assumptions.

Why

Building an appropriate hardware/software infrastructure to support HPCQC requires loads of work. We believe we shoud use a data driven approach in which we measure, fix, measure again with every new version of Quantum Computers, software and HPC hardware.

Where

Currently supported platforms/architectures:

  • MacOS: M1/M2 (Sequoia)
  • Intel: x86 (Ubuntu)
  • PowerPC: Power9 (RedHat)

Tested on Python [3.9-3.12]

How

Installation

pip install QStone

To leverage MPI features, first install OpenMPI.

sudo apt install openmpi [On Ubuntu] sudo yum install openmpi [On Debian Systems] brew install openmpi [On Mac]

Followed by a full installation:

pip install QStone[mpi]

Execution

Run QStone using Command Line Interface

  • Run the generator command

    qstone generate -i conf.json [--atomic/-a] [--scheduler/-s "slurm"/"jsrun"/"bare_metal"]

    Generates tar.gz files that contains all the scripts to run scheduler for each user. Currently supported schedulers: [baremetal, altair/fnc, slurm/schedmd]. QStone expects an input configuration describing the users to want to generate jobs for as well as the description of the quantum computer you are generating jobs for. The optional --atomic flag forces the generation of single step jobs, instead of the default repartition in three jobs (pre, run, post). The -s flag allows selecting the output scheduler, default is bare_metal.

    With config.json:

{
  "environment": { 
     "project_name": "proj_name",
     "scheduling_mode" : "LOCK",
     "qpu" : {
        "mode" : "RANDOM"
     },
     "connectivity": {
     	"mode": "NO_LINK",
     	"qpu": {
           "ip_address": "0.0.0.0",
     	   "port": 55
        }
     },
     "timeouts" : {
         "http": 5,
         "lock": 4
     } 
  },
  "jobs": [
    {
      "type": "VQE",
      "qubits": [4, 6],
      "num_shots": [100, 200],
      "walltime" : 10,
      "nthreads" : 4
    },
    {
      "type": "RB",
      "qubits": [2],
      "num_shots": [100],
      "walltime" : 10,
      "nthreads" : 2
    },
    {
      "type": "QBC",
      "qubits": [4],
      "num_shots": [32],
      "walltime": 20,
      "nthreads" : 2
    }
  ],
  "users": [
    {
      "user": "user0",
      "weight": 1,
      "computations": {
        "VQE": 0.05,
        "RB": 0.94,
        "PyMatching": 0.01
      }
    }
  ]
}

For more information on the config.json format refer to the associated json schema. Among the other things, the config file allows setting different polling/querying/scheduling policies for handling shared access to the QPU. Only SLURM currently supports the high-performance (lowest-latency) "SCHEDULER" mode" please refer to SLURM for more information.

  • Alternatively call the generator in script:
from qstone.generators import generator

def main():
    generator.generate_suite(config="config.json",
        num_calls=100,output_folder=".",atomic=False, scheduler="bare_metal")

if __name__ == "__main__":
     main()
  • Run the run command to execute chosen scheduler/workload selecting an optional output folder

    qstone run -i scheduler.qstone.tar.gz [-o folder]

The optional -o allows selecting the output folder in which to run the benchmark instance.

  • Alternatively may untar on your machine of choice and run as the selected user.

    • Run the jobs by executing sh qstone_suite/qstone.sh

    • Run the profiling tool to extract metrics of interest.

  • Run the profile command providing the initial input configuration and output folder to run profiling tool on run information

    qstone profile --cfg conf.json --folder qstone_profile

  • Run the profile command providing the initial input configuration and multiple output folders (in case of multi-user run) to run profiling tool on run information

    qstone profile --cfg conf.json --folder qstone_profile --folder qstone_profile2

Supported backend connectivities

  • Local no-link runner
  • gRPC
  • Http
  • Rigetti

Examples

Contributing

Guidance on how to contribute and change logs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qstone-0.3.0.tar.gz (35.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qstone-0.3.0-py3-none-any.whl (47.5 kB view details)

Uploaded Python 3

File details

Details for the file qstone-0.3.0.tar.gz.

File metadata

  • Download URL: qstone-0.3.0.tar.gz
  • Upload date:
  • Size: 35.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for qstone-0.3.0.tar.gz
Algorithm Hash digest
SHA256 61e50cbcaa4db6d5e5c55fce1096903db49e713ffe80d773ec727c8947dde362
MD5 57bd0156be488754a1bbe959ad264f5b
BLAKE2b-256 a61cda930cec0239e5c375afba96833e010ed668bd1f594f1365475b4139a8dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for qstone-0.3.0.tar.gz:

Publisher: publish.yaml on riverlane/QStone

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qstone-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: qstone-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 47.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for qstone-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 abe39e52fa3761458fd77a595f0359c92e2d06df6958ae81b2ae5d2a324b1536
MD5 47e165e86d6d85d5c86206bf7871add2
BLAKE2b-256 313c7df67c700259a8f8725d9317dfa71bf58cc616de5dad0cf1c17c48a17711

See more details on using hashes here.

Provenance

The following attestation bundles were made for qstone-0.3.0-py3-none-any.whl:

Publisher: publish.yaml on riverlane/QStone

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page