Classes | Typedefs | Functions | Variables

QuCoSi Namespace Reference

Classes

class  Gate
 Single- and multi-qubit gate of varying complexity. More...
class  Qubit
class  Vector
 Dynamic size vector of complex numbers. More...

Typedefs

typedef double fptype
typedef std::complex< fptypefield
typedef Eigen::Matrix< field,
Eigen::Dynamic, 1 > 
VectorXc
typedef Eigen::Matrix< field,
Eigen::Dynamic, Eigen::Dynamic > 
MatrixXc

Functions

bool is_zero (const fptype x)
 Checks if x is approximately zero.
bool is_one (const fptype x)
 Checks if x is approximately one.
int log2 (const unsigned value)
 Computes the binary logarithm of the integer value.
int bwise_bin_dot (const long x, const long y)
 Computes the modulo-2 sum of the products of corresponding bits of the integers x and y.

Variables

const double c_pi
const double c_sqrt1_2

Typedef Documentation

typedef double QuCoSi::fptype

Definition at line 31 of file Aux.

typedef std::complex<fptype> QuCoSi::field

Definition at line 32 of file Aux.

typedef Eigen::Matrix<field, Eigen::Dynamic, 1> QuCoSi::VectorXc

Definition at line 33 of file Aux.

typedef Eigen::Matrix<field, Eigen::Dynamic, Eigen::Dynamic> QuCoSi::MatrixXc

Definition at line 34 of file Aux.


Function Documentation

bool QuCoSi::is_zero ( const fptype  x  )  [inline]

Checks if x is approximately zero.

Returns:
true if x is approximately zero

Definition at line 40 of file Aux.

Here is the caller graph for this function:

bool QuCoSi::is_one ( const fptype  x  )  [inline]

Checks if x is approximately one.

Returns:
true if x is approximately one

Definition at line 49 of file Aux.

Here is the call graph for this function:

Here is the caller graph for this function:

int QuCoSi::log2 ( const unsigned  value  )  [inline]

Computes the binary logarithm of the integer value.

Returns:
the binary logarithm of value and -1 if value == 0

Definition at line 58 of file Aux.

Here is the caller graph for this function:

int QuCoSi::bwise_bin_dot ( const long  x,
const long  y 
) [inline]

Computes the modulo-2 sum of the products of corresponding bits of the integers x and y.

Let x and y be positive integers and $x_i, y_i$ are the bits of x and y in the binary numeral system (that is $x = \sum_{i=0}^n x_i \, 2^i $), then this function computes the modulo-2 sum of the products of corresponding bits of x and y denoted by $x \cdot y$:

\[ x \cdot y = \bigoplus_{i=0}^n x_i \, y_i = x_0 \, y_0 \oplus x_1 \, y_1 \oplus \ldots \oplus x_n \, y_n \ . \]

Returns:
the modulo-2 sum of the products of corresponding bits of x and y

Definition at line 82 of file Aux.


Variable Documentation

const double QuCoSi::c_pi
Initial value:
  3.141592653589793238462643383279502884197169399375105820974944

Definition at line 26 of file Aux.

const double QuCoSi::c_sqrt1_2
Initial value:
  0.707106781186547524400844362104849039284835937688474036588339

Definition at line 28 of file Aux.

 All Classes Namespaces Files Functions Variables Typedefs