Closed albi3ro closed 1 month ago
Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md
with:
All modified and coverable lines are covered by tests :white_check_mark:
Please upload report for BASE (
v0.38.0-rc0@a62797c
). Learn more about missing BASE report.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Context:
Our result type spec does often squeeze out singleton dimensions, such as those arising from a single measurement, or a shot vector of length 1.
But we have an inconsistency around whether or not a batch size of
1
,op.batch_size == 1
is considered an actual batch size or a dimension to squeeze out. I would consider a batch size of 1 different than a batch_size ofNone
, and worth maintaining. This was already the behaviour ofdefault.qubit
, and is generally how parameter broadcasting works.Description of the Change:
Eliminates squeezing steps from
broadcast_expand
.Benefits:
Consistent, predictable handling of batch dimensions.
Possible Drawbacks:
Someone might have been depending on the squeezing behaviour. That code might now break. This may be risky, especially this close to the release.
Related GitHub Issues:
[sc-68244] Fixes #5977