MCPcopy Create free account
hub / github.com/NVIDIA/cuda-quantum / create_matrix

Function create_matrix

unittests/operators/utils.cpp:101–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101cudaq::complex_matrix create_matrix(std::size_t size) {
102 auto mat = cudaq::complex_matrix(size, size);
103 for (std::size_t i = 0; i + 1 < size; i++)
104 mat[{i + 1, i}] = std::sqrt(static_cast<double>(i + 1));
105 return mat;
106}
107
108cudaq::complex_matrix position_matrix(std::size_t size) {
109 auto mat = cudaq::complex_matrix(size, size);

Callers 5

TESTFunction · 0.70
displace_matrixFunction · 0.70
squeeze_matrixFunction · 0.70
TESTFunction · 0.70
TESTFunction · 0.70

Calls 1

complex_matrixClass · 0.85

Tested by

no test coverage detected