@@ -228,12 +228,12 @@ gatesToUncompute(std::vector<std::complex<double>>& amplitudes,
228
228
}
229
229
// as there were some systematic compiler errors with accessing the
230
230
// qubit directly the controls are collected and then newly set
231
- std::vector< qc::Control> newControls;
231
+ qc::Controls newControls;
232
232
for (const auto & control : op->getControls ()) {
233
- newControls.emplace_back (
233
+ newControls.emplace (
234
234
qc::Control{control.qubit + static_cast <Qubit>(i)});
235
235
}
236
- op->setControls (qc::Controls{ newControls. begin (), newControls. end ()} );
236
+ op->setControls (newControls);
237
237
}
238
238
disentangler.emplace_back <Operation>(rzMultiplexer.asOperation ());
239
239
}
@@ -250,12 +250,12 @@ gatesToUncompute(std::vector<std::complex<double>>& amplitudes,
250
250
}
251
251
// as there were some systematic compiler errors with accessing the
252
252
// qubit directly the controls are collected and then newly set
253
- std::vector< qc::Control> newControls;
253
+ qc::Controls newControls;
254
254
for (const auto & control : op->getControls ()) {
255
- newControls.emplace_back (
255
+ newControls.emplace (
256
256
qc::Control{control.qubit + static_cast <Qubit>(i)});
257
257
}
258
- op->setControls (qc::Controls{ newControls. begin (), newControls. end ()} );
258
+ op->setControls (newControls);
259
259
}
260
260
disentangler.emplace_back <Operation>(ryMultiplexer.asOperation ());
261
261
}
0 commit comments