def unitary_ASB2016_init(shape, name=None):
assert shape[0]==shape[1]
N=shape[1]
theta = initializations.uniform((3,N),scale=np.pi,name='{}_theta'.format(name))
reflection = initializations.glorot_uniform((2,2*N),name='{}_reflection'.format(name))
idxperm = np.random.permutation(N)
idxpermaug = np.concatenate((idxperm,N+idxperm))
Iaug=augLeft(np.concatenate((np.eye(N),np.zeros((N,N))),axis=0),module=np).astype(np.float32)
Uaug=times_unitary_ASB2016(Iaug,N,[theta,reflection,idxpermaug])
return Uaug,theta,reflection,idxpermaug
评论列表
文章目录