Molecular graphs become quantum circuits, but isomers share nearly identical outputs and differ mainly in how often measurement succeeds
Synopsis
Treating each heavy atom as a word and each bond as a connection makes a quantum circuit's wiring match the molecular graph exactly, but whether the output depends only on the molecule has to be checked separately. With angles shared by element and bond type, the circuit output equals a spin-model partition function on a graph whose vertices are bonds, so 1.19% of 232,191 MOSES molecules have a partner with an identical output. Finer typed sharing removes these collisions, yet on 7 Tox21 pairs and 1,988 MOSES pairs the repaired output states stay almost the same, and nearly all the difference lies in whether measurement succeeds, which a standard readout discards.
Interpretation
A quantum circuit that shares angles by element and bond type maps distinct molecules to exactly the same output, and this can be certified exactly on real molecule sets. Earlier attempts to apply grammar to molecules used a grammar that carried no chemical structure, so their weak results said little about a grammar built from chemical structure. Among 232,191 MOSES molecules, 1,412 strongly equal pairs were certified, covering 2,760 molecules or 1.19%; the Tox21 development set gave 7 pairs out of 843,051, and the generated alkyl set gave 8,671 out of 215,924.
The collisions come from a writable object: a port-line graph with bonds as vertices and the output as root, where isomorphic graphs give identical outputs for every choice of angles. No corresponding graph was known for this compiler, so which isomers get merged could not be explained. The graph explains all but one of the certified collisions on real molecule sets; for alkyl side chains it reduces to a tree shape that separates chains up to 15 atoms but not from 16, and the smallest counterexample is produced by the compiler itself.
Refining angle sharing removes the collisions, but the repaired isomers still have nearly coincident output states, and distinguishability comes mainly from the probability that a run succeeds. A standard readout uses only the normalised output qubit and therefore never sees the success-rate difference. Seven Tox21 collision pairs with 200 controls and 1,988 MOSES collision pairs with 300 controls were computed exactly over 48 angle tables; after repair the median trace distance of collision pairs is far below the 0.035 to 0.044 of the controls, state-only protocols need far more runs, and recording the success flag brings the run count close to the controls.
Perspective
The conclusions are limited to the described compiler, word types, angle-sharing schemes and molecule sets; the chemistry excludes charges, stereochemistry, isotopes, most elements and fused or multi-ring aromatic systems, and whether a string is accepted depends on how it is written. The MOSES census uses canonical writings only, and prediction was tested on one task with reused folds, so it is exploratory. The finite-budget and cup-free analyses use untrained angle tables, apart from one 300-step training run, and assume ideal measurement statistics.
At drug-like sizes every measured pair, controls included, needs very many runs through a cup encoder even when the success flag is used, so these molecules cannot in practice be told apart this way. Whether longer training, other tasks or other starting tables would widen the separations that repairs create, and whether failed Bell outcomes carry further useful information, remain open. The 1-WL comparison rests on six pairs of at most seven atoms.
