Bengali
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.opflow.state_fns.VectorStateFn.sample

VectorStateFn.sample(shots=1024, massive=False, reverse_endianness=False)[source]

Sample the state function as a normalized probability distribution. Returns dict of bitstrings in order of probability, with values being probability.

প্যারামিটার
  • shots (int) -- The number of samples to take to approximate the State function.

  • massive (bool) -- Whether to allow large conversions, e.g. creating a matrix representing over 16 qubits.

  • reverse_endianness (bool) -- Whether to reverse the endianness of the bitstrings in the return dict to match Terra's big-endianness.

রিটার্নস

A dict containing pairs sampled strings from the State function and sampling frequency divided by shots.

রিটার্ন টাইপ

dict