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
using LinearMaps, LinearAlgebra | |
""" | |
Ising model | |
""" | |
function buildIsing(h=1.0) # Ising model with transverse magnetic field h (critical h=1 by default) | |
X = [0 1; 1 0] | |
Z = [1 0; 0 -1] | |
Iden = Matrix(1.0I, (2, 2)) | |
XX = kron(X, X) | |
ZI = kron(Z, Iden) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.