mirror of https://github.com/Qiskit/qiskit.git
18 lines
539 B
YAML
18 lines
539 B
YAML
---
|
|
features:
|
|
- |
|
|
Added ``shots`` option for reference implementations of primitives.
|
|
Random numbers can be fixed by giving ``seed_primitive``. For example::
|
|
|
|
from qiskit.primitives import Sampler
|
|
from qiskit import QuantumCircuit
|
|
|
|
bell = QuantumCircuit(2)
|
|
bell.h(0)
|
|
bell.cx(0, 1)
|
|
bell.measure_all()
|
|
|
|
with Sampler(circuits=[bell]) as sampler:
|
|
result = sampler(circuits=[0], shots=1024, seed_primitive=15)
|
|
print([q.binary_probabilities() for q in result.quasi_dists])
|