Functions for creating variable-size matrices.
More...
Functions for creating variable-size matrices.
◆ createCompMatr()
| CompMatr createCompMatr |
( |
int | numQubits | ) |
|
- Note
- Documentation for this function or struct is under construction!
- See also
-
Definition at line 213 of file matrices.cpp.
213 {
214 validate_envIsInit(__func__);
215 validate_newCompMatrParams(numQubits, __func__);
216
217
218 qindex numRows = powerOf2(numQubits);
219 qindex numElems = numRows * numRows;
220
221
222 qcomp* cpuMem = cpu_allocArray(numElems);
223 qcomp* gpuMem = nullptr;
225 gpuMem = gpu_allocArray(numElems);
226
227
231
232
236
237
238 out.
cpuElems = cpu_allocAndInitMatrixWrapper(cpuMem, numRows);
241
242 validateMatrixAllocs(out, __func__);
243 setInitialHeapFlags(out);
244 return out;
245}
Referenced by TEST_CASE(), TEST_CASE(), TEST_CASE(), and TEST_CASE().
◆ createCustomFullStateDiagMatr()
| FullStateDiagMatr createCustomFullStateDiagMatr |
( |
int | numQubits, |
|
|
int | useDistrib, |
|
|
int | useGpuAccel, |
|
|
int | useMultithread ) |
- Note
- Documentation for this function or struct is under construction!
- See also
-
Definition at line 318 of file matrices.cpp.
318 {
319
320 return validateAndCreateCustomFullStateDiagMatr(numQubits, useDistrib, useGpuAccel, useMultithread, __func__);
321}
Referenced by TEST_CASE().
◆ createDiagMatr()
| DiagMatr createDiagMatr |
( |
int | numQubits | ) |
|
- Note
- Documentation for this function or struct is under construction!
- See also
-
Definition at line 248 of file matrices.cpp.
248 {
249 validate_envIsInit(__func__);
250 validate_newDiagMatrParams(numQubits, __func__);
251
252
253 qindex numElems = powerOf2(numQubits);
254
255
259
260
266
267
268 out.
cpuElems = cpu_allocArray(numElems);
270
271 validateMatrixAllocs(out, __func__);
272 setInitialHeapFlags(out);
273 return out;
274}
int * isStrictlyNonNegative
Referenced by TEST_CASE(), and TEST_CASE().
◆ createFullStateDiagMatr()
- Note
- Documentation for this function or struct is under construction!
- See also
-
Definition at line 323 of file matrices.cpp.
323 {
324
325 return validateAndCreateCustomFullStateDiagMatr(numQubits, modeflag::USE_AUTO, modeflag::USE_AUTO, modeflag::USE_AUTO, __func__);
326}
Referenced by createFullStateDiagMatrFromPauliStrSum(), and TEST_CASE().
◆ createFullStateDiagMatrFromPauliStrSum()
- Note
- Documentation for this function or struct is under construction!
- Warning
- This function has not yet been unit tested and may contain bugs. Please use with caution!
Definition at line 651 of file matrices.cpp.
651 {
652 validate_pauliStrSumFields(in, __func__);
653
654
655 int numQubits = 1 + paulis_getIndOfLefmostNonIdentityPauli(in);
656 validate_newFullStateDiagMatrParams(numQubits, modeflag::USE_AUTO, modeflag::USE_AUTO, modeflag::USE_AUTO, __func__);
657
658
659
661 localiser_fullstatediagmatr_setElemsToPauliStrSum(out, in);
662 markMatrixAsSynced(out);
663 return out;
664}
FullStateDiagMatr createFullStateDiagMatr(int numQubits)
◆ createInlineCompMatr()
| CompMatr createInlineCompMatr |
( |
int | numQb, |
|
|
{{ matrix }} | ) |
- Note
- Documentation for this function or struct is under construction!
-
This entity is actually a macro.
- See also
-
◆ createInlineDiagMatr()
| DiagMatr createInlineDiagMatr |
( |
int | numQb, |
|
|
{ list } | ) |
- Note
- Documentation for this function or struct is under construction!
-
This entity is actually a macro.
- See also
-