Fix Estimator example in Qiskit 1.0 feagure migration guide (#896)
When I wrote the guide my brain decided that 2 circuits and 2 observables were not possible to run with Estimator V1, but they are. This PR fixes this oversight. Thanks @beckykd for pointing it out.
This commit is contained in:
parent
34fd8e3650
commit
c703c5c952
|
@ -339,8 +339,9 @@ sampler_v2 = StatevectorSampler()
|
|||
</TabItem>
|
||||
<TabItem value="e-2-2" label="Estimator, 2 circuits, 2 different observables" default>
|
||||
```python
|
||||
# executing 2 circuits with different observables
|
||||
# is not possible using Estimator V1
|
||||
# executing 2 circuits with 2 different observables using Estimator V1
|
||||
job = estimator_v1.run([circuit1, circuit2] , [obs1, obs2])
|
||||
evs = job.result().values
|
||||
|
||||
# executing 2 circuits with 2 different observables using Estimator V2
|
||||
job = estimator_v2.run([(circuit1, obs1), (circuit2, obs2)])
|
||||
|
|
Loading…
Reference in New Issue