Quickstart¶
Metriq-Gym provides a command-line interface for running quantum benchmark jobs on simulators and hardware. This guide focuses on the essentials so you can submit your first job quickly.
Installation¶
Install the package from PyPI:
Running Your First Benchmark¶
1. Download an Example Configuration¶
Download an example configuration file for the WIT (Wormhole-inspired teleportation) benchmark:
curl -O https://raw.githubusercontent.com/unitaryfoundation/metriq-gym/main/metriq_gym/schemas/examples/wit.example.json
Note
Example configurations for all benchmarks are available in the metriq_gym/schemas/examples/ directory.
2. Dispatch the Benchmark¶
Run the benchmark on the local Aer simulator:
This command dispatches the job and returns a job ID that you'll use to check results.
3. Poll for Results¶
Check the status and retrieve results:
If the job completed, metrics such as expectation values are reported in your terminal.
Tip
Use mgym job poll without arguments to choose from recent jobs interactively.
Configuration Files¶
Each benchmark is configured via JSON documents. The metriq_gym/schemas/examples/ directory contains ready-to-run templates for all supported benchmarks. Customize a copy to:
- Switch benchmarks (change
benchmark_name) - Adjust qubit counts or shots
- Supply provider-specific options
Example WIT configuration:
Running on Real Hardware¶
To run benchmarks on cloud quantum hardware:
- Set up provider credentials in a
.envfile (see Provider Configuration) - Specify the provider and device:
Next Steps¶
- End-to-End Tutorial - Complete walkthrough including uploading results
- CLI Reference - All available commands
- Provider Configuration - Setup guides for each provider
- Benchmarks - Available benchmarks and their configurations