Skip to content

Commit

Permalink
Updated pyqpp
Browse files Browse the repository at this point in the history
Signed-off-by: Vlad Gheorghiu <[email protected]>
  • Loading branch information
vsoftco committed Jul 31, 2024
1 parent 1777380 commit d0430a7
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions pyqpp/include/pyqpp/classes/qcircuit_bind.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,40 @@ inline void init_classes_qcircuit(py::module_& m) {
py::arg("V"), py::arg("target"), py::arg("c_reg"),
py::arg("destructive") = true, py::arg("name") = std::nullopt)
.def("nop", &QCircuit::nop, "No operation (no-op)")
.def("post_select",
py::overload_cast<idx, idx, idx, bool,
std::optional<std::string>>(
&QCircuit::post_select),
"Z post-selection of single qudit", py::arg("target"),
py::arg("ps_val"), py::arg("c_reg"),
py::arg("destructive") = true, py::arg("name") = std::nullopt)
.def("post_select",
py::overload_cast<const std::vector<idx>&,
const std::vector<idx>&, idx, bool,
std::optional<std::string>>(
&QCircuit::post_select),
"Z post-selection of multiple qudits", py::arg("target"),
py::arg("ps_vals"), py::arg("c_reg"),
py::arg("destructive") = true, py::arg("name") = std::nullopt)
.def("post_selectV",
py::overload_cast<const cmat&, idx, idx, idx, bool,
std::optional<std::string>>(
&QCircuit::post_selectV),
"Post-selection of single qudit in the orthonormal basis "
"specified by the columns of matrix V",
py::arg("V"), py::arg("target"), py::arg("ps_val"),
py::arg("c_reg"), py::arg("destructive") = true,
py::arg("name") = std::nullopt)
.def("post_selectV",
py::overload_cast<const cmat&, const std::vector<idx>&,
const std::vector<idx>&, idx, bool,
std::optional<std::string>>(
&QCircuit::post_selectV),
"Post-selection of multiple qudits in the orthonormal basis "
"specified by the columns of matrix V",
py::arg("V"), py::arg("target"), py::arg("ps_vals"),
py::arg("c_reg"), py::arg("destructive") = true,
py::arg("name") = std::nullopt)
.def("QFT",
py::overload_cast<const std::vector<idx>&, bool>(
&QCircuit::QFT),
Expand Down

0 comments on commit d0430a7

Please sign in to comment.