Functions for obtaining amplitudes from statevectors or density matrices.
More...
|
qcomp | getDensityQuregAmp (Qureg qureg, qindex row, qindex column) |
|
void | getDensityQuregAmps (qcomp **outAmps, Qureg qureg, qindex startRow, qindex startCol, qindex numRows, qindex numCols) |
|
qcomp | getQuregAmp (Qureg qureg, qindex index) |
|
void | getQuregAmps (qcomp *outAmps, Qureg qureg, qindex startInd, qindex numAmps) |
|
Functions for obtaining amplitudes from statevectors or density matrices.
◆ getDensityQuregAmp()
qcomp getDensityQuregAmp |
( |
Qureg | qureg, |
|
|
qindex | row, |
|
|
qindex | column ) |
- Note
- Documentation for this function or struct is under construction!
Definition at line 496 of file qureg.cpp.
496 {
497 validate_quregFields(qureg, __func__);
498 validate_quregIsDensityMatrix(qureg, __func__);
499 validate_basisStateRowCol(qureg, row, column, __func__);
500
501 qindex ind = util_getGlobalFlatIndex(qureg, row, column);
502 qcomp amp = localiser_statevec_getAmp(qureg, ind);
503 return amp;
504}
Referenced by TEST_CASE().
◆ getDensityQuregAmps()
void getDensityQuregAmps |
( |
qcomp ** | outAmps, |
|
|
Qureg | qureg, |
|
|
qindex | startRow, |
|
|
qindex | startCol, |
|
|
qindex | numRows, |
|
|
qindex | numCols ) |
- Note
- Documentation for this function or struct is under construction!
Definition at line 455 of file qureg.cpp.
455 {
456 validate_quregFields(qureg, __func__);
457 validate_quregIsDensityMatrix(qureg, __func__);
458 validate_basisStateRowCols(qureg, startRow, startCol, numRows, numCols, __func__);
459
460 localiser_densmatr_getAmps(outAmps, qureg, startRow, startCol, numRows, numCols);
461}
Referenced by TEST_CASE().
◆ getQuregAmp()
qcomp getQuregAmp |
( |
Qureg | qureg, |
|
|
qindex | index ) |
- Note
- Documentation for this function or struct is under construction!
Definition at line 483 of file qureg.cpp.
483 {
484 validate_quregFields(qureg, __func__);
485 validate_quregIsStateVector(qureg, __func__);
486 validate_basisStateIndex(qureg, index, __func__);
487
488 return localiser_statevec_getAmp(qureg, index);
489}
Referenced by TEST_CASE().
◆ getQuregAmps()
void getQuregAmps |
( |
qcomp * | outAmps, |
|
|
Qureg | qureg, |
|
|
qindex | startInd, |
|
|
qindex | numAmps ) |
- Note
- Documentation for this function or struct is under construction!
Definition at line 446 of file qureg.cpp.
446 {
447 validate_quregFields(qureg, __func__);
448 validate_quregIsStateVector(qureg, __func__);
449 validate_basisStateIndices(qureg, startInd, numAmps, __func__);
450
451 localiser_statevec_getAmps(outAmps, qureg, startInd, numAmps);
452}
Referenced by TEST_CASE().