|
Sequential Quantum Gate Decomposer
v1.9.6
Powerful decomposition of general unitarias into one- and two-qubit gates gates
|
Header file for the paralleized calculation of the cost function of the final optimization problem (supporting TBB and OpenMP). More...
#include "common.h"#include "matrix_real.h"#include "matrix_real_float.h"#include "matrix_float.h"#include <tbb/combinable.h>#include "logging.h"

Go to the source code of this file.
Classes | |
| class | functor_cost_fnc |
| Function operator class to calculate the partial cost function of the final optimization process. More... | |
Functions | |
| double | get_cost_function (const Matrix &matrix, int trace_offset=0) |
| Call co calculate the cost function during the final optimization process. More... | |
| double | get_cost_function (const Matrix_float &matrix, int trace_offset=0) |
| double | get_cost_function_sum_of_squares (Matrix &matrix) |
| Matrix_real | get_cost_function_with_correction (const Matrix &matrix, int qbit_num, int trace_offset=0) |
| Call co calculate the cost function of the optimization process, and the first correction to the cost finction according to https://arxiv.org/pdf/2210.09191.pdf. More... | |
| Matrix_real_float | get_cost_function_with_correction (const Matrix_float &matrix, int qbit_num, int trace_offset=0) |
| Matrix_real | get_cost_function_with_correction2 (const Matrix &matrix, int qbit_num, int trace_offset=0) |
| Call co calculate the cost function of the optimization process, and the first correction to the cost finction according to https://arxiv.org/pdf/2210.09191.pdf. More... | |
| Matrix_real_float | get_cost_function_with_correction2 (const Matrix_float &matrix, int qbit_num, int trace_offset=0) |
| Matrix | get_deriv_osr_entanglement (Matrix &matrix, std::vector< std::vector< int >> &use_cuts, int rank=-1, bool use_softmax=false) |
| Matrix_float | get_deriv_osr_entanglement (Matrix_float &matrix, std::vector< std::vector< int >> &use_cuts, int rank=-1, bool use_softmax=false) |
| Matrix | get_deriv_sum_of_squares (Matrix &matrix) |
| double | get_hilbert_schmidt_test (Matrix &matrix) |
| Call co calculate the cost function of the optimization process according to https://arxiv.org/pdf/2210.09191.pdf. More... | |
| double | get_hilbert_schmidt_test (Matrix_float &matrix) |
| double | get_infidelity (Matrix &matrix) |
| Call to calculate infidelity. More... | |
| double | get_infidelity (Matrix_float &matrix) |
| double | get_osr_entanglement_test (Matrix &matrix, std::vector< std::vector< int >> &use_cuts, int rank=-1, bool use_softmax=false) |
| double | get_osr_entanglement_test (Matrix_float &matrix, std::vector< std::vector< int >> &use_cuts, int rank=-1, bool use_softmax=false) |
| QGD_Complex16 | get_trace (Matrix &matrix) |
| Call to calculate the real and imaginary parts of the trace. More... | |
| QGD_Complex16 | get_trace (Matrix_float &matrix) |
| Matrix | get_trace_with_correction (Matrix &matrix, int qbit_num) |
| Call co calculate the Hilbert Schmidt testof the optimization process, and the first correction to the cost finction according to https://arxiv.org/pdf/2210.09191.pdf. More... | |
| Matrix | get_trace_with_correction2 (Matrix &matrix, int qbit_num) |
| Call co calculate the Hilbert Schmidt testof the optimization process, and the first correction to the cost finction according to https://arxiv.org/pdf/2210.09191.pdf. More... | |
| std::pair< int, double > | operator_schmidt_rank (const Matrix &U, int n, const std::vector< int > &A_qubits, double Fnorm, double tol=1e-10) |
| std::pair< int, double > | operator_schmidt_rank (const Matrix_float &U, int n, const std::vector< int > &A_qubits, double Fnorm, double tol=1e-10) |
| double | real_trace_conj_dot (Matrix &A, Matrix &B) |
| double | real_trace_conj_dot (Matrix_float &A, Matrix_float &B) |
| std::vector< std::vector< int > > | unique_cuts (int n) |
Header file for the paralleized calculation of the cost function of the final optimization problem (supporting TBB and OpenMP).
Definition in file N_Qubit_Decomposition_Cost_Function.h.
Call co calculate the cost function during the final optimization process.
| matrix | The square shaped complex matrix from which the cost function is calculated. |
| matrix | The square shaped complex matrix from which the cost function is calculated. |
| trace_offset | The offset in the first columns from which the "trace" is calculated. In this case Tr(A) = sum_(i-offset=j) A_{ij} |
Definition at line 73 of file N_Qubit_Decomposition_Cost_Function.cpp.

| double get_cost_function | ( | const Matrix_float & | matrix, |
| int | trace_offset = 0 |
||
| ) |
Definition at line 164 of file N_Qubit_Decomposition_Cost_Function.cpp.
| double get_cost_function_sum_of_squares | ( | Matrix & | matrix | ) |
Definition at line 443 of file N_Qubit_Decomposition_Cost_Function.cpp.

| Matrix_real get_cost_function_with_correction | ( | const Matrix & | matrix, |
| int | qbit_num, | ||
| int | trace_offset | ||
| ) |
Call co calculate the cost function of the optimization process, and the first correction to the cost finction according to https://arxiv.org/pdf/2210.09191.pdf.
| matrix | The square shaped complex matrix from which the cost function is calculated. |
| qbit_num | The number of qubits |
Definition at line 191 of file N_Qubit_Decomposition_Cost_Function.cpp.


| Matrix_real_float get_cost_function_with_correction | ( | const Matrix_float & | matrix, |
| int | qbit_num, | ||
| int | trace_offset = 0 |
||
| ) |
Definition at line 254 of file N_Qubit_Decomposition_Cost_Function.cpp.

| Matrix_real get_cost_function_with_correction2 | ( | const Matrix & | matrix, |
| int | qbit_num, | ||
| int | trace_offset | ||
| ) |
Call co calculate the cost function of the optimization process, and the first correction to the cost finction according to https://arxiv.org/pdf/2210.09191.pdf.
| matrix | The square shaped complex matrix from which the cost function is calculated. |
| qbit_num | The number of qubits |
Definition at line 295 of file N_Qubit_Decomposition_Cost_Function.cpp.


| Matrix_real_float get_cost_function_with_correction2 | ( | const Matrix_float & | matrix, |
| int | qbit_num, | ||
| int | trace_offset = 0 |
||
| ) |
Definition at line 406 of file N_Qubit_Decomposition_Cost_Function.cpp.

| Matrix get_deriv_osr_entanglement | ( | Matrix & | matrix, |
| std::vector< std::vector< int >> & | use_cuts, | ||
| int | rank = -1, |
||
| bool | use_softmax = false |
||
| ) |
Definition at line 1441 of file N_Qubit_Decomposition_Cost_Function.cpp.

| Matrix_float get_deriv_osr_entanglement | ( | Matrix_float & | matrix, |
| std::vector< std::vector< int >> & | use_cuts, | ||
| int | rank = -1, |
||
| bool | use_softmax = false |
||
| ) |
Definition at line 1445 of file N_Qubit_Decomposition_Cost_Function.cpp.
Definition at line 459 of file N_Qubit_Decomposition_Cost_Function.cpp.

| double get_hilbert_schmidt_test | ( | Matrix & | matrix | ) |
Call co calculate the cost function of the optimization process according to https://arxiv.org/pdf/2210.09191.pdf.
| matrix | The square shaped complex matrix from which the cost function is calculated. |
| qbit_num | The number of qubits |
Definition at line 524 of file N_Qubit_Decomposition_Cost_Function.cpp.


| double get_hilbert_schmidt_test | ( | Matrix_float & | matrix | ) |
Definition at line 534 of file N_Qubit_Decomposition_Cost_Function.cpp.

| double get_infidelity | ( | Matrix & | matrix | ) |
Call to calculate infidelity.
| matrix | The square shaped complex matrix from which the cost function is calculated. |
| qbit_num | The number of qubits |
Definition at line 541 of file N_Qubit_Decomposition_Cost_Function.cpp.


| double get_infidelity | ( | Matrix_float & | matrix | ) |
Definition at line 551 of file N_Qubit_Decomposition_Cost_Function.cpp.

| double get_osr_entanglement_test | ( | Matrix & | matrix, |
| std::vector< std::vector< int >> & | use_cuts, | ||
| int | rank = -1, |
||
| bool | use_softmax = false |
||
| ) |
Definition at line 1308 of file N_Qubit_Decomposition_Cost_Function.cpp.

| double get_osr_entanglement_test | ( | Matrix_float & | matrix, |
| std::vector< std::vector< int >> & | use_cuts, | ||
| int | rank = -1, |
||
| bool | use_softmax = false |
||
| ) |
Definition at line 1312 of file N_Qubit_Decomposition_Cost_Function.cpp.
| QGD_Complex16 get_trace | ( | Matrix & | matrix | ) |
Call to calculate the real and imaginary parts of the trace.
| matrix | The square shaped complex matrix from which the trace is calculated. |
| matrix | The square shaped complex matrix from which the trace is calculated. |
Definition at line 482 of file N_Qubit_Decomposition_Cost_Function.cpp.

| QGD_Complex16 get_trace | ( | Matrix_float & | matrix | ) |
Definition at line 501 of file N_Qubit_Decomposition_Cost_Function.cpp.
Call co calculate the Hilbert Schmidt testof the optimization process, and the first correction to the cost finction according to https://arxiv.org/pdf/2210.09191.pdf.
| matrix | The square shaped complex matrix from which the cost function is calculated. |
| qbit_num | The number of qubits |
| matrix | The square shaped complex matrix from which the cost function is calculated. |
| qbit_num | The number of qubits |
Definition at line 564 of file N_Qubit_Decomposition_Cost_Function.cpp.


Call co calculate the Hilbert Schmidt testof the optimization process, and the first correction to the cost finction according to https://arxiv.org/pdf/2210.09191.pdf.
| matrix | The square shaped complex matrix from which the cost function is calculated. |
| qbit_num | The number of qubits |
| matrix | The square shaped complex matrix from which the cost function is calculated. |
| qbit_num | The number of qubits |
Definition at line 604 of file N_Qubit_Decomposition_Cost_Function.cpp.


| std::pair<int, double> operator_schmidt_rank | ( | const Matrix & | U, |
| int | n, | ||
| const std::vector< int > & | A_qubits, | ||
| double | Fnorm, | ||
| double | tol = 1e-10 |
||
| ) |
Definition at line 1254 of file N_Qubit_Decomposition_Cost_Function.cpp.


| std::pair<int, double> operator_schmidt_rank | ( | const Matrix_float & | U, |
| int | n, | ||
| const std::vector< int > & | A_qubits, | ||
| double | Fnorm, | ||
| double | tol = 1e-10 |
||
| ) |
Definition at line 1269 of file N_Qubit_Decomposition_Cost_Function.cpp.

Definition at line 1451 of file N_Qubit_Decomposition_Cost_Function.cpp.

| double real_trace_conj_dot | ( | Matrix_float & | A, |
| Matrix_float & | B | ||
| ) |
Definition at line 1463 of file N_Qubit_Decomposition_Cost_Function.cpp.
Definition at line 975 of file N_Qubit_Decomposition_Cost_Function.cpp.


1.8.13