updated libquantum 0.2.1 source files

This commit is contained in:
libquantum
2016-10-27 04:14:06 +09:00
parent dc03271227
commit ce2bb44638
22 changed files with 473 additions and 346 deletions

View File

@@ -26,24 +26,6 @@
#include "complex.h"
#include "config.h"
/* Return the real part of a complex number */
float
quantum_real(COMPLEX_FLOAT a)
{
float *p = (float *) &a;
return p[0];
}
/* Return the imaginary part of a complex number */
float
quantum_imag(COMPLEX_FLOAT a)
{
float *p = (float *) &a;
return p[1];
}
/* Return the complex conjugate of a complex number */
COMPLEX_FLOAT
@@ -62,7 +44,7 @@ quantum_conj(COMPLEX_FLOAT a)
float
quantum_prob(COMPLEX_FLOAT a)
{
return (float) (a * quantum_conj(a));
return quantum_prob_inline(a);
}
/* Calculate e^(i * phi) */