63 U3(
int qbit_num_in,
int target_qbit_in,
bool theta_in,
bool phi_in,
bool lambda_in);
A class representing a U3 operation.
Base class for the representation of one- and two-qubit operations.
int composite_u3_Lambda(const double *parameters, Matrix &U3_matrix)
Calculate the matrix of a U3 gate operation corresponding to the given parameters acting on the space...
int composite_u3_Theta_Lambda(const double *parameters, Matrix &U3_matrix)
Calculate the matrix of a U3 gate operation corresponding to the given parameters acting on the space...
int * indexes_target_qubit_0
the base indices of the target qubit for state |0>
void determine_base_indices()
Determine the base indices corresponding to the target qubit states |0> and |1>
Header file for a class for the representation of one- and two-qubit operations.
void get_optimized_parameters(double *parameters_in)
Call to get the final optimized parameters of the operation.
Matrix calc_one_qubit_u3(double Theta, double Phi, double Lambda)
Calculate the matrix of a U3 gate operation corresponding to the given parameters acting on a single ...
void set_optimized_parameters(double Theta, double Phi, double Lambda)
Call to set the final optimized parameters of the operation.
int composite_u3_Theta_Phi_Lambda(const double *parameters, Matrix &U3_matrix)
Calculate the matrix of a U3 gate operation corresponding to the given parameters acting on the space...
bool is_theta_parameter()
Call to check whether theta is a free parameter of the gate.
void reorder_qubits(std::vector< int > qbit_list)
Call to reorder the qubits in the matrix of the operation.
U3 * clone()
Call to create a clone of the present class.
int composite_u3_Phi_Lambda(const double *parameters, Matrix &U3_matrix)
Calculate the matrix of a U3 gate operation corresponding to the given parameters acting on the space...
U3(int qbit_num_in, int target_qbit_in, bool theta_in, bool phi_in, bool lambda_in)
Constructor of the class.
QGD_Complex16 * composite_u3(double Theta, double Phi, double Lambda)
Calculate the matrix of a U3 gate operation corresponding corresponding to the given parameters actin...
int composite_u3_Theta(const double *parameters, Matrix &U3_matrix)
Calculate the matrix of a U3 gate operation corresponding to the given parameters acting on the space...
bool phi
logical value indicating whether the matrix creation takes an argument phi
int * indexes_target_qubit_1
the base indices of the target qubit for state |1>
Structure type representing complex numbers in the QGD package.
Matrix get_matrix()
Call to retrieve the operation matrix.
Class to store data of complex arrays and its properties.
bool theta
logical value indicating whether the matrix creation takes an argument theta
~U3()
Destructor of the class.
bool is_lambda_parameter()
Call to check whether Lambda is a free parameter of the gate.
bool is_phi_parameter()
Call to check whether Phi is a free parameter of the gate.
bool lambda
logical value indicating whether the matrix creation takes an argument lambda
double * parameters
Parameters theta, phi, lambda of the U3 operation after the decomposition of the unitary is done.
int composite_u3_Phi(const double *parameters, Matrix &U3_matrix)
Calculate the matrix of a U3 gate operation corresponding to the given parameters acting on the space...
void set_qbit_num(int qbit_num_in)
Call to set the number of qubits spanning the matrix of the operation.
int composite_u3_Theta_Phi(const double *parameters, Matrix &U3_matrix)
Calculate the matrix of a U3 gate operation corresponding to the given parameters acting on the space...