Conversation
Codecov Report
@@ Coverage Diff @@
## master #67 +/- ##
======================================
Coverage 98.7% 98.7%
======================================
Files 118 119 +1
Lines 2346 2350 +4
Branches 564 564
======================================
+ Hits 2317 2321 +4
Misses 12 12
Partials 17 17
Continue to review full report at Codecov.
|
| "N-particleN-level Singlet States: Some Properties and Applications." | ||
| Phys. Rev. Lett., 89, (2002): 100402. | ||
|
|
||
| :param dim: The dimension of the generalized Singlet state. |
There was a problem hiding this comment.
Make sure you specify the return type as well in the comments. Something like:
:return: The singlet state of dimension `dim`.
| "N-particleN-level Singlet States: Some Properties and Applications." | ||
| Phys. Rev. Lett., 89, (2002): 100402. | ||
|
|
||
| :param dim: The dimension of the generalized Singlet state. |
There was a problem hiding this comment.
I don't believe "singlet" is a proper noun, so I would leave that lower-case for now.
| @@ -0,0 +1,73 @@ | |||
| """Generalized Singlet state.""" | |||
There was a problem hiding this comment.
I think "singlet" should not be considered a proper noun.
|
|
||
| def singlet(dim: int) -> np.ndarray: | ||
| r""" | ||
| Produce a generalized Singlet state acting on two n-dimensional systems [Gsinglet]_. |
There was a problem hiding this comment.
Same comment as above "Singlet" -> "singlet".
| [ 0. , 0. , 0. , 0. ]] | ||
|
|
||
| It is possible for us to consider higher dimensional Singlet states. For instance, we | ||
| can consider the :math:`3`-dimensional Singlet state as follows: |
| References | ||
| ========== | ||
| .. [Gsinglet] Adan Cabello. | ||
| "N-particleN-level Singlet States: Some Properties and Applications." |
There was a problem hiding this comment.
For the reference, I believe the "," should be outside the ending double quote.
|
|
||
| :param dim: The dimension of the generalized Singlet state. | ||
| """ | ||
| return (iden(dim**2) - swap_operator([dim, dim]))/((dim**2)-dim) |
There was a problem hiding this comment.
I believe you can save yourself the import of the iden method and simply use np.identity(dim**2) instead.
Description
The function yields the generalized singlet state acting on two n-dimensional systems. This state is defined as:
(1/n^2-n) * (eye(n^2) - swap_operator([n, n])Todos
tests/test_states/test_singlet.pyfrom toqito.states.singlet import singlettotoqito/states/__init__.pydocsQuestions
Status