-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add circuit batch update #196
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コメント以外LGTM
include/scaluq/circuit/circuit.hpp
Outdated
@@ -128,7 +130,8 @@ void bind_circuit_circuit_hpp(nb::module_& m) { | |||
nb::overload_cast<const Circuit<Fp>&>(&Circuit<Fp>::add_circuit), | |||
"Add all gates in specified circuit. Given gates are copied.") | |||
.def("update_quantum_state", | |||
&Circuit<Fp>::update_quantum_state, | |||
static_cast<void (Circuit<Fp>::*)(StateVector<Fp>&, const std::map<std::string, Fp>&) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
一応nb::overload_cast
を使う
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okです!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!ありがとうございます
ゲートの更新でparameters[固定のキー][batch_id]を使うため、回路に渡すパラメータの型はmap<std::string, std::vector>にしています。