Skip to content

Use Base.AbstractVecOrTuple instead of handwritten VectorOrTuple#683

Open
albertomercurio wants to merge 4 commits intoqutip:mainfrom
albertomercurio:dev/patch-2
Open

Use Base.AbstractVecOrTuple instead of handwritten VectorOrTuple#683
albertomercurio wants to merge 4 commits intoqutip:mainfrom
albertomercurio:dev/patch-2

Conversation

@albertomercurio
Copy link
Copy Markdown
Member

@albertomercurio albertomercurio commented Apr 5, 2026

Checklist

Thank you for contributing to QuantumToolbox.jl! Please make sure you have finished the following tasks before opening the PR.

  • Please read Contributing to Quantum Toolbox in Julia.
  • Any code changes were done in a way that does not break public API.
  • Appropriate tests were added and tested locally by running: make test.
  • Any code changes should be julia formatted by running: make format.
  • All documents (in docs/ folder) related to code changes were updated and able to build locally by running: make docs.
  • (If necessary) the CHANGELOG.md should be updated (regarding to the code changes) and built by running: make changelog.

Request for a review after you have completed all the tasks. If you have not finished them all, you can also open a Draft Pull Request to let the others know this on-going work.

Description

Describe the proposed change here.

Related issues or PRs

As title.

@albertomercurio albertomercurio marked this pull request as ready for review April 5, 2026 20:14
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 5, 2026

Codecov Report

❌ Patch coverage is 34.28571% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.50%. Comparing base (f0dffa0) to head (8536ec4).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/qobj/energy_restricted.jl 0.00% 7 Missing ⚠️
src/qobj/states.jl 50.00% 5 Missing ⚠️
src/qobj/operators.jl 0.00% 4 Missing ⚠️
src/qobj/arithmetic_and_attributes.jl 50.00% 3 Missing ⚠️
src/qobj/dimensions.jl 50.00% 3 Missing ⚠️
src/spin_lattice.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #683   +/-   ##
=======================================
  Coverage   21.50%   21.50%           
=======================================
  Files          57       57           
  Lines        3864     3864           
=======================================
  Hits          831      831           
  Misses       3033     3033           

☔ 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.

CHANGELOG.md Outdated
Comment on lines +13 to +19
- Use `AbstractVecOrTuple` for type definitions. ([#679])
- Allow specifying random number generator by keyword argument `rng` for the following random `Qobj` generating functions ([#680]):
- `rand_ket`
- `rand_dm`
- `rand_unitary`
- Fix benchmarks instability for autodiff. ([#681])
- Use `Base.AbstractVecOrTuple` instead of handwritten `VectorOrTuple`. ([#683])
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we just put them in one line:

- Use `AbstractVecOrTuple` for type definitions ([#679]). Note that it is changed to use `Base.AbstractVecOrTuple` instead ([#683]).

Because they are related.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@ytdHuang
Copy link
Copy Markdown
Member

ytdHuang commented Apr 6, 2026

(just a link to PR #679, since this is an update to that one)

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.

2 participants