Sequential Quantum Gate Decomposer  v1.9.3
Powerful decomposition of general unitarias into one- and two-qubit gates gates
Functions
Gates_block.cpp File Reference

Class responsible for grouping gates into subcircuits. (Subcircuits can be nested) More...

#include "CZ.h"
#include "CH.h"
#include "CNOT.h"
#include "U1.h"
#include "U2.h"
#include "U3.h"
#include "RX.h"
#include "RY.h"
#include "R.h"
#include "CRY.h"
#include "RZ.h"
#include "H.h"
#include "X.h"
#include "Y.h"
#include "Z.h"
#include "T.h"
#include "Tdg.h"
#include "SX.h"
#include "SYC.h"
#include "UN.h"
#include "ON.h"
#include "CROT.h"
#include "Adaptive.h"
#include "CZ_NU.h"
#include "Composite.h"
#include "Gates_block.h"
#include "custom_kernel_1qubit_gate.h"
#include "apply_large_kernel_to_input.h"
Include dependency graph for Gates_block.cpp:

Go to the source code of this file.

Functions

void export_gate_list_to_binary (Matrix_real &parameters, Gates_block *gates_block, const std::string &filename, int verbosity)
 ????????? More...
 
void export_gate_list_to_binary (Matrix_real &parameters, Gates_block *gates_block, FILE *pFile, int verbosity)
 ????????? More...
 
Gates_blockimport_gate_list_from_binary (Matrix_real &parameters, const std::string &filename, int verbosity)
 ????????? More...
 
Gates_blockimport_gate_list_from_binary (Matrix_real &parameters, FILE *pFile, int verbosity)
 ????????? More...
 
Matrix_real inverse_reverse_parameters (const Matrix_real &parameters_in, std::vector< Gate *>::iterator gates_it, int num_of_gates)
 Call to inverse-reverse the order of the parameters in an array. More...
 
bool is_qbit_present (std::vector< int > involved_qubits, int new_qbit, int num_of_qbits)
 Call to check whether the given qubit is involved in the sub-circuit or not. More...
 
std::vector< intremove_list_intersection (std::vector< int > &list1, std::vector< int > &list2)
 Call to remove those integer elements from list1 which are present in list. More...
 
Matrix_real reverse_parameters (const Matrix_real &parameters_in, std::vector< Gate *>::iterator gates_it, int num_of_gates)
 Call to reverse the order of the parameters in an array. More...
 

Detailed Description

Class responsible for grouping gates into subcircuits. (Subcircuits can be nested)

Class responsible for grouping two-qubit (CNOT,CZ,CH) and one-qubit gates into layers.

Definition in file Gates_block.cpp.

Function Documentation

◆ export_gate_list_to_binary() [1/2]

void export_gate_list_to_binary ( Matrix_real parameters,
Gates_block gates_block,
const std::string &  filename,
int  verbosity 
)

?????????

Returns
Return with ?????????

Definition at line 3856 of file Gates_block.cpp.

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

◆ export_gate_list_to_binary() [2/2]

void export_gate_list_to_binary ( Matrix_real parameters,
Gates_block gates_block,
FILE *  pFile,
int  verbosity 
)

?????????

Returns
Return with ?????????

Definition at line 3884 of file Gates_block.cpp.

Here is the call graph for this function:

◆ import_gate_list_from_binary() [1/2]

Gates_block* import_gate_list_from_binary ( Matrix_real parameters,
const std::string &  filename,
int  verbosity 
)

?????????

Returns
Return with ?????????

Definition at line 3971 of file Gates_block.cpp.

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

◆ import_gate_list_from_binary() [2/2]

Gates_block* import_gate_list_from_binary ( Matrix_real parameters,
FILE *  pFile,
int  verbosity 
)

?????????

Returns
Return with ?????????

Definition at line 3995 of file Gates_block.cpp.

Here is the call graph for this function:

◆ inverse_reverse_parameters()

Matrix_real inverse_reverse_parameters ( const Matrix_real parameters_in,
std::vector< Gate *>::iterator  gates_it,
int  num_of_gates 
)

Call to inverse-reverse the order of the parameters in an array.

Parameters
parameters_inThe real input vector.
gates_itIterator over the gates. (does not get reversed)
Returns
Return with the reversed array

Definition at line 4457 of file Gates_block.cpp.

Here is the call graph for this function:

◆ is_qbit_present()

bool is_qbit_present ( std::vector< int involved_qubits,
int  new_qbit,
int  num_of_qbits 
)

Call to check whether the given qubit is involved in the sub-circuit or not.

Parameters
involved_qubitsA list of qubits
new_qbitThe qubit to be checked
num_of_qbitsThe number of qubits.

Definition at line 379 of file Gates_block.cpp.

Here is the caller graph for this function:

◆ remove_list_intersection()

std::vector<int> remove_list_intersection ( std::vector< int > &  list1,
std::vector< int > &  list2 
)

Call to remove those integer elements from list1 which are present in list.

Parameters
list1A list of integers
list2A list of integers
Returns
Returns with the reduced list determined from list1.

Definition at line 2698 of file Gates_block.cpp.

Here is the caller graph for this function:

◆ reverse_parameters()

Matrix_real reverse_parameters ( const Matrix_real parameters_in,
std::vector< Gate *>::iterator  gates_it,
int  num_of_gates 
)

Call to reverse the order of the parameters in an array.

Parameters
parameters_inThe real input vector.
gates_itIterator over the gates. (does not get reversed)
Returns
Return with the reversed array

Definition at line 4359 of file Gates_block.cpp.

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