Skip to content

Miscellaneous bug patches - #832

Open
TysonRayJones wants to merge 27 commits into
develfrom
bug-fixes
Open

TysonRayJones wants to merge 27 commits into
develfrom
bug-fixes

Conversation

@TysonRayJones

Copy link
Copy Markdown
Member

as discovered by GPT-5.6 Sol, and stylised by moi

We require a validation failure on one node to reach all other nodes; this requires an OR across nodes. The code previously erroneously performed an AND, requiring the failure occur on all nodes in order to be propagated.
Pretty much pointless since there's no new deployment that switches on only at the absolute maximum Qureg size before overflow, but eh, an aesthetic bug
which erroneously passed (numRows,numRows) instead of (numRows,numCols), to the C API. This meant passing a rectangular (non-square) set of amplitudes either caused a seg-fault, or discarding some of the passed amplitudes.
destroyQureg previously erroneously used the non-NUMA dealloc
which previously did not validate matrix diagonals were real, and ergo returned true for non-Hermitian matrices!
which previously numerically differed from the doc
Avoid imprecise floating-point page counts, support multiword node masks,
and skip binding empty page ranges
Previous erroneous logic sometimes overestimated distributed capacity by 1-2 qubits, permitting validation to succeed when insufficient memory was available to allocate distributed structures, like Qureg and SuperOp
which previously referenced a qindex overflow, rather than a size_t

Commit also includes yet another ridiculous edge-case protection
which failed to update the full array on each node when the number of local probabilities exceeded max-int (about 32 qubits worth)
@TysonRayJones

Copy link
Copy Markdown
Member Author

@lucjaulmes Does this patch of the NUMA allocation look right?

@TysonRayJones

Copy link
Copy Markdown
Member Author

Note to self: I changed the CPTP Kraus-map validation logic, tightening it, which requires loosening our unit test thresholds. This could prove a painful breaking change for users, so doc this carefully!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant