Skip to content

Add Statevec.to_dict and Statevec.to_prob_dict methods#457

Open
matulni wants to merge 9 commits intoTeamGraphix:masterfrom
matulni:sv-todict
Open

Add Statevec.to_dict and Statevec.to_prob_dict methods#457
matulni wants to merge 9 commits intoTeamGraphix:masterfrom
matulni:sv-todict

Conversation

@matulni
Copy link
Contributor

@matulni matulni commented Mar 5, 2026

This PR adds Statevec.to_dict and Statevec.to_prob_dict methods to convert a statevector in dictionary form as suggested in #100. It allows to choose between big-endian encoding (Graphix default) or little-endian encoding (Qiskit default) in the ket representation for easier cross-platform comparison.

@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.30%. Comparing base (b70ffeb) to head (35b39c5).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #457      +/-   ##
==========================================
+ Coverage   88.29%   88.30%   +0.01%     
==========================================
  Files          44       44              
  Lines        6533     6544      +11     
==========================================
+ Hits         5768     5779      +11     
  Misses        765      765              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant