mirror of
https://github.com/libquantum/libquantum.git
synced 2025-10-03 08:42:01 +00:00
updated libquantum 1.1.1 source files
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user