#include "apply_kernel_to_input.h"
#include "tbb/tbb.h"
#include <type_traits>
#include <utility>
Go to the source code of this file.
|
| template<typename MatrixT > |
| using | KernelComplexT = typename std::remove_reference< decltype(std::declval< MatrixT & >()[0])>::type |
| |
|
| void | apply_kernel_from_right (Matrix &u3_1qbit, Matrix &input, const int &target_qbit, const int &control_qbit, const int &matrix_size) |
| | Apply a 2x2 kernel from the right: input = input * U. More...
|
| |
| void | apply_kernel_from_right (Matrix_float &u3_1qbit, Matrix_float &input, const int &target_qbit, const int &control_qbit, const int &matrix_size) |
| |
| template<typename MatrixT > |
| void | apply_kernel_from_right_impl (MatrixT &u3_1qbit, MatrixT &input, const int &target_qbit, const int &control_qbit, const int &matrix_size) |
| |
| void | apply_kernel_to_input (Matrix &u3_1qbit, Matrix &input, const bool &deriv, const int &target_qbit, const int &control_qbit, const int &matrix_size) |
| | Call to apply kernel to apply single qubit gate kernel on an input matrix. More...
|
| |
| void | apply_kernel_to_input (Matrix_float &u3_1qbit, Matrix_float &input, const bool &deriv, const int &target_qbit, const int &control_qbit, const int &matrix_size) |
| |
| template<typename MatrixT > |
| void | apply_kernel_to_input_impl (MatrixT &u3_1qbit, MatrixT &input, const bool &deriv, const int &target_qbit, const int &control_qbit, const int &matrix_size) |
| |
◆ KernelComplexT
template<typename MatrixT >
| using KernelComplexT = typename std::remove_reference<decltype(std::declval<MatrixT&>()[0])>::type |
◆ apply_kernel_from_right() [1/2]
| void apply_kernel_from_right |
( |
Matrix & |
u3_1qbit, |
|
|
Matrix & |
input, |
|
|
const int & |
target_qbit, |
|
|
const int & |
control_qbit, |
|
|
const int & |
matrix_size |
|
) |
| |
Apply a 2x2 kernel from the right: input = input * U.
- Parameters
-
| u3_1qbit | The 2x2 kernel of the gate operation. |
| input | The input matrix on which the transformation is applied. |
| target_qbit | The target qubit on which the transformation should be applied. |
| control_qbit | The control qubit (-1 if there is no control qubit). |
| matrix_size | The full Hilbert-space dimension. |
Definition at line 182 of file apply_kernel_to_input.cpp.
◆ apply_kernel_from_right() [2/2]
◆ apply_kernel_from_right_impl()
template<typename MatrixT >
| void apply_kernel_from_right_impl |
( |
MatrixT & |
u3_1qbit, |
|
|
MatrixT & |
input, |
|
|
const int & |
target_qbit, |
|
|
const int & |
control_qbit, |
|
|
const int & |
matrix_size |
|
) |
| |
◆ apply_kernel_to_input() [1/2]
| void apply_kernel_to_input |
( |
Matrix & |
u3_1qbit, |
|
|
Matrix & |
input, |
|
|
const bool & |
deriv, |
|
|
const int & |
target_qbit, |
|
|
const int & |
control_qbit, |
|
|
const int & |
matrix_size |
|
) |
| |
Call to apply kernel to apply single qubit gate kernel on an input matrix.
- Parameters
-
| u3_1qbit | The 2x2 kernel of the gate operation |
| input | The input matrix on which the transformation is applied |
| deriv | Set true to apply derivate transformation, false otherwise |
| target_qbit | The targer qubit on which the transformation should be applied |
| control_qbit | The contron qubit (-1 if the is no control qubit) |
| matrix_size | The size of the input |
Definition at line 118 of file apply_kernel_to_input.cpp.
◆ apply_kernel_to_input() [2/2]
◆ apply_kernel_to_input_impl()
template<typename MatrixT >
| void apply_kernel_to_input_impl |
( |
MatrixT & |
u3_1qbit, |
|
|
MatrixT & |
input, |
|
|
const bool & |
deriv, |
|
|
const int & |
target_qbit, |
|
|
const int & |
control_qbit, |
|
|
const int & |
matrix_size |
|
) |
| |
Call to apply kernel to apply single qubit gate kernel on an input matrix
- Parameters
-
| u3_1qbit | The 2x2 kernel of the gate operation |
| input | The input matrix on which the transformation is applied |
| deriv | Set true to apply derivate transformation, false otherwise |
| target_qbit | The targer qubit on which the transformation should be applied |
| control_qbit | The contron qubit (-1 if the is no control qubit) |
| matrix_size | The size of the input |
Definition at line 35 of file apply_kernel_to_input.cpp.