Skip to content

feat: add default all-zero state to QubitCircuit.run() and run_statistics()#378

Closed
nightcityblade wants to merge 1 commit intoqutip:masterfrom
nightcityblade:feat/issue-374
Closed

feat: add default all-zero state to QubitCircuit.run() and run_statistics()#378
nightcityblade wants to merge 1 commit intoqutip:masterfrom
nightcityblade:feat/issue-374

Conversation

@nightcityblade
Copy link
Copy Markdown

Description

When no state argument is passed to QubitCircuit.run() or run_statistics(), default to the all-zero state |0...0⟩ based on the circuit's qubit dimensions. This covers the common case where users just want to run a circuit from the computational basis zero state.

Related issues or PRs

Fixes #374

AI Usage Disclosure

AI tools were used to help implement and test this change.

Checklist

  • Follows PEP 8 style
  • Tests pass
  • Documentation updated in docstrings

@BoxiLi
Copy link
Copy Markdown
Member

BoxiLi commented Apr 10, 2026

Thank you. This has been addressed in #376 .

@BoxiLi BoxiLi closed this Apr 10, 2026
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.

Add default state to qc.run()

2 participants