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 514 of file qureg.cpp.
514 {
515 validate_quregFields(qureg, __func__);
516 validate_quregIsDensityMatrix(qureg, __func__);
517 validate_basisStateRowCol(qureg, row, column, __func__);
518
519 qindex ind = util_getGlobalFlatIndex(qureg, row, column);
520 qcomp amp = localiser_statevec_getAmp(qureg, ind);
521 return amp;
522}
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 474 of file qureg.cpp.
474 {
475 validate_quregFields(qureg, __func__);
476 validate_quregIsDensityMatrix(qureg, __func__);
477 validate_basisStateRowCols(qureg, startRow, startCol, numRows, numCols, __func__);
478
479 localiser_densmatr_getAmps(outAmps, qureg, startRow, startCol, numRows, numCols);
480}
Referenced by getDensityQuregAmps(), and TEST_CASE().
◆ getQuregAmp()
| qcomp getQuregAmp |
( |
Qureg | qureg, |
|
|
qindex | index ) |
- Note
- Documentation for this function or struct is under construction!
Definition at line 501 of file qureg.cpp.
501 {
502 validate_quregFields(qureg, __func__);
503 validate_quregIsStateVector(qureg, __func__);
504 validate_basisStateIndex(qureg, index, __func__);
505
506 return localiser_statevec_getAmp(qureg, index);
507}
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 465 of file qureg.cpp.
465 {
466 validate_quregFields(qureg, __func__);
467 validate_quregIsStateVector(qureg, __func__);
468 validate_basisStateIndices(qureg, startInd, numAmps, __func__);
469
470 localiser_statevec_getAmps(outAmps, qureg, startInd, numAmps);
471}
Referenced by getQuregAmps(), and TEST_CASE().