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

docs: Add short description and simplify readme for pypi #136

Merged
merged 3 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[tool.poetry]
name = "guppylang"
version = "0.1.0"
description = ""
description = "Pythonic quantum-classical programming language"
authors = ["Mark Koch <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
readme = "quickstart.md"
repository = "https://github.com/CQCL/guppy"

[tool.poetry.dependencies]
Expand Down
24 changes: 24 additions & 0 deletions quickstart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Guppy is a quantum programming language that is fully embedded into Python. It
allows you to write high-level hybrid quantum programs with classical control
flow and mid-circuit measurements using Pythonic syntax:

```python
from guppylang import guppy, Qubit, quantum

guppy.load(quantum)

# Teleports the state in `src` to `tgt`.
@guppy
def teleport(src: Qubit, tgt: Qubit) -> Qubit:
# Create ancilla and entangle it with src and tgt
tmp = Qubit()
tmp, tgt = cx(h(tmp), tgt)
src, tmp = cx(src, tmp)

# Apply classical corrections
if measure(h(src)):
tgt = z(tgt)
if measure(tmp):
tgt = x(tgt)
return tgt
```