qasmguard
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
Qasmguard
Qasmguard lints and profiles OpenQASM 2.0/3.0 circuits, runs exact dense statevector (<= 12 qubits) and bit-packed Clifford stabilizer (<= 256 qubits) simulations, groups VQE/QAOA Pauli Hamiltonians, verifies circuit equivalence and qubit-endianness reversals, routes SWAPs onto hardware coupling maps, and estimates fault-tolerant surface-code resources. Version 0.1.0; changes are listed in CHANGELOG.md.
Quick Start
Try Qasmguard on Apify. Run the prefilled 2-qubit OpenQASM 2.0 Bell circuit lint sample, then open the default dataset. The single row reports data.valid as true, data.qubits as 2, data.gateCount as 2, and data.summary.errors as 0. This example uses zero paid Actor events.
Simulate a 2-qubit Bell circuit and evaluate ZZ and XX Pauli expectations (seed: 42, shots: 1024). This free hosted call needs only curl.
curl -sS https://qasmguard-mcp.raymond-deoliveira.workers.dev/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"q_simulate","arguments":{"qasm":"OPENQASM 2.0;\ninclude \"qelib1.inc\";\nqreg q[2];\ncreg c[2];\nh q[0];\ncx q[0],q[1];\nmeasure q -> c;\n","shots":1024,"seed":42,"observables":["ZZ","XX"]}}}'Under result.structuredContent, q_simulate returns backend: "statevector", counts: {"11": 530, "00": 494}, measurementOrder: "q0_lsb", and expectation values ZZ: 1 (1.0000000000000002) and XX: 1 (1.0000000000000002). To keep the example handy, star Qasmguard on GitHub.
Group an H2 STO-3G Hamiltonian with Pauli coloring
Send the 5-term 2-qubit H2 STO-3G Hamiltonian (IZ, ZI, ZZ, XX, YY) to q_pauli_group with General Commuting (gc) grouping:
curl -fsS --max-time 15 https://qasmguard-mcp.raymond-deoliveira.workers.dev/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"q_pauli_group","arguments":{"terms":[{"pauli":"IZ","coeff":0.39793742484318045},{"pauli":"ZI","coeff":-0.39793742484318045},{"pauli":"ZZ","coeff":-0.01128010425623538},{"pauli":"XX","coeff":0.09046559989211578},{"pauli":"YY","coeff":0.09046559989211578}],"strategy":"gc","totalShots":1000}}}'IZ, ZI, ZZ commute qubitwise and XX, YY commute together, reducing 5 separate measurement circuits to 2 commuting groups with Neyman variance-optimal shot allocation.
What a two-cent FTQC estimate returns
For a 100-logical-qubit circuit with 1,000,000 T-gates (tDepth: 10000, measurementCount: 100) targeting 1% total algorithm failure (targetTotalError: 0.01) on willow-superconducting (Lambda = 2.14, p = 0.0014, 15-to-1-distillation), q_ftqc_estimate (fixtures/ftqc_willow_100q.json) computes:
Calculated result | Value |
Surface-code distance ( |
|
Total physical qubits ( |
|
Magic-state factories ( |
|
Estimated runtime ( |
|
Achieved total error ( |
|
To reproduce the calculation locally via CLI (qasmguard ftqc --input fixtures/ftqc_willow_100q.json --json) or via metered MCP q_ftqc_estimate ($0.02/call via x402 or Polar key once provisioned), pass these exact JSON arguments:
{"logicalQubits":100,"tCount":1000000,"tDepth":10000,"measurementCount":100,"hardwareProfile":"willow-superconducting","factoryType":"15-to-1-distillation"}Related MCP server: genpark-quantum-qubit-state-vector-simulator-skill
What It Does / What It Does Not Do
Surface / Tool | Tier / Price | What It Does |
| Free ( | OpenQASM 2.0/3.0 lexer, AST parser, and 15 static preflight checks (register bounds, duplicate qubits, gate arity, expression div-by-zero, recursive gates, |
| Free ( | DAG critical-path depth, gate histogram, Clifford+T counts and T-depth, and NISQ survival fidelity for |
| Free ( | Exact |
| Free ( | Symplectic Pauli parser ( |
| Metered ( | Exact unitary ( |
| Metered ( | Deterministic bidirectional heuristic SWAP router for |
| Metered ( | Willow/Qualtran ( |
HTTP | MCP | Cloudflare Worker at |
Apify Actor & Standby MCP | PPE / Standby | Single ( |
What It Does Not Do:
No physical QPU hardware drivers, pulse-level scheduling, or paid IBM/Braket/Google cloud quantum credentials (
$0Day 1 stateless compute only).No remote QASM URL fetching (inline bounded payloads only;
<= 262,144bytes per payload).Statevector simulation is strictly bounded to
<= 12qubits (4,096amplitudes); Clifford stabilizer simulation is bounded to<= 256qubits.
Install & Uninstall
Use the hosted endpoint with curl or any MCP client. The public GitHub repository contains documentation, skill metadata, and packaging manifests. The local CLI and tests require a source checkout.
The source checkout requires Node.js >= 22.18.0 for native TypeScript type stripping (0 runtime and 0 dev npm dependencies, 361,765 bytes / 353.3 KiB source across 42 TypeScript files and 7,692 lines in src/, 432 KB src/ on disk, 1,080 KB project total via du -sk):
node --test tests/*.test.ts
node --test e2e/*.test.tsMeasured runs on node v25.9.0 (macOS):
Unit & integration (
node --test tests/*.test.ts):160tests across45suites in23test files (160pass,0fail,0skipped).End-to-end (
node --test e2e/*.test.ts):141tests across17test files (141pass,0fail,0skipped).Total:
301tests (301pass,0fail).Representative CLI latency (median of
5runs after1warm-up onnode v25.9.0):166.3 ms(simulate --qasm-file fixtures/bell_qasm2.qasm --shots 1024 --seed 42 --observables ZZ,XX --json, range156.6–168.0 ms),162.9 ms(ftqc --input fixtures/ftqc_willow_100q.json --json, range153.7–164.3 ms).
Install the agent skill reference from GitHub:
npx skills add raydeoliveira/qasmguardConnect Claude Code to the hosted MCP endpoint (free tools work without credentials; pass -H "X-Polar-License-Key: ..." for metered tools):
claude mcp add --transport http qasmguard https://qasmguard-mcp.raymond-deoliveira.workers.dev/mcpFor clients using mcpServers JSON:
{
"mcpServers": {
"qasmguard": {
"url": "https://qasmguard-mcp.raymond-deoliveira.workers.dev/mcp"
}
}
}Hosted & discovery status:
Live Cloudflare Worker:
https://qasmguard-mcp.raymond-deoliveira.workers.dev(MCP endpointPOST /mcp, healthGET/HEAD /health, agent summaryGET/HEAD /llms.txt, discovery cardGET/HEAD /.well-known/mcp/server-card.json; free tools work live today, and metered tools fail closed with HTTP402).Live Official MCP Registry: io.github.raydeoliveira/qasmguard (v0.1.0).
Pending dashboard provisioning: Apify Store Actor (
https://apify.com/raydeoliveira/qasmguard-mcp), Glama Connector (https://glama.ai/mcp/connectors/io.github.raydeoliveira/qasmguard), Polar Pro checkout (https://buy.polar.sh/qasmguard), and x402 payout address (X402_PAY_TO_ADDRESS, so live402challenges currently emitaccepts: []until dashboard secrets are provisioned).Apify Actor / Standby container:
FROM node:22-alpine(0npm install, non-rootUSER node, port4321).
To uninstall locally, remove the directory (rm -rf qasmguard).
CLI and MCP Examples
1. Local CLI (source checkout)
Inspect capabilities and run Bell-state simulation or reference fixtures under fixtures/ with --json output:
node src/adapters/cli.ts --describe --json
printf '%s\n' '{"qasm":"OPENQASM 2.0;\ninclude \"qelib1.inc\";\nqreg q[2];\ncreg c[2];\nh q[0];\ncx q[0],q[1];\nmeasure q -> c;\n","shots":1024,"seed":42,"observables":["ZZ","XX"]}' | node src/adapters/cli.ts simulate --json --input -
node src/adapters/cli.ts simulate --qasm-file fixtures/bell_qasm2.qasm --shots 1024 --seed 42 --observables ZZ,XX --json
node src/adapters/cli.ts route --qasm-file fixtures/bell_qasm2.qasm --preset willow-105 --json
node src/adapters/cli.ts pauli-group --input fixtures/h2_sto3g_pauli.json --json
node src/adapters/cli.ts ftqc --input fixtures/ftqc_willow_100q.json --jsonReference fixtures included in fixtures/:
fixtures/bell_qasm2.qasm— 2-qubit OpenQASM 2.0 Bell state (h q[0]; cx q[0],q[1]; measure q -> c;).fixtures/h2_sto3g_pauli.json— 5-term H2 STO-3G Pauli Hamiltonian (strategy: "gc",totalShots: 1000, reduces 5 terms to 2 commuting groups).fixtures/ftqc_willow_100q.json— 100-logical-qubit,1,000,000-T-gate Willow (15-to-1-distillation) FTQC benchmark (codeDistance: 53,totalPhysicalQubits: 104466710,factoryCount: 595,estimatedRuntimeSeconds: 0.58883).
2. HTTP 402 & stdio MCP Server
Dry-run or start the local HTTP 402 server or stdio MCP server:
node src/adapters/cli.ts serve-mcp --dry-run --json
API_KEYS_CSV="demo-key" node src/adapters/cli.ts serve-mcp --host 127.0.0.1 --port 0
node src/adapters/cli.ts serve-mcp --stdio3. Apify Actor & Standby MCP (source checkout)
Run offline Actor mode against APIFY_LOCAL_STORAGE_DIR (create INPUT.json first; without it the run exits 2 and writes ERR_INVALID_INPUT to OUTPUT.json):
mkdir -p storage/key_value_stores/default
printf '%s\n' '{"tool":"q_lint_qasm","arguments":{"qasm":"OPENQASM 2.0;\ninclude \"qelib1.inc\";\nqreg q[2];\ncreg c[2];\nh q[0];\ncx q[0],q[1];\nmeasure q -> c;\n"}}' > storage/key_value_stores/default/INPUT.json
APIFY_LOCAL_STORAGE_DIR=./storage node src/adapters/apify_main.ts
cat storage/key_value_stores/default/OUTPUT.jsonRun Standby MCP mode (PORT=0 for ephemeral bind):
APIFY_META_ORIGIN=STANDBY ACTOR_WEB_SERVER_PORT=0 node src/adapters/apify_main.tsSafety & Compute Bounds
Stateless
$0compute: Zero OS hardware mutation, zero physical QPU driver installation, and zero remote file fetching.Unified
q0_lsbconvention: Bitstrings (bitstr[n - 1 - k]) and Pauli observables (obs[n - 1 - k]) consistently address qubitq[k].Fail-closed bounds: QASM payloads
<= 262,144bytes, statevector<= 12qubits, stabilizer<= 256qubits, shots<= 100,000, observables<= 64, Pauli terms<= 2,048, HTTP MCP body<= 262,144bytes, JSON-RPC batch1..64messages, and strict prototype-chain key rejection (__proto__,constructor,prototype).Fail-closed
402& deferred x402 settlement: Authorization runs before tool validation on metered calls; x402/settleexecutes only after the tool succeeds (QasmValidationErrornever settles or charges).Apify Pay-Per-Event: Results are pushed to the Dataset before charging; on
APIFY_IS_AT_HOME=1,chargeEvents: falseis ignored and runs stop before exceedingACTOR_MAX_TOTAL_CHARGE_USD.
Exit Codes
Code | Meaning |
| Success (including |
| Runtime error or |
| CLI usage error or validation error ( |
| I/O error or missing/unreadable |
| Domain limit exceeded ( |
| Internal error (or Apify PPE charge rejection / spending limit reached before any call succeeded) |
|
|
License & Support
Proprietary commercial software. Copyright (c) 2026 Raymond de Oliveira. All rights reserved. See LICENSE and SECURITY.md.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
A free quantum job service: OpenQASM 3 run, checked and signed, with no account or key.
Floor plans as code: compile, lint and repair ArchLang (.arch) floor plans to SVG, DXF and PDF.
Manage SysML2 projects; check, evaluate, verify, query, document and diagram models.
Scan code for quantum-vulnerable cryptography and get NIST post-quantum migration guidance.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables quantum systems analysis and simulation including quantum circuits, open quantum systems, quantum chemistry calculations, many-body physics, quantum machine learning, and quantum field theory computations.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables simulation of multi-qubit quantum circuits using complex state vectors, including unitary gates, entanglement, Born-rule measurement sampling, state fidelity, and probability distributions via MCP.7MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables users to simulate multi-qubit quantum circuits through an MCP interface, including unitary gates, entanglement, Born-rule measurement sampling, fidelity/probability calculations, and Grover amplitude amplification. Integrates with Claude Desktop, Cursor, and Windsurf via JSON-RPC stdio.MIT
- AlicenseNot gradedqualityBmaintenanceEnables users to simulate quantum circuits, evolve qubit state vectors, apply gates such as Hadamard and CNOT, perform Born-rule projective measurements with Monte Carlo shot histograms, and run Grover amplitude amplification through MCP-compatible clients.7MIT