# CHSH Bell Inequality / S-Parameter Calculator

> CHSH Bell Inequality / S-Parameter Calculator is a paid API for AI agents from quantum.halowerk.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-14).

Converts raw coincidence counts (++, +−, −+, −−) for four measurement settings into CHSH correlators and computes the S parameter to test Bell inequality violation.

## Facts

- Endpoint: POST https://quantum.halowerk.com/v1/entanglement-test
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chsh-bell-inequality-s-parameter-calculator-5c0849b9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gjbtTOGJiYvO6G0Myu0Wr

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 chsh-bell-inequality-s-parameter-calculator-5c0849b9 -d '<json body>'
```

Example prompt: I ran a Bell test experiment and got coincidence counts for all four measurement settings — for AB I have 412 ++, 88 +−, 91 −+, and 409 −−; for AB′ I have 400 ++, 100 +−, 102 −+, 398 −−; for A′B I have 405 ++, 95 +−, 97 −+, 403 −−; for A′B′ I have 95 ++, 405 +−, 403 −+, 97 −−. Can you compute the CHSH S parameter and tell me whether it exceeds the classical bound of 2?

## When to prefer this

Use this endpoint when you have raw coincidence count data from a Bell test experiment across all four CHSH measurement settings and need the S parameter quickly without implementing the correlator arithmetic yourself. It is ideal for physics research pipelines, quantum hardware benchmarking, educational demonstrations, and automated experiment analysis workflows. Prefer it over general-purpose math APIs because it encodes the precise CHSH formula (E(AB) + E(AB′) + E(A′B) − E(A′B′)) and handles the four-setting structure natively.

## Known failure modes

- Fewer or more than exactly 4 measurement items returns a validation error
- Invalid or duplicate setting enum values cause rejection
- All counts zero for a setting produces a divide-by-zero or NaN correlation
- Negative count values are rejected by schema minimum constraint
- Counts exceeding 10^12 are rejected by schema maximum constraint

## How this service works

Converts ++, +−, −+ and −− counts into a correlation for each of AB, AB′, A′B and A′B′, then computes S = E(AB) + E(AB′) + E(A′B) − E(A′B′). A value above the classical bound in supplied data does not by itself demonstrate entanglement or close detection, locality, sampling or significance loopholes.

## Output

Returns the four per-setting correlations E(AB), E(AB′), E(A′B), E(A′B′) derived from the coincidence counts, and the combined CHSH S value computed as E(AB) + E(AB′) + E(A′B) − E(A′B′). The response also indicates whether S exceeds the classical bound of 2, though the service notes that exceeding the bound alone does not close experimental loopholes such as detection, locality, or sampling loopholes.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "measurements": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "setting",
     "plus_plus",
     "plus_minus",
     "minus_plus",
     "minus_minus"
    ],
    "properties": {
     "setting": {
      "enum": [
       "AB",
       "ABprime",
       "AprimeB",
       "AprimeBprime"
      ],
      "type": "string"
     },
     "plus_plus": {
      "type": "integer",
      "maximum": 1000000000000,
      "minimum": 0
     },
     "minus_plus": {
      "type": "integer",
      "maximum": 1000000000000,
      "minimum": 0
     },
     "plus_minus": {
      "type": "integer",
      "maximum": 1000000000000,
      "minimum": 0
     },
     "minus_minus": {
      "type": "integer",
      "maximum": 1000000000000,
      "minimum": 0
     }
    },
    "additionalProperties": false
   },
   "maxItems": 4,
   "minItems": 4
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chsh-bell-inequality-s-parameter-calculator-5c0849b9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from quantum.halowerk.com](https://www.zero.xyz/host/quantum.halowerk.com/llms.txt)
