Exemple #1
0
pxp_syms = model_sym_data(pxp, [translational(pxp)])

# H = spin_Hamiltonian(pxp,"x",pxp_syms)
# #looking at coherent states, lin combinations of |J,m>, |J,m> = (sum_n s_n^+)^m |000....>
# #ie |J,m> lin combs of zero momenta states, only need to consider zero momenta
# H.gen()
# H.sector.find_eig()
# np.save("pxp,eigvalues,18",H.sector.eigvalues())
# np.save("pxp,eigvectors,18",H.sector.eigvectors())
H_eigvalues = np.load("./pxp,eigvalues,18.npy")
H_eigvectors = np.load("./pxp,eigvectors,18.npy")
# H_eigvalues = H.sector.eigvalues()
# H_eigvectors = H.sector.eigvectors()

# # operators for coherent states
X = spin_Hamiltonian(pxp, "x", pxp_syms)
X.gen()
Y = spin_Hamiltonian(pxp, "y", pxp_syms)
Y.gen()
Z = spin_Hamiltonian(pxp, "z", pxp_syms)
Z.gen()
sp = X.sector.matrix() + 1j * Y.sector.matrix()
sm = X.sector.matrix() - 1j * Y.sector.matrix()

X_energy = np.dot(np.conj(np.transpose(H_eigvectors)),
                  np.dot(X.sector.matrix(), H_eigvectors))
Y_energy = np.dot(np.conj(np.transpose(H_eigvectors)),
                  np.dot(Y.sector.matrix(), H_eigvectors))
Z_energy = np.dot(np.conj(np.transpose(H_eigvectors)),
                  np.dot(Z.sector.matrix(), H_eigvectors))
rc('font', **{
    'family': 'sans-serif',
    'sans-serif': ['Computer Modern'],
    'size': 26
})
## for Palatino and other serif fonts use:
#rc('font',**{'family':'serif','serif':['Palatino']})
rc('text', usetex=True)
# matplotlib.rcParams['figure.dpi'] = 400

N = 12
pxp = unlocking_System([0], "periodic", 2, N)
pxp.gen_basis()
pxp_syms = model_sym_data(pxp, [translational(pxp), parity(pxp)])

H0 = spin_Hamiltonian(pxp, "x", pxp_syms)

V1 = Hamiltonian(pxp, pxp_syms)
V1.site_ops[1] = np.array([[0, 1], [1, 0]])
V1.model = np.array([[0, 1, 0, 0], [0, 0, 1, 0]])
V1.model_coef = np.array([1, 1])

V2 = Hamiltonian(pxp, pxp_syms)
V2.site_ops[1] = np.array([[0, 1], [1, 0]])
V2.model = np.array([[0, 1, 1, 1, 0]])
V2.model_coef = np.array([1])

H0.gen()
V1.gen()
V2.gen()
Exemple #3
0
            if overlap[n] > max_val:
                max_val = overlap[n]
                max_loc = n

    if max_val > -1.5:
        scar_indices = np.append(scar_indices, max_loc)
    scar_indices = np.append(scar_indices, 0)
    scar_indices = np.append(scar_indices,
                             np.size(H.sector.eigvalues(), axis=0) - 1)
    return scar_indices


#PXP+PPXP
from Hamiltonian_Classes import H_operations

H0 = spin_Hamiltonian(pxp, "x")
V = Hamiltonian(pxp)
V.site_ops[1] = np.array([[0, 1 / 2], [1 / 2, 0]])
V.model = np.array([[0, 1, 0, 0], [0, 0, 1, 0]])
V.model_coef = np.array([1, 1])
H0.gen()
V.gen()

coef_vals = np.arange(0, 0.16, 0.01)
fsa_pert_measure = np.zeros(np.size(coef_vals))
perm_pert_measure = np.zeros(np.size(coef_vals))
# cube_pert_measure = np.zeros(np.size(coef_vals))
cube_pert_measure = np.load("./cube_pert_measure,16.npy")
print(cube_pert_measure)
for count in range(5, np.size(coef_vals, axis=0)):
    coef = coef_vals[count]
Exemple #4
0
pxp = unlocking_System("pxp", [0, 1], "periodic", 150, 1)
pxp_syms = model_sym_data(pxp, [
    translational(pxp),
    parity(pxp),
])

#drive variables
# phi = -0.5*(1-np.power(5,0.5))
# tau = 0.5*phi
tau = 0.1
alpha = 0.89
j = 1 / 2 * (pxp.base - 1)
print(j)

Jx = spin_Hamiltonian(pxp, "x").site_ops[1]
Jy = spin_Hamiltonian(pxp, "y").site_ops[1]
Jz = spin_Hamiltonian(pxp, "z").site_ops[1]

exp_Jz2 = np.diag(np.exp(-1j * alpha / (2 * j) * np.diag(np.dot(Jz, Jz))))
ex, ux = np.linalg.eigh(Jx)
exp_Jx = np.dot(
    ux, np.dot(np.diag(np.exp(-1j * tau * ex)), np.conj(np.transpose(ux))))

F = np.dot(exp_Jz2, exp_Jx)
print("Finding Floquet Spectra")
e, u = np.linalg.eig(F)
print("Done")

import matplotlib as mpl
from mpl_toolkits.mplot3d import Axes3D
pxp_syms = model_sym_data(pxp, [translational(pxp)])

#compare against pxp projected to fsa
pxp2 = unlocking_System([0], "periodic", 2, N)
pxp2.gen_basis()

# a = 0.108

# a = 0.05
# H = Hamiltonian(pxp2)
# H.site_ops[1] = np.array([[0,1],[1,0]])
# H.model = np.array([[0,1,0],[0,0,1,0],[0,1,0,0]])
# H.model_coef = np.array([1,a,a])
# H.gen()

H = spin_Hamiltonian(pxp2, "x")
H.gen()

Hp = Hamiltonian(pxp2)
Hp.site_ops[1] = np.array([[0, 0], [1, 0]])
Hp.site_ops[2] = np.array([[0, 1], [0, 0]])
# Hp.model = np.array([[0,1,0],[0,2,0],[0,0,1,0],[0,1,0,0],[0,2,0,0],[0,0,2,0]])
# Hp.model_coef = np.array([1,1,a,a,a,a])
# Hp.uc_size = np.array([2,2,2,2,2,2])
# Hp.uc_pos = np.array([1,0,0,1,0,1])

Hp.model = np.array([[0, 1, 0], [0, 2, 0]])
Hp.model_coef = np.array([1, 1])
Hp.uc_size = np.array([2, 2])
Hp.uc_pos = np.array([1, 0])