|
numerics
|
Measurement outcome from Circuit::run() More...
#include <circuit.hpp>
Public Member Functions | |
| void | print () const |
| Print counts sorted by count (descending) | |
| std::string | most_likely () const |
| Basis label with the highest count. | |
| real | probability (const std::string &label) const |
| Empirical probability for a given label (e.g. "11") | |
Public Attributes | |
| std::map< std::string, int > | counts |
| basis label (e.g. "011") -> shot count | |
| quantum::Statevector | sv |
| pre-measurement statevector | |
| int | shots = 0 |
Measurement outcome from Circuit::run()
Definition at line 43 of file circuit.hpp.
| std::string num::Result::most_likely | ( | ) | const |
Basis label with the highest count.
Definition at line 32 of file circuit.cpp.
References counts, and num::ipow().
| void num::Result::print | ( | ) | const |
Print counts sorted by count (descending)
Definition at line 14 of file circuit.cpp.
References counts, num::ipow(), and shots.
Empirical probability for a given label (e.g. "11")
Definition at line 40 of file circuit.cpp.
References counts, num::ipow(), and shots.
| std::map<std::string, int> num::Result::counts |
basis label (e.g. "011") -> shot count
Definition at line 44 of file circuit.hpp.
Referenced by most_likely(), print(), and probability().
| int num::Result::shots = 0 |
Definition at line 46 of file circuit.hpp.
Referenced by print(), and probability().
| quantum::Statevector num::Result::sv |
pre-measurement statevector
Definition at line 45 of file circuit.hpp.
Referenced by num::Circuit::run().