qrisp.QuantumVariable.most_likely#
- QuantumVariable.most_likely(**kwargs)[source]#
Performs a measurement and returns the most likely outcome.
- Parameters:
- **kwargsKeyword arguments for the get_measurement call.
Examples
>>> from qrisp import QuantumFloat, ry >>> import numpy as np >>> qf = QuantumFloat(3) >>> ry(np.pi*9/8, qf[0]) >>> print(qf) {1: 0.9619, 0: 0.0381} >>> qf.most_likely() 1