Commit 02982c5e authored by Adams, Austin Joel's avatar Adams, Austin Joel
Browse files

IBM Backend: Default to multi_meas_enabled=false if missing



Currently the JSON configuration for some IBM backends does not include
multi_meas_enabled at all, causing a crash. Try to handle this, but be
conservative and assume no multi_meas_enabled means
multi_meas_enabled=false.
Signed-off-by: Adams, Austin Joel's avatarAustin Adams <aja@gatech.edu>
parent 768c97f9
......@@ -258,7 +258,7 @@ void IBMAccelerator::initialize(const HeterogeneousMap &params) {
chosenBackend = availableBackends[backend];
xacc::info("Backend config:\n" + chosenBackend.dump());
multi_meas_enabled = chosenBackend["multi_meas_enabled"].get<bool>();
multi_meas_enabled = chosenBackend.value("multi_meas_enabled", false);
defaults_response =
get(IBM_API_URL,
IBM_CREDENTIALS_PATH + "/devices/" + backend + "/defaults", {},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment