Skip to content

Commit 6f78b76

Browse files
ferbetanzocqc-melf
andauthored
chore: fix guppy compile instruction in README (#124)
Co-authored-by: cqc-melf <70640934+cqc-melf@users.noreply.github.com>
1 parent 328f27f commit 6f78b76

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
A tool for converting Hierarchical Unified Graph Representation (HUGR, pronounced _hugger_) formatted quantum programs into [QIR](https://github.com/qir-alliance/qir-spec) format.
77

8-
Warning: Not all hugr/guppy programs can be converted to QIR
8+
Warning: Not all hugr/guppy programs can be converted to QIR.
99

1010
## Installation
1111

@@ -32,10 +32,12 @@ hugr-qir test-file.hugr
3232
Run `hugr-qir --help` to see the available options.
3333

3434
If you want to generate a hugr file from guppy, you can do this in two steps:
35-
1. add this to the end of your guppy file:
35+
1. Add this to the end of your guppy file:
3636
```
3737
if __name__ == "__main__":
38-
sys.stdout.buffer.write(guppy.compile(main).package.to_bytes())
38+
sys.stdout.buffer.write(main.compile().to_bytes())
39+
# Or to compile a non-main guppy function:
40+
sys.stdout.buffer.write(guppy_func.compile_function().to_bytes())
3941
```
4042

4143
2. Generate the hugr file with:

0 commit comments

Comments
 (0)