82trust / 100

Circuit Optimize

by quantum.halowerk.com in AI models & inference

x402 APIPassing, checked 4 h ago

Cancels adjacent identical self-inverse gates on identical ordered targets and folds adjacent RX, RY or RZ rotations on identical targets. It preserves only these local identities; it does not commute gates, model hardware topology, synthesize arbitrary unitaries or prove global optimality.

POST https://quantum.halowerk.com/v1/circuit-optimize

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
101 ms typical, 101 ms slowest 5%
Last check
4 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://quantum.halowerk.com/v1/circuit-optimize" \
  -H "content-type: application/json" \
  -d '{"gates":[{"gate":"H","targets":[0]},{"gate":"H","targets":[0]},{"angle_rad":0.4,"gate":"RZ","targets":[1]},{"angle_rad":-0.1,"gate":"RZ","targets":[1]},{"gate":"CNOT","targets":[0,2]}],"qubit_count":3}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fquantum.halowerk.com%2Fv1%2Fcircuit-optimize
const res = await pay("https://quantum.halowerk.com/v1/circuit-optimize", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"gates":[{"gate":"H","targets":[0]},{"gate":"H","targets":[0]},{"angle_rad":0.4,"gate":"RZ","targets":[1]},{"angle_rad":-0.1,"gate":"RZ","targets":[1]},{"gate":"CNOT","targets":[0,2]}],"qubit_count":3}),
});
console.log(await res.json());

Example input

{
  "gates": [
    {
      "gate": "H",
      "targets": [
        0
      ]
    },
    {
      "gate": "H",
      "targets": [
        0
      ]
    },
    {
      "angle_rad": 0.4,
      "gate": "RZ",
      "targets": [
        1
      ]
    },
    {
      "angle_rad": -0.1,
      "gate": "RZ",
      "targets": [
        1
      ]
    },
    {
      "gate": "CNOT",
      "targets": [
        0,
        2
      ]
    }
  ],
  "qubit_count": 3
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
4 h agoPassed402101 ms$0.004