Skip to content
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

[BUG] Exercise I.7.2 Relation of X and Y #61

Open
1 task done
maplexgitx0302 opened this issue Dec 19, 2023 · 1 comment
Open
1 task done

[BUG] Exercise I.7.2 Relation of X and Y #61

maplexgitx0302 opened this issue Dec 19, 2023 · 1 comment

Comments

@maplexgitx0302
Copy link

Node number

Exercise I.7.2

Expected behavior

I think the relation should be $Y=SXS^\dagger$, also the decomposition of $U$ should change from $R_x(-\theta)\rightarrow R_x(\theta)$

Actual behavior

Currently is $Y=-SXS^\dagger$

Additional information

No response

Source code

No response

Tracebacks

No response

Check other issues

  • I have searched existing GitHub issues to make sure the issue does not already exist.
@isaacdevlugt
Copy link
Collaborator

Hey @maplexgitx0302, looks like you're right! Here's some code just to show for the paper trail:

>>> mat = np.dot(qml.S.compute_matrix(), np.dot(qml.PauliX.compute_matrix(), np.conj(qml.S.compute_matrix())))
>>> mat
tensor([[0.+0.j, 0.-1.j],
        [0.+1.j, 0.+0.j]], requires_grad=True)
>>> mat == qml.PauliY.compute_matrix()
tensor([[ True,  True],
        [ True,  True]], requires_grad=True)
>>>

I'll make the fix shortly :)

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

No branches or pull requests

2 participants