You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good time;
I would like to apply TEBD to compute two-point correlation function for a 1D chain (PBC) with three-body interactions. Motivated by @jcmgray's suggestion in #67, and quimb document of https://quimb.readthedocs.io/en/latest/examples/ex_TEBD_evo.html)
I have tried to use TEBD2D through the following code:
importnumpyasnpimportquimbasquimportquimb.tensorasqtnL=5# number of qubitszeros='10'* (L//2) #devide the vector in three piecesbinary=zeros# the initial stateprint('psi0:', f"|{binary}>")
# Initial state is turned into a matrix product state using MPS_computational_state():psi0=qtn.MPS_computational_state(binary)
psi0.show() # prints ascii representation of stateI=qu.eye(2)
X=qu.pauli('X')
Z=qu.pauli('Z')
# the dense hamiltonian we are aiming forH_dense=sum(
qu.ikron([Z, X, Z], dims=[2] *L, inds=[i, i+1, i+2])
foriinrange(L-2)
)
H_dense=H_dense+sum(
qu.ikron([Z, X, Z], dims=[2] *L, inds=[l-2, l-1, l-L])
forlinrange(L, L+1)
)
H_dense=H_dense+sum(
qu.ikron([Z, X, Z], dims=[2] *L, inds=[k-1, k-L, k-L+1])
forkinrange(L, L+1)
)
H=qtn.LocalHam2D(L, 1, H_dense, H1=None)
# Setup TEBD object to find the evolved statetebd=qtn.TEBD2D(psi0, H)
# Setup parameters# times we are interested ints=np.linspace(0, 80, 101)
# compute the ZZ correlation on qubits 3 & 4mzz_t_j= []
# range of bonds, and sitesjs=np.arange(0, L)
bs=np.arange(1, L)
# generate the state at each time in ts# and target error 1e-3 for whole evolutionforpsitintebd.at_times(ts, tol=1e-3):
mzz_j= []
# there is one more site than bond, so start with mag# this also sets the orthog center to 0mzz_j+= [qu.pauli_correlation(psit, ss='ZZ', sysa=3, sysb=4)]
mzz_t_j+= [mz_j]
However, I get the following error: AttributeError: 'TEBD2D' object has no attribute 'at_times'
Would you please let me know how to resolve the issue?
Thanks a lot
The text was updated successfully, but these errors were encountered:
Good time;
I would like to apply TEBD to compute two-point correlation function for a 1D chain (PBC) with three-body interactions. Motivated by @jcmgray's suggestion in #67, and quimb document of
https://quimb.readthedocs.io/en/latest/examples/ex_TEBD_evo.html)
I have tried to use TEBD2D through the following code:
However, I get the following error: AttributeError: 'TEBD2D' object has no attribute 'at_times'
Would you please let me know how to resolve the issue?
Thanks a lot
The text was updated successfully, but these errors were encountered: