Skip to content

Commit 369366a

Browse files
committed
typos
Signed-off-by: Vlad Gheorghiu <[email protected]>
1 parent be2f316 commit 369366a

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

pyqpp/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ endif()
5555
add_custom_command(
5656
TARGET pyqpp
5757
POST_BUILD
58-
COMMAND
5958
COMMAND
6059
${CMAKE_COMMAND} -E env
6160
"PYTHONPATH=$<TARGET_FILE_DIR:pyqpp>${PYTHONPATH_SEP}$ENV{PYTHONPATH}"

pyqpp/README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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
104102
template<typename Func, typename ...Extra>
105103
module &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
112110
cmat randU(idx D = 2);
@@ -130,7 +128,7 @@ PYBIND11_MODULE(pyqpp, m) {
130128
## Template methods
131129
132130
We 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
136134
template <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
158156
template<typename T>

0 commit comments

Comments
 (0)