| 328 | |
| 329 | template <typename exp> |
| 330 | qc_scalar_type compute_state_element ( |
| 331 | const matrix_exp<exp>& reg, |
| 332 | long row_idx |
| 333 | ) const |
| 334 | { |
| 335 | // make sure requires clause is not broken |
| 336 | DLIB_ASSERT(reg.nr() == dims && reg.nc() == 1 && |
| 337 | 0 <= row_idx && row_idx < dims, |
| 338 | "\tqc_scalar_type gate_exp::compute_state_element(reg,row_idx)" |
| 339 | << "\n\tinvalid arguments to this function" |
| 340 | << "\n\treg.nr(): " << reg.nr() |
| 341 | << "\n\treg.nc(): " << reg.nc() |
| 342 | << "\n\tdims: " << dims |
| 343 | << "\n\trow_idx: " << row_idx |
| 344 | << "\n\tthis: " << this |
| 345 | ); |
| 346 | |
| 347 | |
| 348 | return this->exp.compute_state_element(reg,row_idx); |
| 349 | } |
| 350 | |
| 351 | const T& ref() const { return exp; } |
| 352 |
nothing calls this directly
no test coverage detected