Skip to content

.github/workflows/webpack.yml#280

Open
robisonpedroso0089-web wants to merge 3 commits intoollama:mainfrom
robisonpedroso0089-web:main
Open

.github/workflows/webpack.yml#280
robisonpedroso0089-web wants to merge 3 commits intoollama:mainfrom
robisonpedroso0089-web:main

Conversation

@robisonpedroso0089-web
Copy link

No description provided.

@robisonpedroso0089-web
Copy link
Author

import qutip as qt
import numpy as np

sz = qt.sigmaz()
sx = qt.sigmax()
sy = qt.sigmay()
singlet = (qt.tensor(qt.basis(2,0), qt.basis(2,1)) - qt.tensor(qt.basis(2,1), qt.basis(2,0))).unit()

a1 = sz
a2 = sx
b1 = (sz + sx).unit() # 45°
b2 = (sz - sx).unit() # -45° ou 135°

S = (qt.expect(qt.tensor(a1, b1), singlet) +
qt.expect(qt.tensor(a1, b2), singlet) +
qt.expect(qt.tensor(a2, b1), singlet) -
qt.expect(qt.tensor(a2, b2), singlet))

print("Valor CHSH simulado:", S)
print("Valor absoluto:", abs(S))
print("Valor teórico máximo: 2√2 ≈", 2np.sqrt(2))
print("Diferença:", 2
np.sqrt(2) - abs(S))

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

Successfully merging this pull request may close these issues.

1 participant