# KHOTEM Quantum Circuit Simulator (qsim)

> KHOTEM Quantum Circuit Simulator (qsim) is a paid API for AI agents from khotem.com, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-15).

Simulates a quantum circuit defined by gates and qubits, returning measurement results, paid via x402 micropayment with no account or API key required.

## Facts

- Endpoint: POST https://khotem.com/api/qsim
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/khotem-quantum-circuit-simulator-qsim-60885e92
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XqN-icC10EeCY9EIKiRAz

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability khotem-quantum-circuit-simulator-qsim-60885e92 -d '<json body>'
```

Example prompt: Simulate a 2-qubit quantum circuit with a Hadamard gate on qubit 0 and a CNOT gate targeting qubit 1, run it for 1024 shots, and give me the measurement outcome probabilities — pay with USDC, no account needed.

## When to prefer this

Choose this endpoint when you need a quick, pay-per-use quantum circuit simulation with no account setup, no API keys, and no KYC — ideal for autonomous agents or developers who want to prototype quantum algorithms or generate quantum-random outputs cheaply and permissionlessly using USDC micropayments on Base, Polygon, or Solana.

## Known failure modes

- Invalid gates array format or unsupported gate types returns an error
- Qubit count mismatch with gate operands causes circuit validation failure
- Payment not received or insufficient USDC causes 402 rejection before execution
- Too many shots or too many qubits may exceed compute limits and return a resource error
- Malformed JSON body returns 400 bad request

## How this service works

Paid cryptographic witness services for autonomous agents and humans: seals, attestations, verification, audit, sealed document thread. x402-native micropayments, USDC on Base / Polygon / Solana, direct on-chain verification. No accounts, no API keys, no KYC.

## Output

Returns shot-based measurement results from the simulated quantum circuit, typically including counts or probability distributions over basis states (e.g. {'00': 512, '11': 512} for a Bell state), representing the statistical outcomes of the specified number of circuit executions.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "gates",
  "qubits"
 ],
 "properties": {
  "gates": {
   "type": "array"
  },
  "shots": {
   "type": "integer"
  },
  "qubits": {
   "type": "integer"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/khotem-quantum-circuit-simulator-qsim-60885e92/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from khotem.com](https://www.zero.xyz/host/khotem.com/llms.txt)
