Quantum Gate Decomposer  v1.3
Powerful decomposition of almost any unitary into U3 and CNOT gates
List of all members | Public Member Functions | Public Attributes
Random_Unitary Class Reference

A class to cerate general random unitary matrix according to arXiv:1303:5904v1. More...

#include <Random_Unitary.h>

Public Member Functions

Matrix Construct_Unitary_Matrix ()
 Call to create a random unitary. More...
 
Matrix Construct_Unitary_Matrix (double *vartheta, double *varphi, double *varkappa)
 Generates a unitary matrix from parameters vartheta, varphi, varkappa according to arXiv:1303:5904v1. More...
 
Matrix Construct_Unitary_Matrix (double *parameters)
 Generates a unitary matrix from parameters parameters according to arXiv:1303:5904v1. More...
 
int convert_indexes (int varalpha, int varbeta)
 Calculates an index from paramaters varalpha and varbeta. More...
 
Matrix E_alpha_beta (int varalpha, int varbeta)
 Implements matrix I below Eq (7) of arXiv:1303:5904v1. More...
 
double gamma ()
 Implements Eq (11) of arXiv:1303:5904v1. More...
 
Matrix I_alpha_beta (int varalpha, int varbeta)
 Implements matrix I below Eq (7) of arXiv:1303:5904v1. More...
 
double kronecker (int a, int b)
 Kronecker delta. More...
 
Matrix M (int varalpha, int varbeta, QGD_Complex16 s, QGD_Complex16 t)
 Implements Eq (8) of arXiv:1303:5904v1. More...
 
Matrix Omega (int varalpha, int varbeta, QGD_Complex16 x, QGD_Complex16 y)
 Eq (6) of arXiv:1303:5904v1. More...
 
Matrix Q (QGD_Complex16 u1, QGD_Complex16 u2)
 Implements Eq (9) of arXiv:1303:5904v1. More...
 
 Random_Unitary (int dim_in)
 Constructor of the class. More...
 

Public Attributes

int dim
 The number of rows in the created unitary. More...
 

Detailed Description

A class to cerate general random unitary matrix according to arXiv:1303:5904v1.

Definition at line 49 of file Random_Unitary.h.

Constructor & Destructor Documentation

◆ Random_Unitary()

Random_Unitary::Random_Unitary ( int  dim_in)

Constructor of the class.

Parameters
dim_inThe number of rows in the random unitary to be ceated.
Returns
An instance of the class

Definition at line 125 of file Random_Unitary.cpp.

Member Function Documentation

◆ Construct_Unitary_Matrix() [1/3]

Matrix Random_Unitary::Construct_Unitary_Matrix ( )

Call to create a random unitary.

Returns
Returns with a pointer to the created random unitary

Definition at line 142 of file Random_Unitary.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Construct_Unitary_Matrix() [2/3]

Matrix Random_Unitary::Construct_Unitary_Matrix ( double *  vartheta,
double *  varphi,
double *  varkappa 
)

Generates a unitary matrix from parameters vartheta, varphi, varkappa according to arXiv:1303:5904v1.

Parameters
varthetaarray of dim*(dim-1)/2 elements
varphiarray of dim*(dim-1)/2 elements
varkappaarray of dim-1 elements
Returns
Returns with a pointer to the generated unitary

Definition at line 188 of file Random_Unitary.cpp.

Here is the call graph for this function:

◆ Construct_Unitary_Matrix() [3/3]

Matrix Random_Unitary::Construct_Unitary_Matrix ( double *  parameters)

Generates a unitary matrix from parameters parameters according to arXiv:1303:5904v1.

Parameters
parametersarray of (dim+1)*(dim-1) elements
Returns
The constructed unitary

Definition at line 254 of file Random_Unitary.cpp.

Here is the call graph for this function:

◆ convert_indexes()

int Random_Unitary::convert_indexes ( int  varalpha,
int  varbeta 
)

Calculates an index from paramaters varalpha and varbeta.

Parameters
varalphaAn integer
varbetaAn integer
Returns
Returns with the calculated index.

Definition at line 243 of file Random_Unitary.cpp.

Here is the caller graph for this function:

◆ E_alpha_beta()

Matrix Random_Unitary::E_alpha_beta ( int  varalpha,
int  varbeta 
)

Implements matrix I below Eq (7) of arXiv:1303:5904v1.

Parameters
varalphaAn integer
varbetaAn integer
Returns
Return with a pointer to the calculated E matrix of Eq. (7) of arXiv:1303:5904v1

Definition at line 362 of file Random_Unitary.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gamma()

double Random_Unitary::gamma ( )

Implements Eq (11) of arXiv:1303:5904v1.

Returns
Returns eith the value of gamma

Definition at line 397 of file Random_Unitary.cpp.

Here is the caller graph for this function:

◆ I_alpha_beta()

Matrix Random_Unitary::I_alpha_beta ( int  varalpha,
int  varbeta 
)

Implements matrix I below Eq (7) of arXiv:1303:5904v1.

Parameters
varalphaAn integer
varbetaAn integer
Returns
Return with a pointer to the calculated I matrix of Eq. (7) of arXiv:1303:5904v1

Definition at line 379 of file Random_Unitary.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kronecker()

double Random_Unitary::kronecker ( int  a,
int  b 
)

Kronecker delta.

Parameters
aAn integer
bAn integer
Returns
Returns with the Kronecker delta value of a and b.

Definition at line 411 of file Random_Unitary.cpp.

Here is the caller graph for this function:

◆ M()

Matrix Random_Unitary::M ( int  varalpha,
int  varbeta,
QGD_Complex16  s,
QGD_Complex16  t 
)

Implements Eq (8) of arXiv:1303:5904v1.

Parameters
varalphaAn integer
varbetaAn integer
sA complex number
tA complex number
Returns
Return with a pointer to the calculated M matrix of Eq. (8) of arXiv:1303:5904v1

Definition at line 306 of file Random_Unitary.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Omega()

Matrix Random_Unitary::Omega ( int  varalpha,
int  varbeta,
QGD_Complex16  x,
QGD_Complex16  y 
)

Eq (6) of arXiv:1303:5904v1.

Parameters
varalphaAn integer
varbetaAn integer
xA complex number
yA complex number
Returns
Return with a pointer to the calculated Omega matrix of Eq. (6) of arXiv:1303:5904v1

Definition at line 268 of file Random_Unitary.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Q()

Matrix Random_Unitary::Q ( QGD_Complex16  u1,
QGD_Complex16  u2 
)

Implements Eq (9) of arXiv:1303:5904v1.

Parameters
u1A complex number
u2A complex number
Returns
Return with a pointer to the calculated Q matrix of Eq. (9) of arXiv:1303:5904v1

Definition at line 340 of file Random_Unitary.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ dim

int Random_Unitary::dim

The number of rows in the created unitary.

Definition at line 54 of file Random_Unitary.h.


The documentation for this class was generated from the following files: