Operation * clone()
Call to create a clone of the present class.
Base class for the representation of one- and two-qubit operations.
int target_qbit
The index of the qubit on which the operation acts (target_qbit >= 0)
int control_qbit
The index of the qubit which acts as a control qubit (control_qbit >= 0) in controlled operations.
Operation()
Default constructor of the class.
int get_target_qbit()
Call to get the index of the target qubit.
Matrix matrix_alloc
Matrix of the operation.
int matrix_size
The size N of the NxN matrix associated with the operations.
virtual void reorder_qubits(std::vector< int > qbit_list)
Call to reorder the qubits in the matrix of the operation.
operation_type type
The type of the operation (see enumeration operation_type)
int get_qbit_num()
Call to get the number of qubits composing the unitary.
virtual ~Operation()
Destructor of the class.
int qbit_num
number of qubits spanning the matrix of the operation
unsigned int parameter_num
the number of free parameters of the operation
Matrix get_matrix()
Call to retrieve the operation matrix.
Class to store data of complex arrays and its properties.
unsigned int get_parameter_num()
Call to get the number of free parameters.
void set_matrix(Matrix input)
Call to set the stored matrix in the operation.
operation_type get_type()
Call to get the type of the operation.
virtual void set_qbit_num(int qbit_num_in)
Set the number of qubits spanning the matrix of the operation.
Header file for commonly used functions and wrappers to CBLAS functions.
int get_control_qbit()
Call to get the index of the control qubit.
operation_type
Type definition of operation types (also generalized for decomposition classes derived from the class...