#include "matrix.h"
#include "common.h"
Go to the source code of this file.
|
| 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) |
| |
| 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) |
| |
◆ 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_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]