Skip to content

Commit 4897f4d

Browse files
committed
updated readme
1 parent e0a331d commit 4897f4d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,17 @@ print(result) # e.g.: {'0':1000}
6464

6565
```
6666

67+
## Usage
68+
69+
As postulated by the [qserver](https://github.com/Dpbm/qserver) documentation, the 3 possible outcomes are `counts`, `quasi dist` and `expval`.
70+
To evaluate them with this plugin you must provide some metadata in a specific pattern:
71+
72+
| type | what you need |
73+
|--------|----------------|
74+
| counts | no metadata is mandatory here, but you can specify the amount of shots you want `metadata={"shots":1024}`, by default the 1000 are taken. |
75+
| quasi-dist | the same as counts |
76+
| expval | the `obs`(observables) metadata is mandatory to run the estimator. You must provide a list of lists. Each list inside the main list represents a distinct `pub` (circuit evaluation - example: `[ [pub1], [pub2], ..., [pubn] ]`). Inside these lists, you must provide tuples with an observable and its coefficient like: `(obs, coeff)`. Here's an example of a correct expval experiment metadata: `[ [('ZZI', 0.4), ('ZIZ', 0.3)], [('IZ', 1)] ]`.
77+
6778

6879
## Dev
6980

0 commit comments

Comments
 (0)