ca14ae065b90a5aae6f282d84b16af60a465c115,examples/01_Ising/quantum_ising_chain.py,TransverseFieldIsingChain,Randomize,#TransverseFieldIsingChain#Any#,47
Before Change
v=np.zeros((self.nc,N))
for i in range(v.shape[0]):
for j in range(N):
if (random.random()>0.5):
v[i,j]=1.0
else:
v[i,j]=0.0
After Change
s[:, i] *= -1.0
def Randomize(self, N):
p = torch.ones(self.nc, N) * 0.5
return torch.bernoulli(p)
def Run(self, nn_state, n_eq=100, show_convergence=False):
v = self.Randomize(nn_state.num_visible).to(dtype=torch.double,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: PIQuIL/QuCumber
Commit Name: ca14ae065b90a5aae6f282d84b16af60a465c115
Time: 2018-08-05
Author: emerali@users.noreply.github.com
File Name: examples/01_Ising/quantum_ising_chain.py
Class Name: TransverseFieldIsingChain
Method Name: Randomize
Project Name: arraiy/torchgeometry
Commit Name: 04c54ccfc4aec86479a032c0b84615da8189de4b
Time: 2019-11-01
Author: edgar.riba@gmail.com
File Name: test/color/test_core.py
Class Name: TestAddWeighted
Method Name: test_gradcheck
Project Name: arraiy/torchgeometry
Commit Name: 5c9356d3dbcd44c3cd7f833651a3b542250c2699
Time: 2020-11-30
Author: edgar.riba@gmail.com
File Name: test/enhance/test_core.py
Class Name: TestAddWeighted
Method Name: test_gradcheck