Closed thisac closed 1 year ago
Merging #31 (b8b7ebe) into master (ecb8b06) will not change coverage. The diff coverage is
100.00%
.:exclamation: Current head b8b7ebe differs from pull request most recent head 204daa9. Consider uploading reports for the commit 204daa9 to get more accurate results
@@ Coverage Diff @@
## master #31 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 15 15
Lines 1191 1186 -5
Branches 184 183 -1
=========================================
- Hits 1191 1186 -5
Impacted Files | Coverage Δ | |
---|---|---|
dwave/gate/operations/base.py | 100.00% <100.00%> (ø) |
|
dwave/gate/simulator/__init__.py | 100.00% <100.00%> (ø) |
|
dwave/gate/tools/samples.py | 100.00% <100.00%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Adds support for multi-qubit sampling in measurements along with support for directly returning samples as bitstrings instead of integers in nested lists. This simplifies sampling from simulating circuits and avoids the need for simulating the full circuit again for each sample.
Samples should (and will) always be either
"00"
or"11"
for the specified circuit above. Which qubits to sample can be specified as e.g.,qubits=[0]
orqubits=[0, 1]
(the latter sampling from all qubits in a 2-qubit circuit).Measurement.sample()
andMeasurement.expval()
are updated to accept a sequence of qubit indices to sample, sampling all measured qubits if none are given.Measurement samples can be returned as bitstrings instead of integers in nested lists.