Skip to content

qubithub.toml Reference

The qubithub.toml file is the single source of truth for every circuit on QubitHub. You write the TOML; the platform generates metadata.json from it. Never hand-author metadata.json.

TOML is a configuration format designed for humans — like YAML but without implicit typing gotchas, and like JSON but with comments and less boilerplate. It’s the same format used by Rust (Cargo.toml), Python (pyproject.toml), and Julia (Project.toml).

QubitHub manifests follow a progressive model — start simple and add sections as needed.

Every circuit needs at least this:

[project]
name = "bell-state"
title = "Bell State"
type = "circuit"
framework = "qiskit"
entry_point = "circuit.py"
qubits = 2

Adds description, tags, gates, execution config, and educational metadata:

schema_version = "1.0.0"
[project]
name = "vqe-h2"
title = "VQE for H2 Ground State"
type = "circuit"
framework = "pennylane"
framework_version = "0.38.0"
entry_point = "circuits/main_circuit.py"
qubits = 4
depth = 24
gates = ["H", "CX", "RY", "RZ"]
category = "chemistry"
difficulty = "intermediate"
tags = ["vqe", "chemistry", "variational"]
[execution]
default_backend = "default.qubit"
default_shots = 4096
timeout_seconds = 60
[educational]
level = "intermediate"
concepts = ["variational-algorithms", "hamiltonian-simulation"]
prerequisites = ["bell-state", "single-qubit-gates"]
learning_outcomes = [
"Understand the VQE hybrid classical-quantum loop",
"Implement a hardware-efficient ansatz",
]
estimated_time = "45 minutes"
next_circuits = ["vqe-lih", "qaoa-maxcut"]
[expected_output]
dominant_states = ["0011", "1100"]
probability_range = [0.35, 0.65]

Adds parameters, hardware requirements, reproducibility, multi-framework implementations, and references:

schema_version = "1.0.0"
[project]
name = "qaoa-maxcut"
title = "QAOA for MaxCut"
type = "circuit"
framework = "qiskit"
framework_version = "1.3.0"
entry_point = "circuits/main_circuit.py"
qubits = 6
depth = 42
gates = ["H", "CX", "RZ", "RX"]
category = "optimization"
difficulty = "advanced"
tags = ["qaoa", "optimization", "maxcut", "combinatorial"]
[execution]
default_backend = "aer_simulator"
default_shots = 8192
timeout_seconds = 120
[hardware]
connectivity = "heavy-hex"
min_qubits = 6
required_gates = ["h", "cx", "rz", "rx"]
backend_compatibility = ["aer_simulator", "ibm_brisbane", "ibm_kyoto"]
noise_model = "ibm_brisbane_2026q1"
[parameters]
gamma = { default = 0.785, range_min = 0.0, range_max = 3.14159, description = "Problem unitary angle" }
beta = { default = 0.393, range_min = 0.0, range_max = 3.14159, description = "Mixer unitary angle" }
[reproducibility]
backend_used = "aer_simulator"
shots_used = 8192
seed = 42
transpilation_level = 3
framework_version_tested = "1.3.0"
last_verified = "2026-03-01"
[implementations]
qiskit = "circuits/qiskit/main_circuit.py"
pennylane = "circuits/pennylane/main_circuit.py"
[educational]
level = "advanced"
concepts = ["qaoa", "combinatorial-optimization", "mixer-hamiltonian"]
prerequisites = ["vqe-h2", "grover-search"]
learning_outcomes = [
"Implement QAOA for graph optimization problems",
"Understand the relationship between circuit depth and approximation quality",
]
estimated_time = "90 minutes"
next_circuits = ["qaoa-tsp", "qaoa-portfolio"]
[expected_output]
dominant_states = ["101010", "010101"]
probability_range = [0.25, 0.45]
[[references.papers]]
title = "A Quantum Approximate Optimization Algorithm"
authors = ["Farhi, E.", "Goldstone, J.", "Gutmann, S."]
year = 2014
arxiv = "1411.4028"
[files]
readme = "README.md"
source = "circuits/qiskit/main_circuit.py"
tests = "tests/"
results = "results/"

FieldTypeRequiredDefaultDescription
schema_versionstringno"1.0.0"Manifest schema version (semver)
FieldTypeRequiredDefaultDescription
namestringyesURL slug: lowercase, hyphens, 1–100 chars
titlestringyesHuman-readable display name
typestringyes"circuit", "dataset", "space", or "benchmark"
frameworkstringyes"qiskit", "pennylane", "cirq", "braket", or "openqasm3"
entry_pointstringyesPath to main file, relative to repo root
qubitsintegeryesNumber of qubits used
descriptionstringnofrom READMEShort description (1–2 sentences)
framework_versionstringnoFramework version the circuit targets
depthintegernoCircuit depth
gatesstring[]no[]Gate names used (e.g., ["H", "CX", "RY"])
categorystringnoPrimary category (see below)
difficultystringno"beginner""beginner", "intermediate", or "advanced"
tagsstring[]no[]Searchable tags
is_publicbooleannotruePublic visibility

Controls how qubithub execute runs the circuit.

FieldTypeDefaultDescription
default_backendstringframework-dependentQiskit: "aer_simulator", PennyLane: "default.qubit", Cirq: "cirq.Simulator"
default_shotsinteger1024Measurement shots (1–100,000)
timeout_secondsinteger30Max execution time (1–300)

Quantum hardware requirements.

FieldTypeDefaultDescription
connectivitystring"any"Topology: "any", "linear", "grid", "heavy-hex", "sycamore", "all-to-all"
min_qubitsintegerproject.qubitsMinimum hardware qubits
required_gatesstring[][]Required gate set (lowercase)
backend_compatibilitystring[]["aer_simulator"]Compatible backends
noise_modelstringNoise model identifier

For variational circuits. Each parameter is an inline table:

[parameters]
theta = { default = 0.785, range_min = 0.0, range_max = 6.283, description = "Rotation angle" }

Fields: default (number), range_min (number), range_max (number, optional), description (string).

Execution context for reproducing results.

FieldTypeDescription
backend_usedstringBackend used for reference results
shots_usedintegerShot count for reference results
seedintegerRandom seed for reproducible simulation
transpilation_levelintegerQiskit transpilation level (0–3)
framework_version_testedstringFramework version used
last_verifiedstringISO date of last successful run

Multi-framework support. Maps framework name to entry point:

[implementations]
qiskit = "circuits/qiskit/main_circuit.py"
pennylane = "circuits/pennylane/main_circuit.py"
FieldTypeDescription
levelstring"beginner", "intermediate", or "advanced"
conceptsstring[]Quantum concepts demonstrated
prerequisitesstring[]Circuit slugs to complete first
learning_outcomesstring[]What the learner will understand
estimated_timestringStudy time estimate (e.g., "45 minutes")
next_circuitsstring[]Suggested follow-up circuits

Reference measurement results for verification.

FieldTypeDescription
dominant_statesstring[]Most probable measurement outcomes
probability_rangenumber[]Expected probability range [min, max]

Academic citations using TOML array-of-tables:

[[references.papers]]
title = "Paper Title"
authors = ["Author, A."]
year = 2014
arxiv = "1411.4028"
doi = "10.1038/..."
[[references.textbooks]]
title = "Textbook Title"
authors = ["Author, A."]
section = "§4.7"

Path overrides for non-standard file locations:

[files]
readme = "README.md"
source = "circuits/main_circuit.py"
params = "params.json"
tests = "tests/"
results = "results/"

Valid values for project.category:

CategoryDescription
entanglementBell states, GHZ, W states
algorithmGrover’s, Shor’s, Deutsch-Jozsa
optimizationQAOA, VQE, variational methods
chemistryMolecular simulation
machine_learningQuantum kernels, QNNs, classifiers
error_correctionSurface codes, repetition codes
communicationTeleportation, superdense coding
cryptographyQKD, BB84, random number generation
simulationHamiltonian simulation, trotterization
transformQFT, phase estimation
utilityHelper circuits, testing primitives
ansatzVariational circuit templates
researchPaper reproductions

  1. project.name must be lowercase, hyphens only, 1–100 characters
  2. project.type must be a recognized type
  3. project.framework must be one of: qiskit, pennylane, cirq, braket, openqasm3
  4. project.entry_point must reference an existing file in the repository
  5. project.qubits must be a positive integer
  6. execution.default_shots must be 1–100,000
  7. execution.timeout_seconds must be 1–300
  8. project.difficulty must be one of: beginner, intermediate, advanced
  9. schema_version, if present, must be a supported version (currently "1.0.0")
  10. hardware.connectivity recommended values: any, linear, grid, heavy-hex, sycamore, all-to-all — unrecognized values produce a warning but are not rejected

metadata.json is auto-generated by the platform from your qubithub.toml. The precedence chain:

  1. qubithub.toml (source of truth — what you author)
  2. Stored metadata.json (generated artifact — what API consumers read)
  3. Database synthesis (fallback for legacy circuits without a manifest)

Never hand-author metadata.json. It will be overwritten on the next push.


Terminal window
# Scaffold a new circuit with a template manifest
qubithub circuits init my-circuit --framework qiskit
# Push validates the manifest before upload
qubithub circuits push
# View the generated metadata
qubithub circuits metadata -f json