Skip to content

Commit

Permalink
fixed a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
daknuett committed Apr 4, 2020
1 parent 782f3d1 commit 51efe19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pyqcs/gates/implementations/basic_gates.c
Expand Up @@ -162,13 +162,13 @@ ufunc_H( char ** args

if(!(i & (1 << argument.act)))
{
// This is the |1> state. Just add up.
// This is the |0> state. Just add up.
qm_out[i].real = (qm_in[i].real + qm_in[not_index].real) * M_SQRT1_2;
qm_out[i].imag = (qm_in[i].imag + qm_in[not_index].imag) * M_SQRT1_2;
}
else
{
// This is the |0> state. Subtract the |0> amplitude from the |1> amplitude.
// This is the |1> state. Subtract the |1> amplitude from the |0> amplitude.
qm_out[i].real = (qm_in[not_index].real - qm_in[i].real) * M_SQRT1_2;
qm_out[i].imag = (qm_in[not_index].imag - qm_in[i].imag) * M_SQRT1_2;

Expand Down

0 comments on commit 51efe19

Please sign in to comment.