-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
96c166e
commit 4a9129e
Showing
5 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from . import Hamiltonians | ||
from . import observables | ||
from . import states | ||
from . import ClassicalIsingTermalState | ||
from . import ClassicalIsingTermalState | ||
from . import iHamiltonians |
Binary file modified
BIN
+418 Bytes
(130%)
spin_systems/__pycache__/ClassicalIsingTermalState.cpython-38.pyc
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import numpy as np | ||
|
||
def IsingChainWithAncilla(J=1., h_z=0.25, h_x=0.): | ||
sz = np.array([[1,0],[0,-1]]) | ||
sx = np.array([[0,1],[1,0]]) | ||
Id2 = np.eye(2) | ||
Id4 = np.eye(4) | ||
|
||
sz_sys = np.kron(sz,Id2) | ||
sx_sys = np.kron(sx,Id2) | ||
|
||
sz_anc = np.kron(Id2,sz) | ||
sx_anc = np.kron(Id2,sz) | ||
|
||
H = -J*(np.kron(sx_sys,sx_sys))-h_z*(np.kron(sz_sys,Id4)+np.kron(Id4,sz_sys))-h_x*(np.kron(sx_sys,Id4)+np.kron(Id4,sx_sys)) | ||
H -= -J*(np.kron(sx_anc,sx_anc))-h_z*(np.kron(sz_anc,Id4)+np.kron(Id4,sz_anc))-h_x*(np.kron(sx_anc,Id4)+np.kron(Id4,sx_anc)) | ||
|
||
return H |