quantum-shadow-maps_v2/scripts
2026-07-13 15:53:43 +02:00
..
grraph_state_cuts.py initial commit 2026-07-13 15:53:43 +02:00
README.md initial commit 2026-07-13 15:53:43 +02:00
tiles_upb.py initial commit 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:

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:

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:

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
diagonal `{1,3} {2,4}` 7/3 1
adjacent `{1,4} {2,3}` 5 5/3

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.