Template Function Pennylane::Util::scaleVector(std::vector<std::complex<Data_t>, Alloc>&, Data_t)

Function Documentation

template<class Data_t, class Alloc>
void Pennylane::Util::scaleVector(std::vector<std::complex<Data_t>, Alloc> &data, Data_t scalar)

Multiplies every value in a dataset by a given complex scalar value.

Template Parameters

Data_t – Precision of complex data type. Supports float and double data.

Parameters
  • data – Data to be scaled.

  • scalar – Scalar value.