Skip to content

Conversation

Siddharthgolecha
Copy link

@Siddharthgolecha Siddharthgolecha commented Oct 10, 2025

Summary

This PR builds on top of #15158 and introduces an optional use_seeking keyword argument to qpy.dump. Fixes #15157

Details and comments

This provides explicit user control over whether QPY uses the in-place seek table or the buffered write path.

  • use_seeking=None -> automatic detection (based on seekable() and KNOWN_BAD_SEEKERS).
  • use_seeking=True -> force the in-place seek path.
  • use_seeking=False -> force the buffered path.

This gives users full control in environments with custom stream wrappers.

This PR should target Qiskit 2.3, while #15158 remains the bug-fix-only change backported to 2.2.2.

@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Oct 10, 2025
@Siddharthgolecha
Copy link
Author

Fixes #15157

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

Labels

Community PR PRs from contributors that are not 'members' of the Qiskit repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

qpy.dump fails with gzip files in QPY v16 due to unsupported backward seek

2 participants