Sequential Quantum Gate Decomposer  v1.9.6
Powerful decomposition of general unitarias into one- and two-qubit gates gates
Typedefs | Functions
apply_kernel_to_input.cpp File Reference
#include "apply_kernel_to_input.h"
#include "tbb/tbb.h"
#include <type_traits>
#include <utility>
Include dependency graph for apply_kernel_to_input.cpp:

Go to the source code of this file.

Typedefs

template<typename MatrixT >
using KernelComplexT = typename std::remove_reference< decltype(std::declval< MatrixT & >()[0])>::type
 

Functions

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)
 

Typedef Documentation

◆ KernelComplexT

template<typename MatrixT >
using KernelComplexT = typename std::remove_reference<decltype(std::declval<MatrixT&>()[0])>::type

Definition at line 31 of file apply_kernel_to_input.cpp.

Function Documentation

◆ 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_1qbitThe 2x2 kernel of the gate operation.
inputThe input matrix on which the transformation is applied.
target_qbitThe target qubit on which the transformation should be applied.
control_qbitThe control qubit (-1 if there is no control qubit).
matrix_sizeThe full Hilbert-space dimension.

Definition at line 182 of file apply_kernel_to_input.cpp.

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

◆ apply_kernel_from_right() [2/2]

void apply_kernel_from_right ( Matrix_float u3_1qbit,
Matrix_float input,
const int target_qbit,
const int control_qbit,
const int matrix_size 
)

Definition at line 188 of file apply_kernel_to_input.cpp.

Here is the call graph for this function:

◆ 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 
)

Definition at line 131 of file apply_kernel_to_input.cpp.

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

◆ 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_1qbitThe 2x2 kernel of the gate operation
inputThe input matrix on which the transformation is applied
derivSet true to apply derivate transformation, false otherwise
target_qbitThe targer qubit on which the transformation should be applied
control_qbitThe contron qubit (-1 if the is no control qubit)
matrix_sizeThe size of the input

Definition at line 118 of file apply_kernel_to_input.cpp.

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

◆ apply_kernel_to_input() [2/2]

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 
)

Definition at line 124 of file apply_kernel_to_input.cpp.

Here is the call graph for this function:

◆ 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_1qbitThe 2x2 kernel of the gate operation
inputThe input matrix on which the transformation is applied
derivSet true to apply derivate transformation, false otherwise
target_qbitThe targer qubit on which the transformation should be applied
control_qbitThe contron qubit (-1 if the is no control qubit)
matrix_sizeThe size of the input

Definition at line 35 of file apply_kernel_to_input.cpp.

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