These are the codes and datasets associated with the paper Szoldra, Sierant, Lewenstein, Zakrzewski, Phys. Rev. B 105, 224205 (2022).

If you use these datasets or codes, please cite the paper.

**eigensystems/** - contains numpy arrays in the *.npz format with entries: 'E' - eigenvalues, 'V' - eigenvectors (symmetry-reduced if applicable), 'V_full' - eigenvectors in the full 2^{N} Hilbert space with a basis numbering in qiskit little-endian convention (https://qiskit.org/documentation/tutorials/circuits/3_summary_of_quantum_operations.html), 'basis' - quspin basis, all generated using scripts from the **/github/QMBS_detector/models/**

**PXP.zip **- eigensystems of the generalized PXP model for different radii of Rydberg blockade - includes symmetry

**PXP_no_symmetries.zip **- eigensystems of the generalized PXP model for different radii of Rydberg blockade - in the full 2^{N} basis

**SPIN_LADDER/ **- eigensystems of the spin ladder model for N=8 (16 spins in total) in the M=1 magnetization sector and in all sectors. *.npz files also contain lists of the indices of eigenstates that correspond to exact invariant subspaces.

**/****code/QMBS_detector/ **- details on how to use the programs from the commandline can be found by executing the program with --help argument.

**CQVAE_scars_detector/ **- main program: computes costs of the quantum autoencoder trained on one eigenstate on all others. Uses custom quantum circuit implementation to utilize constraints of the PXP model.

**models/ **- programs that generate eigenvalues and eigenvectors of the following models. Some configurations are generated in the eigensystems folder.

**PXP.py** - PXP model (generalized to arbitrary integer Rydberg blockade radius alpha)

**SBipartite.py **- calculates von Neuman bipartite entanglement entropy of the models with generalized PXP model constraints.

**spin_laddder.ipynb **- notebook that is used to generate the eigenvectors and eigenvalues of the considered spin ladder model (Iadecola, Znidaric, PRL 123, 036403 (2019)). It also constructs exact invariant subspaces predicted by theory.

**CQVAE_dream/ **- code used for optimizing the input to the CQVAE to 'dream' the representative of the given scar family

**scars_toolkit.sif **- singularity container (https://docs.sylabs.io/guides/latest/user-guide/) with all tools and libraries set up to use programs from the **/code/QMBS_detector** catalog in a reproducible way. One can think of it as a virtual machine with native-level computing performance. To run any program on linux, install singularity, and for example execute: singularity exec scars_toolkit.sif python code/models/PXP.py 12 PBC 1 myEigensystemFilename

**/results/ **- contains the results of training the CQVAE_scars_detector on the eigenstates of the PXP model and spin ladder model. Results contain the final trained network parameters 'thetas', the final 'cost', 'loss' throughout optimization iterations, the 'training_indices' of the eigenstates used for training the CQVAE (in each case one eigenstate), and the filename of the 'training_eigensystem'. Notebooks that were used to produce all figures in the paper are attached to the datasets. Unpacking the datasets and running te notebooks within the singularity container one can reproduce all figures.

**/figs.zip **- figures from the paper in the PDF format.

code | DIR | |

eigensystems | DIR | |

results | DIR | |

figs.zip | 1MB | |

scars_toolkit.sif | 1GB |