Function getRealAmp

Source
pub unsafe extern "C" fn getRealAmp(
    qureg: Qureg,
    index: c_longlong,
) -> f64
Expand description

Get the real component of the complex probability amplitude at an index in the state vector.

@see

  • getAmp()
  • getDensityAmp()
  • getImagAmp()
  • getProbAmp()
  • getNumAmps()
  • getNumQubits()

@ingroup calc @param[in] qureg object representing a set of qubits @param[in] index index in state vector of probability amplitudes @return real component at that index @throws invalidQuESTInputError()

  • if \p qureg is a density matrix
  • if \p index is outside [0, \f$2^{N}\f$) where \f$N = \f$ \p qureg.numQubitsRepresented @author Ania Brown