Abort undersized auto-distributed Qureg instead of replicating it - #818
Open
iarejula-bsc wants to merge 1 commit into
Open
Abort undersized auto-distributed Qureg instead of replicating it#818iarejula-bsc wants to merge 1 commit into
iarejula-bsc wants to merge 1 commit into
Conversation
…ad of silently replicating it Credits: AccelCom @ Barcelona Supercomputing Center
iarejula-bsc
force-pushed
the
qureg-abort-below-min-local-qubits
branch
from
August 18, 2026 14:00
e9ccd4e to
9608884
Compare
Member
|
Could you elaborate in words the decision made? It sounds like you propose to remove the automatic disabling of distribution. The existing functionality is very useful to ensure that the chosen parallelisations/deployments are performant for the user's |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

In a multi-node environment,
createQureg()can currently return a Qureg which is replicated across every node rather than distributed between them. Every node then redundantly simulates the same state, so all but one of the allocated nodes do no useful work, and nothing warns the user. The auto-deployer reaches that outcome by two routes:numQubits < log2(numNodes)), so it cannot be distributed at allMIN_NUM_LOCAL_QUBITS_FOR_AUTO_QUREG_DISTRIBUTION(26) local qubits.The solution provided is to require that an automatic deployment utilises every node of the environment, and to abort with a clear error otherwise, the same way already done in validation (e.g. the "node count must be a power of 2" check), so callers can react instead of QuEST silently proceeding. Each route reports its own reason: how many qubits would be needed to divide the state between the nodes, or how many amplitudes each node would be left holding.
Explicitly requesting a non-distributed Qureg (via
createCustomQureg()orcreateQuregFromEnvDeployments()) remains permitted, since that replication is deliberate; only deployments left to the auto-deployer are affected.reportQuESTEnv()now reports the sizes which can no longer be automatically deployed, rather than advertising a deployment whichcreateQureg()would reject.I would like to discuss the use of Malleability instead of aborting. Where the runtime supports malleability (DMR library), a better response is available, shrink the job to a node count at which the Qureg does distribute, and carry on, which would turn this error into a resize and leave the abort as the fallback for whatever malleability cannot cover. This would not affect the core of Quest and would be low intrusive, as it would only modify the autodeployer, which i think it fits the use of malleability.
Disclosure: this contribution was developed with support of Opus.