Skip to content
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

Merged
merged 3 commits into from
Jan 24, 2025
Merged

add circuit batch update #196

merged 3 commits into from
Jan 24, 2025

Conversation

Glacialte
Copy link
Contributor

ゲートの更新でparameters[固定のキー][batch_id]を使うため、回路に渡すパラメータの型はmap<std::string, std::vector>にしています。

Copy link
Contributor

@KowerKoint KowerKoint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメント以外LGTM

@@ -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>&)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一応nb::overload_castを使う

Copy link
Contributor

@gandalfr-KY gandalfr-KY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okです!

Copy link
Contributor

@KowerKoint KowerKoint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!ありがとうございます

@Glacialte Glacialte merged commit d5aac87 into main Jan 24, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants