Main Content
probability
Installation Required: This functionality requires MATLAB Support Package for Quantum Computing.
Description
returns the probability of measuring all specified qubits in the state for the input quantum state or measurement p
= probability(s
,qubits
)s
. The
input s
must be a QuantumState
or
QuantumMeasurement
object.
If
s
is aQuantumState
object, thenprobability
returns the probability of making the specified measurement based on that quantum state.If
s
is aQuantumMeasurement
object, thenprobability
returns the estimated probability of the specified measurement based on that measurement result.
Examples
Input Arguments
Version History
Introduced in R2023a