Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce schema for Quantum Volume jobs #67

Merged
merged 4 commits into from
Dec 10, 2024
Merged

Introduce schema for Quantum Volume jobs #67

merged 4 commits into from
Dec 10, 2024

Conversation

cosenal
Copy link
Contributor

@cosenal cosenal commented Dec 9, 2024

Description

A schema for defining the parameters of a Quantum Volume job is introduced here, along with tooling for loading and validating job input files that instantiate said schema.

I tried to keep this PR the less distruptive as possible, but there are other changes that are due in follow-up PRs:

  1. create dataclasses for collecting specific benchmark parameters
  2. decoupling dispatching from qv Generalize dispatch_bench_job function #65

Issue ticket number and link

Fixes #61

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Unit tests have been added for the schema validator utilities.
It was also smoke tested with the following command:

python metriq_gym/dispatch_qv.py job.json --backend qasm_simulator --provider ibmq

with job.json being a file created by the user.

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules (or not applicable)

qiskit = "^1.2.4"

metriq-client = { git = "https://github.com/unitaryfund/metriq-client.git", branch = "master" }
jsonschema = "^4.23.0"
Copy link
Contributor Author

@cosenal cosenal Dec 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't mind me sorting the dependencies alphabetically here.
The only addition is jsonschema

metriq_gym/schemas/quantum_volume.schema.json Show resolved Hide resolved
metriq_gym/schemas/quantum_volume.schema.json Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
metriq_gym/dispatch_qv.py Show resolved Hide resolved
metriq_gym/dispatch_qv.py Outdated Show resolved Hide resolved
metriq_gym/schema_validator.py Show resolved Hide resolved
metriq_gym/cli.py Show resolved Hide resolved
@cosenal cosenal requested review from vprusso and removed request for WrathfulSpatula December 10, 2024 12:43
@cosenal
Copy link
Contributor Author

cosenal commented Dec 10, 2024

@vprusso comments addressed. PTAL

Copy link
Contributor

@vprusso vprusso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM!

@cosenal cosenal merged commit 6752e29 into main Dec 10, 2024
@cosenal cosenal deleted the qv-schema branch December 10, 2024 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for schema-based approach for benchmark submission and specification
2 participants