@@ -89,24 +89,22 @@ print("Norm difference:\n", norm(psi_out - psi_in))
8989
9090## OpenQASM circuits
9191
92- Use ` pyqpp.qasm.read_from_file ` to obtain the ` QCircuit ` representation of an
93- OpenQASM 2.0 file.
92+ Use ` pyqpp.qasm.read_from_file() ` to obtain the ` qpp:: QCircuit` representation
93+ of an OpenQASM 2.0 file.
9494
9595---
9696
9797## Custom Bindings
9898
99- ** pyqpp** was created using [ pybind11] ( https://github.com/pybind/pybind11 ) , see
100- [ pyqpp/qpp_wrapper.cpp] ( https://github.com/softwareQinc/qpp/blob/main/pyqpp/qpp_wrapper.cpp ) .
101- To wrap a custom function, use ` pybind11::module::def ` .
99+ To wrap a custom function, use ` pybind11::module::def ` , such as
102100
103101``` cpp
104102template <typename Func, typename ...Extra>
105103module &def (const char * name_ , Func &&f, const Extra&... extra)
106104```
107105
108- `Func` can be a plain C++ function, a function pointer, or a lambda function.
109- For example, consider the `qpp::randU` method
106+ Here `Func` can be a plain C++ function, a function pointer, or a lambda
107+ function. For example, consider the `qpp::randU()` function
110108
111109```cpp
112110cmat randU(idx D = 2);
@@ -130,7 +128,7 @@ PYBIND11_MODULE(pyqpp, m) {
130128## Template methods
131129
132130We cannot wrap templated functions; instead, we must explicitly instantiate
133- them. For example, consider the `qpp::norm` method
131+ them. For example, consider the `qpp::norm()` function
134132
135133```cpp
136134template <typename Derived>
@@ -150,9 +148,9 @@ PYBIND11_MODULE(pyqpp, m) {
150148}
151149```
152150
153- This creates the overloaded `pyqpp.norm` function, which can accept `cmat`
154- or `ket ` types. To avoid repetition of boilerplate code, we can templatize the
155- binding:
151+ This creates the overloaded `pyqpp.norm() ` function, which can accept
152+ `qpp::ket` or `qpp::cmat ` types. To avoid repetition of boilerplate code, we
153+ can templatize the binding
156154
157155```cpp
158156template<typename T>
0 commit comments