-
Notifications
You must be signed in to change notification settings - Fork 616
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
Adding adjoint methods to FermiWord and FermiSentence classes #6166
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6166 +/- ##
=======================================
Coverage 99.63% 99.63%
=======================================
Files 445 445
Lines 42417 42441 +24
=======================================
+ Hits 42261 42285 +24
Misses 156 156 ☔ View full report in Codecov by Sentry. |
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.
Thanks @willjmax, leaving some suggestions.
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.
Looking good @willjmax.
Do we need to add test cases for FermiWord
specifically? I see the tests for FermiSentence but it might be useful to have unit tests for adjoint()
of FermiWord
as well.
There are tests for both |
My bad, think I scrolled too quickly 😅. Looks good to me for the most part. Could add docstrings for the new tests but they seem straightforward enough to me that I personally wouldn't require them. @obliviateandsurrender are docstrings a hard requirement or is it ok to omit them for really simple tests? |
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.
Nice work @willjmax
Co-authored-by: Austin Huang <65315367+austingmhuang@users.noreply.github.com>
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.
Looks good, just some minor suggestions.
Co-authored-by: Utkarsh <utkarshazad98@gmail.com>
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.
Thanks @willjmax, left some documentation comments.
Co-authored-by: soranjh <40344468+soranjh@users.noreply.github.com>
Co-authored-by: soranjh <40344468+soranjh@users.noreply.github.com>
Co-authored-by: soranjh <40344468+soranjh@users.noreply.github.com>
Co-authored-by: soranjh <40344468+soranjh@users.noreply.github.com>
This PR adds a `.adjoint()` method to the `FermiWord` and `FermiSentence` classes. In both cases the method can be used in the following way: `f_dag = f.adjoint()`. The resulting `f_dag` is a `FermiWord` or `FermiSentence` corresponding to the adjoint of `f`. This PR addresses [sc-72055]. --------- Co-authored-by: Austin Huang <65315367+austingmhuang@users.noreply.github.com> Co-authored-by: Utkarsh <utkarshazad98@gmail.com> Co-authored-by: soranjh <40344468+soranjh@users.noreply.github.com>
This PR adds a `.adjoint()` method to the `FermiWord` and `FermiSentence` classes. In both cases the method can be used in the following way: `f_dag = f.adjoint()`. The resulting `f_dag` is a `FermiWord` or `FermiSentence` corresponding to the adjoint of `f`. This PR addresses [sc-72055]. --------- Co-authored-by: Austin Huang <65315367+austingmhuang@users.noreply.github.com> Co-authored-by: Utkarsh <utkarshazad98@gmail.com> Co-authored-by: soranjh <40344468+soranjh@users.noreply.github.com>
This PR adds a `.adjoint()` method to the `FermiWord` and `FermiSentence` classes. In both cases the method can be used in the following way: `f_dag = f.adjoint()`. The resulting `f_dag` is a `FermiWord` or `FermiSentence` corresponding to the adjoint of `f`. This PR addresses [sc-72055]. --------- Co-authored-by: Austin Huang <65315367+austingmhuang@users.noreply.github.com> Co-authored-by: Utkarsh <utkarshazad98@gmail.com> Co-authored-by: soranjh <40344468+soranjh@users.noreply.github.com>
This PR adds a
.adjoint()
method to theFermiWord
andFermiSentence
classes. In both cases the method can be used in the following way:f_dag = f.adjoint()
. The resultingf_dag
is aFermiWord
orFermiSentence
corresponding to the adjoint off
. This PR addresses [sc-72055].