6 T::T(
int qbit_num_in,
int target_qbit_in) :
U3(qbit_num_in, target_qbit_in) {
24 return t_gate_kernel<Matrix, double>();
28 return t_gate_kernel<Matrix_float, float>();
32 return tdg_gate_kernel<Matrix, double>();
36 return tdg_gate_kernel<Matrix_float, float>();
40 t_gate_kernel_to<Matrix, double>(
output);
44 t_gate_kernel_to<Matrix_float, float>(
output);
48 tdg_gate_kernel_to<Matrix, double>(
output);
52 tdg_gate_kernel_to<Matrix_float, float>(
output);
std::vector< Gate * > parents
list of parent gates to be applied in the circuit prior to this current gate
Copyright (C) Miklos Maroti, 2021 SPDX-License-Identifier: Apache-2.0.
virtual Matrix gate_kernel(const Matrix_real ¶meters) override
Compute the gate kernel matrix from precomputed trigonometric values.
Class to store single-precision real arrays and properties.
int control_qbit
The index of the qubit which acts as a control qubit (control_qbit >= 0) in controlled operations...
void set_children(std::vector< Gate *> &children_)
Call to set the children of the current gate.
int target_qbit
The index of the qubit on which the operation acts (target_qbit >= 0)
virtual T * clone() override
Call to create a clone of the present class.
gate_type type
The type of the operation (see enumeration gate_type)
virtual void inverse_gate_kernel_to(const Matrix_real ¶meters, Matrix &output) override
void set_parameter_start_idx(int start_idx)
Call to set the starting index of the parameters in the parameter array corresponding to the circuit ...
int get_parameter_start_idx()
Call to get the starting index of the parameters in the parameter array corresponding to the circuit ...
Double-precision complex matrix (float64).
std::string name
A string labeling the gate operation.
Single-precision complex matrix (float32).
std::vector< Gate * > children
list of child gates to be applied after this current gate
int parameter_num
the number of free parameters of the operation
virtual Matrix inverse_gate_kernel(const Matrix_real ¶meters) override
void set_parents(std::vector< Gate *> &parents_)
Call to set the parents of the current gate.
int qbit_num
number of qubits spanning the matrix of the operation
virtual void gate_kernel_to(const Matrix_real ¶meters, Matrix &output) override
Class to store data of complex arrays and its properties.