qsim icon indicating copy to clipboard operation
qsim copied to clipboard

Compilation warning involving Eigen in mps_simulator.h

Open mhucka opened this issue 1 month ago • 0 comments

Describe the issue

Compiling with make run-cxx-tests using g++ 14.2.0 on a Debian 6.12 Linux system produces a warning:

In file included from mps_simulator_test.cc:15:
../lib/mps_simulator.h: In instantiation of ‘void qsim::mps::MPSSimulator<For, FP>::ApplyGate2(const std::vector<unsigned int>&, const fp_type*, State&) const [with For = qsim::ParallelForT<1024>; FP = float; fp_type = float; State = qsim::mps::MPSStateSpace<qsim::ParallelForT<1024>, float>::MPS]’:
../lib/mps_simulator.h:73:9:   required from ‘void qsim::mps::MPSSimulator<For, FP>::ApplyGate(const std::vector<unsigned int>&, const fp_type*, State&) const [with For = qsim::ParallelForT<1024>; FP = float; fp_type = float; State = qsim::mps::MPSStateSpace<qsim::ParallelForT<1024>, float>::MPS]’
   73 |         ApplyGate2(qs, matrix, state);
      |         ^~~~~~~~~~
mps_simulator_test.cc:56:16:   required from here
   56 |   sim.ApplyGate({9}, mat.data(), state);
      |   ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
../lib/mps_simulator.h:215:16: warning: ‘Eigen::BDCSVD<MatrixType, Options>& Eigen::BDCSVD<MatrixType, Options>::compute(const MatrixType&, unsigned int) [with MatrixType_ = Eigen::Matrix<std::complex<float>, -1, -1, 1, -1, -1>; int Options_ = 0; MatrixType = Eigen::Matrix<std::complex<float>, -1, -1, 1, -1, -1>]’ is deprecated [-Wdeprecated-declarations]
  215 |     svd.compute(full_b0b1, Eigen::ComputeThinU | Eigen::ComputeThinV);
      |     ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../lib/../eigen/Eigen/SVD:38,
                 from ../lib/../eigen/Eigen/Dense:5,
                 from ../lib/mps_simulator.h:27:
../lib/../eigen/Eigen/src/SVD/BDCSVD.h:227:11: note: declared here
  227 |   BDCSVD& compute(const MatrixType& matrix, unsigned int computationOptions) {
      |           ^~~~~~~
gmake[1]: Leaving directory '/usr/local/google/home/mhucka/project-files/google/github/qsim/tests'

Tell us how to reproduce the issue

No response

Tell us the version of qsim or qsimcirq (if relevant)

No response

Tell us the computing environment (if relevant)

No response

mhucka avatar Nov 03 '25 05:11 mhucka