-
Notifications
You must be signed in to change notification settings - Fork 6
Align GaussianChannel basis fields with QuantumInterface #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
apkille
left a comment
There was a problem hiding this 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).
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. |
50c8224 to
8a15976
Compare
|
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 |
…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
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):
If possible, keep your git history not too wild (rebase and squash commits, keep commits small and semantically separated) so that review is easier.