Sequential Quantum Gate Decomposer  v1.9.6
Powerful decomposition of general unitarias into one- and two-qubit gates gates
Functions
apply_kernel_to_input_AVX.h File Reference
#include "matrix.h"
#include "matrix_float.h"
#include "common.h"
Include dependency graph for apply_kernel_to_input_AVX.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void apply_kernel_from_right_AVX (Matrix &u3_1qbit, Matrix &input, const int &target_qbit, const int &control_qbit, const int &matrix_size)
 AVX kernel: apply 2x2 gate from the right (input = input * U), row-major f64. More...
 
void apply_kernel_from_right_AVX32 (Matrix_float &u3_1qbit, Matrix_float &input, const int &target_qbit, const int &control_qbit, const int &matrix_size)
 AVX kernel: apply 2x2 gate from the right (input = input * U), row-major f32. More...
 
void apply_kernel_from_right_AVX_parallel (Matrix &u3_1qbit, Matrix &input, const int &target_qbit, const int &control_qbit, const int &matrix_size)
 Parallel AVX kernel: apply 2x2 gate from the right (input = input * U), f64. More...
 
void apply_kernel_from_right_AVX_parallel32 (Matrix_float &u3_1qbit, Matrix_float &input, const int &target_qbit, const int &control_qbit, const int &matrix_size)
 Parallel AVX kernel: apply 2x2 gate from the right (input = input * U), f32. More...
 
void apply_kernel_from_right_AVX_small (Matrix &u3_1qbit, Matrix &input, const int &target_qbit, const int &control_qbit, const int &matrix_size)
 
void apply_kernel_from_right_AVX_small32 (Matrix_float &u3_1qbit, Matrix_float &input, const int &target_qbit, const int &control_qbit, const int &matrix_size)
 
void apply_kernel_to_input_AVX (Matrix &u3_1qbit, Matrix &input, const bool &deriv, const int &target_qbit, const int &control_qbit, const int &matrix_size)
 AVX kernel to apply single qubit gate kernel on an input matrix (single threaded) More...
 
void apply_kernel_to_input_AVX32 (Matrix_float &u3_1qbit, Matrix_float &input, const bool &deriv, const int &target_qbit, const int &control_qbit, const int &matrix_size)
 
void apply_kernel_to_input_AVX_parallel (Matrix &u3_1qbit, Matrix &input, const bool &deriv, const int &target_qbit, const int &control_qbit, const int &matrix_size)
 Parallel AVX kernel to apply single qubit gate kernel on an input matrix. More...
 
void apply_kernel_to_input_AVX_parallel32 (Matrix_float &u3_1qbit, Matrix_float &input, const bool &deriv, const int &target_qbit, const int &control_qbit, const int &matrix_size)
 
void apply_kernel_to_input_AVX_small (Matrix &u3_1qbit, Matrix &input, const bool &deriv, const int &target_qbit, const int &control_qbit, const int &matrix_size)
 AVX kernel to apply single qubit gate kernel on an input matrix (efficient for small inputs) More...
 
void apply_kernel_to_input_AVX_small32 (Matrix_float &u3_1qbit, Matrix_float &input, const bool &deriv, const int &target_qbit, const int &control_qbit, const int &matrix_size)
 

Function Documentation

◆ apply_kernel_from_right_AVX()

void apply_kernel_from_right_AVX ( Matrix u3_1qbit,
Matrix input,
const int target_qbit,
const int control_qbit,
const int matrix_size 
)

AVX kernel: apply 2x2 gate from the right (input = input * U), row-major f64.

Parameters
u3_1qbit2x2 gate kernel.
inputMatrix to transform in-place.
target_qbitTarget qubit index.
control_qbitControl qubit (-1 = none).
matrix_sizeFull Hilbert-space dimension.

Definition at line 1015 of file apply_kernel_to_input_AVX.cpp.

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

◆ apply_kernel_from_right_AVX32()

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

AVX kernel: apply 2x2 gate from the right (input = input * U), row-major f32.

Same structure as the f64 version; uses fmaddsub_ps for compact complex multiply.

Definition at line 1307 of file apply_kernel_to_input_AVX.cpp.

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

◆ apply_kernel_from_right_AVX_parallel()

void apply_kernel_from_right_AVX_parallel ( Matrix u3_1qbit,
Matrix input,
const int target_qbit,
const int control_qbit,
const int matrix_size 
)

Parallel AVX kernel: apply 2x2 gate from the right (input = input * U), f64.

Parallelises over rows using TBB; each task processes a contiguous row range.

Definition at line 1163 of file apply_kernel_to_input_AVX.cpp.

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

◆ apply_kernel_from_right_AVX_parallel32()

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

Parallel AVX kernel: apply 2x2 gate from the right (input = input * U), f32.

Parallelises over rows using TBB.

Definition at line 1413 of file apply_kernel_to_input_AVX.cpp.

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

◆ apply_kernel_from_right_AVX_small()

void apply_kernel_from_right_AVX_small ( Matrix u3_1qbit,
Matrix input,
const int target_qbit,
const int control_qbit,
const int matrix_size 
)

Definition at line 288 of file apply_kernel_to_input_AVX.cpp.

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

◆ apply_kernel_from_right_AVX_small32()

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

Definition at line 411 of file apply_kernel_to_input_AVX.cpp.

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

◆ apply_kernel_to_input_AVX()

void apply_kernel_to_input_AVX ( Matrix u3_1qbit,
Matrix input,
const bool deriv,
const int target_qbit,
const int control_qbit,
const int matrix_size 
)

AVX kernel to apply single qubit gate kernel on an input matrix (single threaded)

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 666 of file apply_kernel_to_input_AVX.cpp.

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

◆ apply_kernel_to_input_AVX32()

void apply_kernel_to_input_AVX32 ( 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 505 of file apply_kernel_to_input_AVX.cpp.

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

◆ apply_kernel_to_input_AVX_parallel()

void apply_kernel_to_input_AVX_parallel ( Matrix u3_1qbit,
Matrix input,
const bool deriv,
const int target_qbit,
const int control_qbit,
const int matrix_size 
)

Parallel AVX 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 818 of file apply_kernel_to_input_AVX.cpp.

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

◆ apply_kernel_to_input_AVX_parallel32()

void apply_kernel_to_input_AVX_parallel32 ( 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 577 of file apply_kernel_to_input_AVX.cpp.

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

◆ apply_kernel_to_input_AVX_small()

void apply_kernel_to_input_AVX_small ( Matrix u3_1qbit,
Matrix input,
const bool deriv,
const int target_qbit,
const int control_qbit,
const int matrix_size 
)

AVX kernel to apply single qubit gate kernel on an input matrix (efficient for small inputs)

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 38 of file apply_kernel_to_input_AVX.cpp.

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

◆ apply_kernel_to_input_AVX_small32()

void apply_kernel_to_input_AVX_small32 ( 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 216 of file apply_kernel_to_input_AVX.cpp.

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