updated libquantum 1.1.1 source files

This commit is contained in:
libquantum
2016-10-27 04:32:19 +09:00
parent 701c63cdc4
commit 1a998a6b26
28 changed files with 4053 additions and 3995 deletions

View File

@@ -114,13 +114,13 @@ quantum_decohere(quantum_reg *reg)
for(j=0; j<reg->width; j++)
{
if(reg->node[i].state & ((MAX_UNSIGNED) 1 << j))
if(reg->state[i] & ((MAX_UNSIGNED) 1 << j))
angle += nrands[j];
else
angle -= nrands[j];
}
reg->node[i].amplitude *= quantum_cexp(angle);
reg->amplitude[i] *= quantum_cexp(angle);
}
free(nrands);