# RQM Phase Aware Rewrite

> RQM Phase Aware Rewrite is a paid API for AI agents from jobs.rqmtechnologies.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Rewrites a quantum gate operation into an equivalent form using a specified target gate, under given phase-equivalence constraints (exact or global-phase-ignoring).

## Facts

- Endpoint: POST https://jobs.rqmtechnologies.com/x402/buyer-jobs/quantum.phase-aware-rewrite.v1
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/rqm-phase-aware-rewrite-9841e56c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LiZBGf_tPZhivOSHj27Y6

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 rqm-phase-aware-rewrite-9841e56c -d '<json body>'
```

Example prompt: Rewrite an RZ gate on qubit 0 with angle 1.5708 radians as an S gate, treating global phase as ignorable — I need the phase-equivalent circuit back.

## When to prefer this

Use this endpoint when you need a provably phase-equivalent gate rewrite within a bounded, declared phase context (exact or global-phase-ignoring) for a supported gate set, and need a typed, validated work product back. Prefer this over generic circuit optimizers when phase correctness is critical and you need strict equivalence guarantees. Do not use for arbitrary circuit rewrites, multi-gate sequences, or when phase assumptions are undeclared.

## Known failure modes

- Input gate is not in the supported gate set (x, y, z, h, s, sdg, t, tdg, rx, ry, rz, cx, cz) — returns validation error
- Target gate is not in the allowed set (rz, s, sdg, t, tdg) — returns schema validation error
- No phase-equivalent rewrite exists for the requested combination — returns unsupported rewrite error
- angle_radians out of range [-2π, 2π] — returns validation error
- Undeclared or ambiguous phase assumptions provided — rejected per policy
- Payment not provided or insufficient (x402 protocol) — returns 402 Payment Required
- idempotency_key format invalid — returns schema error

## How this service works

Phase Aware Rewrite: Rewrite this supported circuit under the supplied phase-equivalence and target constraints. Use when: Use when a bounded request matches rqm.studio.phase-aware-rewrite-request.v1 and the caller needs the decla... Returns: rewritten operation or original, candidate withholding, verification status. Boundaries: Deterministic bounded local software evidence only; no QPU, provider, physical, formal-proof, certificati...

## Output

A typed work product containing the rewritten gate sequence that is phase-equivalent to the input operation under the specified phase context (exact or ignore_global_phase), expressed using the requested target gate (rz, s, sdg, t, or tdg).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "request": {
   "type": "object",
   "title": "PhaseRewriteRequest",
   "required": [
    "operation",
    "target_gate",
    "phase_context"
   ],
   "properties": {
    "circuit": {
     "type": "array",
     "items": {
      "type": "object",
      "title": "PhaseOperation",
      "required": [
       "gate",
       "targets"
      ],
      "properties": {
       "gate": {
        "enum": [
         "x",
         "y",
         "z",
         "h",
         "s",
         "sdg",
         "t",
         "tdg",
         "rx",
         "ry",
         "rz",
         "cx",
         "cz"
        ],
        "type": "string",
        "title": "Gate"
       },
       "targets": {
        "type": "array",
        "items": {
         "type": "integer"
        },
        "title": "Targets",
        "maxItems": 2,
        "minItems": 1
       },
       "angle_radians": {
        "type": "number",
        "title": "Angle Radians",
        "default": 0,
        "maximum": 6.283185307179586,
        "minimum": -6.283185307179586
       }
      },
      "additionalProperties": false
     },
     "title": "Circuit",
     "maxItems": 4096
    },
    "operation": {
     "type": "object",
     "title": "PhaseOperation",
     "required": [
      "gate",
      "targets"
     ],
     "properties": {
      "gate": {
       "enum": [
        "x",
        "y",
        "z",
        "h",
        "s",
        "sdg",
        "t",
        "tdg",
        "rx",
        "ry",
        "rz",
        "cx",
        "cz"
       ],
       "type": "string",
       "title": "Gate"
      },
      "targets": {
       "type": "array",
       "items": {
        "type": "integer"
       },
       "title": "Targets",
       "maxItems": 2,
       "minItems": 1
      },
      "angle_radians": {
       "type": "number",
       "title": "Angle Radians",
       "default": 0,
       "maximum": 6.283185307179586,
       "minimum": -6.283185307179586
      }
     },
     "additionalProperties": false
    },
    "target_gate": {
     "enum": [
      "rz",
      "s",
      "sdg",
      "t",
      "tdg"
     ],
     "type": "string",
     "title": "Target Gate"
    },
    "phase_context": {
     "enum": [
      "exact",
      "ignore_global_phase"
     ],
     "type": "string",
     "title": "Phase Context"
    },
    "require_same_targets": {
     "type": "boolean",
     "const": true,
     "title": "Require Same Targets",
     "default": true
    }
   },
   "additionalPropert
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/rqm-phase-aware-rewrite-9841e56c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from jobs.rqmtechnologies.com](https://www.zero.xyz/host/jobs.rqmtechnologies.com/llms.txt)
