portfolio-optimization
portfolio-optimization copied to clipboard
Setting DWAVE_API_SOLVER environment variable causes exception
After setting DWAVE_API_SOLVER running single_period.py or multi_period.py will raise an exception, because the initialization tries to create both a CQM solver and DQM solver with the solver name in DWAVE_API_SOLVER, but no solver supports both CQM and DQM problems.
The exception will be something like ValueError: selected solver does not support the 'dqm' problem type., depending on the type of solver supplied.