quantum-shadow-maps_v2/scripts/README.md

82 lines
3.2 KiB
Markdown
Raw Normal View History

2026-07-13 15:53:43 +02:00
# Reproducibility Scripts
This directory contains small numerical scripts used to reproduce values quoted in the paper. Scripts should be executable from the repository root unless noted otherwise.
## Requirements
- Python 3
- NumPy
Install the only current dependency with:
```bash
python3 -m pip install numpy
```
## Current Scripts
### `tiles_upb.py`
Computes the two-qutrit Tiles unextendible-product-basis benchmark used in `paper/symmetric_shadow_maps_formal.tex`. The script uses Gell-Mann generators scaled so that `Tr(sigma_i sigma_j) = 3 delta_ij`, matching the paper's generator normalization.
Run from the repository root:
```bash
python3 scripts/tiles_upb.py
```
The script constructs the five Tiles UPB product vectors, forms the normalized projector onto their four-dimensional orthogonal complement, and prints:
- the UPB Gram matrix;
- the density-matrix trace, Hermiticity check, and spectrum;
- the partial-transpose spectrum and minimum eigenvalue;
- the shadow-map value `||M_A(rho)||_*`, normalized by `sqrt((3-1)(3-1)) = 2`;
- the CCNR/realignment trace norm for comparison.
The values used in `paper/symmetric_shadow_maps_formal.tex` are:
| quantity | value |
| --- | ---: |
| minimum eigenvalue of partial transpose | `-1.5922869149236308e-16` |
| unnormalized correlation nuclear norm | `2.1068432645403345` |
| normalized shadow-map value | `1.0534216322701673` |
| CCNR/realignment trace norm | `1.087412464837521` |
The tiny negative partial-transpose eigenvalue is numerical roundoff; the state is the standard PPT-entangled Tiles UPB state. The paper compares the normalized shadow-map value to the separability bound `<= 1`.
### `grraph_state_cuts.py`
Computes the cut-resolved bigraduated shadow-map values for the four-qubit ring graph state with edges `(1,2)`, `(2,3)`, `(3,4)`, `(4,1)`. Internally the script uses zero-based qubit labels.
Run from the repository root:
```bash
python3 scripts/grraph_state_cuts.py
```
The script constructs the graph state, computes its Pauli correlation tensor, forms the normalized `2|2` source-target unfoldings, and prints:
- the full normalized nuclear norm `||M_S||_*` for each cut;
- the normalized full-sector block, obtained by keeping only nonidentity Pauli labels on both source qubits and both target qubits;
- the eigenvalues of the two-qubit source marginal and its distance from the maximally mixed state.
The values used in `paper/symmetric_shadow_maps_formal.tex` are:
| cut | full normalized norm | normalized full-sector block | source marginal |
| --- | ---: | ---: | --- |
| adjacent `{1,2}|{3,4}` | `5` | `5/3` | maximally mixed |
| diagonal `{1,3}|{2,4}` | `7/3` | `1` | eigenvalues `1/2, 1/2, 0, 0` |
| adjacent `{1,4}|{2,3}` | `5` | `5/3` | maximally mixed |
The script also prints raw, unnormalized nuclear norms. The paper compares only the normalized values to the separability bound `<= 1`.
## Adding New Scripts
When adding another script, add a short entry above with:
- the purpose of the script;
- the command needed to run it from the repository root;
- required dependencies beyond NumPy, if any;
- the paper values, table, or figure it reproduces;
- notes about normalization conventions if the output includes both raw and normalized quantities.