-
Notifications
You must be signed in to change notification settings - Fork 4
Tal/review #8
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: master
Are you sure you want to change the base?
Tal/review #8
Conversation
SimonSekavcnik
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.
We agree with most of your comments and suggestions. We had some comments with the documentation updates that you propose as well as with the inheritance of the CompositeEnvelope.
| \hat{\sigma_y} = \begin{bmatrix} | ||
| 0 & -i \\ | ||
| i & 0 | ||
| 0 & -Id \\ |
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.
In this case i represents imaginary number, not identity matrix.
| .. math:: | ||
| \hat{S} = \begin{bmatrix} 1 & 0 \\ 0 & i \end{bmatrix} | ||
| \hat{S} = \begin{bmatrix} 1 & 0 \\ 0 & Id \end{bmatrix} |
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.
In this case i also represents imaginary number.
| Constructs T (:math:`\hat T`) operator | ||
| .. math:: | ||
| \hat{T} = \begin{bmatrix} 1 & 0 \\ 0 & e^{i \pi/4} \end{bmatrix} | ||
| \hat{T} = \begin{bmatrix} 1 & 0 \\ 0 & e^{Id \pi/4} \end{bmatrix} |
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.
Again, i represents imaginary number.
| .. math:: | ||
| \hat{SX} = \frac{1}{2} \begin{bmatrix} 1+i & 1-i \\ 1-i & 1+i \end{bmatrix} | ||
| \hat{SX} = \frac{1}{2} \begin{bmatrix} 1+Id & 1-Id \\ 1-Id & 1+Id \end{bmatrix} |
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.
Again, i represents imaginary number.
| \cos\left(\frac{\theta}{2}\right) & -i\sin\left(\frac{\theta}{2}\right) \\ | ||
| -i\sin\left(\frac{\theta}{2}\right) & \cos\left(\frac{\theta}{2}\right) | ||
| \cos\left(\frac{\theta}{2}\right) & -Id\sin\left(\frac{\theta}{2}\right) \\ | ||
| -Id\sin\left(\frac{\theta}{2}\right) & \cos\left(\frac{\theta}{2}\right) |
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.
Again, i represents imaginary number.
| e^{-i\frac{\theta}{2}} & 0 \\ | ||
| 0 & e^{i\frac{\theta}{2}} | ||
| e^{-Id\frac{\theta}{2}} & 0 \\ | ||
| 0 & e^{Id\frac{\theta}{2}} |
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.
Again, i represents imaginary number.
| ][0] | ||
|
|
||
|
|
||
| # FIXME: Inherit from Envelope to limit code duplication ? |
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.
CompositeEnvelope has a fundamentally different way of handling states. It does expose similar API, but it handles the states differently. Basically CompositeEnvelope passes the 'commands' to the correct ProductSpace, thus I think that we cannot productively inherit the functionality from the Envelope.
Here are some preliminary comments / slight reformatting in the context of the JOSS review:
Let me know if you have any questions of if I can help in any way :)