Quantum 3xplorer (Q3)
Loading...
Searching...
No Matches
matrix_operation.hpp
Go to the documentation of this file.
1
#pragma once
2
3
/**
4
* MatrixOperation — what a product applies to each of its operands before
5
* multiplying: the matrix as it stands, or its conjugate transpose.
6
*
7
* The flag BLAS spells "N" and "C". Named here so a call reads as the algebra
8
* it performs -- multiply(ConjugateTranspose, left, None, right) is left^dagger
9
* right -- rather than as a letter whose meaning depends on the storage order
10
* the reader has in mind.
11
*/
12
13
namespace
q3
{
14
15
enum class
MatrixOperation
{
None
,
ConjugateTranspose
};
16
17
/// The letter BLAS takes for the operation.
18
[[nodiscard]]
inline
const
char
*
blas_transpose_flag
(
MatrixOperation
operation) {
19
return
operation ==
MatrixOperation::ConjugateTranspose
?
"C"
:
"N"
;
20
}
21
22
}
// namespace q3
q3
Definition
q3_core_api.hpp:33
q3::blas_transpose_flag
const char * blas_transpose_flag(MatrixOperation operation)
The letter BLAS takes for the operation.
Definition
matrix_operation.hpp:18
q3::MatrixOperation
MatrixOperation
Definition
matrix_operation.hpp:15
q3::MatrixOperation::ConjugateTranspose
@ ConjugateTranspose
q3::MatrixOperation::None
@ None
src
layer_0_core
math
linear_algebra
matrix_operation.hpp
Generated by
1.9.8