Title: Post-Measurement States for a Quantum Ising Chain
Domain: computing_math — Quantum Computing

Summary: Compute the post-measurement output bundle for several 1D quantum Ising chain variants, including the critical ground state, measurement probabilities, one-site reduced density matrices, and optional one-body correlators.

Task prompt:
You are working on a Linux VM.

## Variant
`n10_critical_u01_correlators`: N=10, u=0.1, critical ancilla equal to the computed ground state, with one-body correlators

## Input Files
- Task specification: `n10_critical_u01_correlators/input/task_specification.md`
- Numerical parameters: `n10_critical_u01_correlators/input/config.json`
- Optional ancilla state file when staged by the selected variant: `n10_critical_u01_correlators/input/ancilla_state.npy`
- Runtime manifest: `n10_critical_u01_correlators/input/runtime_env/pyproject.toml`
- Requirements fallback: `n10_critical_u01_correlators/input/requirements.txt`
- Runtime notes: `n10_critical_u01_correlators/software/README.txt`

## Your Task
1. Read `n10_critical_u01_correlators/input/task_specification.md` for the full physics definition, conventions, output contract, and public tolerances.
2. Read `n10_critical_u01_correlators/input/config.json` for the variant parameters.
3. If `n10_critical_u01_correlators/input/ancilla_state.npy` is present, use it as the staged ancilla state; otherwise use the critical ancilla rule from the spec.
4. If you need Python packages, install them from `input/runtime_env/pyproject.toml` or `input/requirements.txt`.
5. Compute the required outputs and write them under `n10_critical_u01_correlators/output`.

## Required Outputs
- `n10_critical_u01_correlators/output/critical_state.npy`
- `n10_critical_u01_correlators/output/post_probs.npy`
- `n10_critical_u01_correlators/output/rdm_site1.npy`
- If the selected variant requires one-body correlators, also write `n10_critical_u01_correlators/output/correlators.npz` with keys `Z_one_body` and `X_one_body`

Do not modify files under `n10_critical_u01_correlators/input`.
Write final outputs only under `n10_critical_u01_correlators/output`.


The agent must:
Read the staged task specification and variant parameters from `input/task_specification.md` and `input/config.json`.
Use the staged `ancilla_state.npy` only for the paramagnetic-ancilla variants; otherwise follow the critical-ancilla rule from the visible task spec.
Optionally install task-specific Python packages from `input/runtime_env/pyproject.toml` or `input/requirements.txt`.
Compute `critical_state.npy`, `post_probs.npy`, and `rdm_site1.npy` for the selected variant.
Also produce `correlators.npz` with `Z_one_body` and `X_one_body` for the correlator variants.

Software: Python
NumPy
SciPy
uv

Input files:
name: config.json
format: JSON
path: input/config.json
description: Variant-specific numerical parameters such as system size, coupling strength, ancilla mode, and site index.
name: task_specification.md
format: Markdown
path: input/task_specification.md
description: Visible physics specification, conventions, output contract, and public tolerances.
name: ancilla_state.npy
format: NumPy .npy
path: input/ancilla_state.npy
description: Optional staged ancilla state for the paramagnetic-ancilla variants only.
name: runtime_env/pyproject.toml
format: TOML
path: input/runtime_env/pyproject.toml
description: Visible `uv` runtime manifest for the task-specific Python environment.