Main Content
randsample
Installation Required: This functionality requires MATLAB Support Package for Quantum Computing.
Description
Examples
Input Arguments
Tips
The
randsample
function uses the current random number generator, the same generator that underliesrand
,randi
, andrandn
. Therefore, each call torandsample
returns a different result. You can control that shared random number generator usingrng
.On quantum processing unit (QPU) devices to date, real measurements can be more noisy than measurements resulting from randomly sampling a
QuantumState
object. For more information, see Run Circuit and Make Measurement.
Version History
Introduced in R2023a