New Features
- Measurement samples can be returned as bitstrings instead of integers in nested lists.
- A density matrix representation of the state can be accessed via the ``Circuit.density_matrix``
property, for both pure and mixed states (with the former being lazily calculated from the state
vector).
Upgrade Notes
- Adds support for multi-qubit sampling in measurements. ``Measurement.sample()`` and
``Measurement.expval()`` are updated to accept a sequence of qubit indices to sample, sampling
all measured qubits if none are given.
python
circuit = Circuit(2, 2)
with circuit.context as (q, c):
ops.X(q[0])
m = ops.Measurement(q) | c
simulate(circuit)
m.sample(num_samples=3, as_bitstring=True)
['10', '10', '10']
- The state is now stored in the ``Circuit`` object (same as the bits/measurement results) instead
of being returned by the ``simulate()`` function. It can now be accessed via the
``Circuit.state`` property.
Package versions
dimod==0.12.6
dwave-cloud-client==0.10.5
dwave-greedy==0.3.0
dwave-hybrid==0.6.10
dwave-inspector==0.4.2
dwave-neal==0.6.0
dwave-networkx==0.8.14
dwave-preprocessing==0.5.4
dwave-samplers==1.0.0
dwave-system==1.19.0
dwave-tabu==0.5.0
dwavebinarycsp==0.2.0
minorminer==0.2.11
penaltymodel==1.0.2
pyqubo==1.4.0
extras: all
dwave-gate==0.2.1