Skip to content

Instantly share code, notes, and snippets.

View brucelyu's full-sized avatar
🏠
Working from home

Xinliang(Bruce) Lyu brucelyu

🏠
Working from home
View GitHub Profile
@brucelyu
brucelyu / LinearMapErr.jl
Last active July 20, 2022 04:08
LinearMap Error
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)
@brucelyu
brucelyu / red_black_quit.ipynb
Created March 8, 2021 16:36
red_black_quit.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.