Skip to content

Conversation

@arnavk23
Copy link
Contributor

@arnavk23 arnavk23 commented Jan 6, 2026

If you want to submit an unfinished piece of work in order to get comments and discuss, please mark the pull request as a draft and ping the repository maintainer.

Please address only one topic or issue per pull request! Many small PRs are much easier to review and merge than one large PR.

Before merging, all changes and new functionality should be marked in the CHANGELOG file, but feel free to just leave your CHANGELOG notes in the PR description, to avoid merge conflicts with other requests modifying that file. The maintainer will add these CHANGELOG notes for you if you do so.

Before considering your pull request ready for review and merging make sure that all of the following are completed (please keep the clecklist as part of your PR):

  • The code is properly formatted and commented.
  • Substantial new functionality is documented within the docs.
  • All new functionality is tested.
  • All of the automated tests on github pass.
  • We recently started enforcing formatting checks. If formatting issues are reported in the new code you have written, please correct them. There will be plenty of old code that is flagged as we are slowly transitioning to enforced formatting. Please do not worry about or address older formatting issues -- keep your PR just focused on your planned contribution.

If possible, keep your git history not too wild (rebase and squash commits, keep commits small and semantically separated) so that review is easier.

@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@8a15976). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #95   +/-   ##
=======================================
  Coverage        ?   97.17%           
=======================================
  Files           ?       19           
  Lines           ?     2623           
  Branches        ?        0           
=======================================
  Hits            ?     2549           
  Misses          ?       74           
  Partials        ?        0           

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

Copy link
Member

@apkille apkille left a comment

Choose a reason for hiding this comment

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

Hi @arnavk23, thanks for the contribution, but I'm not entirely sure why we need a left and right basis for the Gaussian types. It makes sense to do it this way, e.g., in QuantumOptics.jl, which is a state-vector simulation package. But Gabs works for only a restricted class of quantum states and operations which can be defined in terms of a symplectic basis and phase space characterizations such as a covariance matrix, symplectic operation, etc (which are also already defined).

@arnavk23
Copy link
Contributor Author

arnavk23 commented Jan 7, 2026

But Gabs works for only a restricted class of quantum states and operations which can be defined in terms of a symplectic basis and phase space characterizations such as a covariance matrix, symplectic operation, etc (which are also already defined).

Thanks for raising this. The only reason I added basis_l/basis_r is to satisfy the new QuantumInterface abstract operator parametrization (AbstractOperator{BL,BR}) and its helper functions, which currently access basis_l/basis_r fields directly (see basis(a::AbstractOperator) = (check_samebases(a); a.basis_l) in QuantumInterface). Because of that direct field access, a single basis field isn’t enough to interoperate cleanly without additional interface overrides or piracy.

@arnavk23 arnavk23 closed this Jan 7, 2026
@arnavk23 arnavk23 force-pushed the issue-17-basis-interface branch from 50c8224 to 8a15976 Compare January 7, 2026 03:21
@arnavk23 arnavk23 reopened this Jan 7, 2026
@arnavk23
Copy link
Contributor Author

arnavk23 commented Jan 7, 2026

Updated GaussianChannel to mirror basis into basis_l/basis_r and subtype AbstractOperator{B,B} for QuantumInterface compatibility. Constructor now stores all three consistently and retains dimension checks in types.jl

@arnavk23 arnavk23 changed the title Adapt Gaussian types to QuantumInterface basis API Align GaussianChannel basis fields with QuantumInterface Jan 7, 2026
…ment

Align Gaussian types parameterization with QuantumInterface basis API:
- GaussianState: StateVector{B,V}
- GaussianUnitary/GaussianChannel: AbstractOperator{B,B}
- basis_l/basis_r mirror basis for QuantumInterface compatibility
@arnavk23 arnavk23 requested a review from apkille January 12, 2026 16:33
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