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

Primitives (non runtime) changes for 1.0 #812

Merged
merged 63 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
f52fe7e
draft changes
beckykd Feb 14, 2024
49d73ac
Update docs/verify/simulate-with-qiskit-primitives.mdx
beckykd Feb 14, 2024
aea5053
Update docs/verify/simulate-with-qiskit-primitives.mdx
beckykd Feb 14, 2024
89fab90
further edits
beckykd Feb 15, 2024
31c48ad
Merge branch 'primitives-updates-for-1.0' of https://github.com/Qiski…
beckykd Feb 15, 2024
c155618
Further edits
beckykd Feb 15, 2024
a19b05a
pull out backend primitives
beckykd Feb 19, 2024
9affb6c
Merge branch 'main' into primitives-updates-for-1.0
abbycross Apr 1, 2024
68bef1d
clean up after merge conflict
abbycross Apr 1, 2024
d7c0f74
Add Elena's suggestion for simulate with primitives topic (starting p…
ElePT Apr 4, 2024
b0592ef
Clean up commented-out sections of the document
ElePT Apr 4, 2024
f21db70
Address previous review comments
ElePT Apr 4, 2024
19f384d
no longer need tm for Qiskit
abbycross Apr 4, 2024
6d63ad6
simplify
abbycross Apr 4, 2024
129a71e
simplify
abbycross Apr 4, 2024
8425dd7
new guidance: no need to tm Qiskit
abbycross Apr 4, 2024
be01d9c
tweaks
abbycross Apr 4, 2024
158f0be
avoid "below"
abbycross Apr 4, 2024
f99c45c
typo and tweak
abbycross Apr 4, 2024
d8cfb0e
rmv sentence fragment
abbycross Apr 4, 2024
9bd026d
Update docs/verify/simulate-with-qiskit-primitives.mdx
abbycross Apr 4, 2024
339eb2c
simplify
abbycross Apr 4, 2024
84f9e48
tweaks
abbycross Apr 4, 2024
e2da48a
missing period
abbycross Apr 4, 2024
83da606
wordsmith
abbycross Apr 4, 2024
58bf43c
PUB rather than pub
abbycross Apr 4, 2024
82e806a
fix broken internal link
abbycross Apr 4, 2024
9417967
convert to notebook
abbycross Apr 5, 2024
b5dd11d
tox
abbycross Apr 5, 2024
d41ebcd
missing header
abbycross Apr 5, 2024
89f1cd1
Delete DELETE-simulate-with-qiskit-primitives.mdx
abbycross Apr 5, 2024
46144a6
add in one more output
abbycross Apr 5, 2024
6284bef
Update simulate-with-qiskit-primitives.ipynb
abbycross Apr 5, 2024
f7e836f
tox
abbycross Apr 5, 2024
cf6122f
convert to mdx
abbycross Apr 9, 2024
0181482
links to aer topic, runtime primitives intro topic
abbycross Apr 10, 2024
8dae5ac
should be sampler in a sampler example
abbycross Apr 10, 2024
50101bb
add transpilation instructions to sampler section
abbycross Apr 10, 2024
ae566fb
add in isa transpilation for estimator section
abbycross Apr 10, 2024
98f4956
add output
abbycross Apr 10, 2024
b2a9bbd
rmv ipynb
abbycross Apr 10, 2024
9d30078
Update docs/verify/simulate-with-qiskit-primitives.mdx
abbycross Apr 11, 2024
5317503
Update docs/verify/simulate-with-qiskit-primitives.mdx
abbycross Apr 11, 2024
625a60e
Update docs/verify/simulate-with-qiskit-primitives.mdx
abbycross Apr 11, 2024
cb6c8c7
code review
abbycross Apr 11, 2024
034971b
Merge branch 'primitives-updates-for-1.0' of https://github.com/Qiski…
abbycross Apr 11, 2024
596a5d8
add ISA message
abbycross Apr 11, 2024
bd05d07
Update simulate-with-qiskit-primitives.mdx
abbycross Apr 11, 2024
2bcc8af
Update simulate-with-qiskit-primitives.mdx
abbycross Apr 11, 2024
7440557
rest of code review
abbycross Apr 11, 2024
e331fa0
add result
abbycross Apr 11, 2024
6e9bd9a
testing out print statement
abbycross Apr 11, 2024
3a90933
Update .gitignore
abbycross Apr 11, 2024
5d0ceb7
Update docs/verify/simulate-with-qiskit-primitives.mdx
abbycross Apr 11, 2024
20a3869
Becky's review
abbycross Apr 11, 2024
d7c2fa6
Becky's review
abbycross Apr 11, 2024
c9b9785
Becky's review
abbycross Apr 11, 2024
4116f77
Becky's review
abbycross Apr 11, 2024
1c1281a
Becky's review
abbycross Apr 11, 2024
38e5c31
Becky's review
abbycross Apr 11, 2024
0b51021
Becky review
abbycross Apr 11, 2024
5c77ba3
Becky's review
abbycross Apr 11, 2024
9ae0238
becky's review
abbycross Apr 11, 2024
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
31 changes: 30 additions & 1 deletion docs/run/primitives-get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ service = QiskitRuntimeService(channel="ibm_cloud", channel_strategy="q-ctrl")
</Admonition>

<Admonition type="note">
These examples all use the primitives from Qiskit Runtime, but you could use the base primitives instead.
While this documentation uses the primitives from Qiskit Runtime, which allow you to use IBM&reg; backends, the primitives can be run on any provider by using the [backend primitives](#backend) instead. Additionally, you can use the *reference* primitives to run on a local statevector simulator. See [Exact simulation with Qiskit primitives](../verify/simulate-with-qiskit-primitives) for details.
</Admonition>

<span id="start-estimator"></span>
Expand Down Expand Up @@ -234,6 +234,35 @@ print(f" > Metadata: {result.metadata[0]}")
</TabItem>
</Tabs>

<span id="backend"></span>
## Get started with the backend primitives

The `Sampler` primitive can be run with any provider by using [`qiskit.primitives.BackendSampler`](../api/qiskit/qiskit.primitives.BackendSampler). Likewise, the `Estimator` primitive can be run with any provider using [`qiskit.primitives.BackendEstimator`](../api/qiskit/qiskit.primitives.BackendEstimator). Equivalent implementations in V2 are coming soon.

Some providers implement primitives natively (see [the Qiskit Ecosystem page](https://qiskit.github.io/ecosystem#providers) for more details).

### Example: BackendEstimator

```python
from qiskit.primitives import BackendEstimator
from <some_qiskit_provider> import QiskitProvider

provider = QiskitProvider()
backend = provider.get_backend('backend_name')
estimator = BackendEstimator(backend)
```

### Example: BackendSampler

```python
from qiskit.primitives import BackendSampler
from <some_qiskit_provider> import QiskitProvider

provider = QiskitProvider()
backend = provider.get_backend('backend_name')
sampler = BackendSampler(backend)
```

## Next steps

<Admonition type="tip" title="Recommendations">
Expand Down
Loading
Loading