Skip to content

Commit

Permalink
Update index.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dexter2206 committed Sep 19, 2024
1 parent a166448 commit 708f1c4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ In order to quickly get started with `bartiq`, you can load Alias Sampling as an

```python
import json
from bartiq import Routine, compile_routine, evaluate
from bartiq.integrations import qref_to_bartiq
from bartiq import compile_routine, evaluate
from qref import SchemaV1

with open("alias_sampling_basic.json", "r") as f:
with open("docs/data/alias_sampling_basic.json", "r") as f:
routine_dict = json.load(f)

uncompiled_routine = qref_to_bartiq(routine_dict)
compiled_routine = compile_routine(uncompiled_routine)
uncompiled_routine = SchemaV1(**routine_dict)
compiled_routine = compile_routine(uncompiled_routine).routine

assignments = ["L=100", "mu=10"]
assignments = {"L": 100, "mu": 10}

evaluated_routine = evaluate(compiled_routine, assignments)
evaluated_routine = evaluate(compiled_routine, assignments).routine
```

Now in order to inspect the results you can do:
Expand Down

0 comments on commit 708f1c4

Please sign in to comment.