Publish quantum circuits to QubitHub. Runs pre-publish validation, checks metadata completeness, and guides through the push workflow. Use when ready to share a circuit publicly or update an existing one.
You are helping a developer publish a quantum circuit to QubitHub. This skill runs a pre-publish validation checklist, flags issues, and guides through the push workflow.
/circuit-publish # Validate current directory and publish
/circuit-publish path/to/circuit # Validate specific circuit directory
qubithub.toml in the current directory./, ./circuits/, subdirectoriesqubithub.toml found. Run /qubithub-project to scaffold a new circuit first."Run all checks against the circuit directory. Read the actual files — don't guess from filenames.
| File | Required | Check |
|---|---|---|
qubithub.toml | Always | Exists and parses as valid TOML |
circuit.py (or entry_point) | Always | Exists at the path specified in entry_point |
README.md | Always | Exists, non-empty, >10 lines |
Fail if any required file is missing. Warn if README is under 20 lines (probably incomplete).
Parse qubithub.toml and validate against docs/circuits/TOML_SPEC.md:
Required fields (must exist):
project.name — slug format (lowercase, hyphens, 1-100 chars)project.title — non-empty stringproject.type — must be "circuit" (or "dataset", "space", "benchmark")project.framework — one of: qiskit, pennylane, cirq, braket, openqasm3project.entry_point — file must exist at this pathproject.qubits — positive integerRecommended fields (warn if missing):
schema_version — should be "1.0.0"project.category — valid category from the specproject.difficulty — beginner, intermediate, or advancedproject.tags — 1-5 tagsproject.description — 1-2 sentences (if missing, platform extracts from README)[execution] section — default_backend, default_shots[educational] section — level, concepts, learning_outcomesValidation rules:
execution.default_shots between 1 and 100,000execution.timeout_seconds between 1 and 300hardware.connectivity is a recognized value (warn on unknown, don't fail)Read the entry point file and verify:
create_circuit() exists — must define this functionqml.counts(), qml.expval()), not circuit objects — this is correct for PennyLane.category is ansatz or tags include variationalcreate_circuit()create_circuit() builds, it doesn't execute. PennyLane exception: QNodes execute on call by design — this check does not apply to PennyLane circuits.Cross-check TOML metadata against actual circuit code:
project.qubits matches the circuit's actual qubit countproject.gates lists all gate types used (warn if missing gates)project.framework matches the import in the entry point fileRead README.md and check for:
TODO, FIXME, Lorem ipsum, or template markersFlag these specific issues:
pennylane but code imports qiskitentry_point — TOML points to a file that doesn't existcircuit.qasm() instead of qiskit.qasm2.dumps()metadata.json hand-authored — this file should NOT be in the circuit directory (platform generates it).qubithub.yaml present — deprecated format, should be removed## Pre-Publish Validation — {circuit-name}
| Check | Status | Details |
|-------|--------|---------|
| Required files | Pass/Fail | {details} |
| TOML validation | Pass/Warn/Fail | {N} required OK, {M} recommended missing |
| Code quality | Pass/Warn | {details} |
| Qubit/gate consistency | Pass/Warn | {details} |
| README quality | Pass/Warn | {details} |
| Common mistakes | Pass/Warn | {details} |
### Issues Found
| # | Severity | Check | Issue | Fix |
|---|----------|-------|-------|-----|
| 1 | Fail | TOML | Missing `project.framework` | Add `framework = "qiskit"` |
| 2 | Warn | README | Under 20 lines | Expand algorithm explanation |
### Verdict: READY / NEEDS FIXES / BLOCKED
**READY**: All checks pass. Safe to publish.
**NEEDS FIXES**: Warnings present — fix recommended but not blocking.
**BLOCKED**: Failures present — must fix before publishing.
If issues were found:
Once validation passes:
## Ready to Publish
### Option A: CLI Push (recommended)
\```bash
qubithub push
\```
### Option B: Web Upload
1. Go to qubithub.co/new
2. Upload the circuit files
3. The platform validates your `qubithub.toml` on upload
### After Publishing
- Verify at: `https://qubithub.co/{org}/{circuit-name}`
- Test execution: `qubithub execute {org}/{circuit-name}`
- Run `/circuit-review` for a quality audit
qubithub push creates a new versionmetadata.json — the platform generates it from qubithub.toml.qubithub.yaml — deprecated formatqubithub push supports flat files only. Warn about nested directory structures.