performs a masurement on a
1 2 3 4
object to measure
bit to project on
number of measurements
measure(e1, bit, repetitions) performs
projections/measurements of the qubit
bit is not given
explicitly, all qubits are projected.
measure(e1, bit, repetitions) returns a list with the measured
the number of
repetitions, the probability distribution of all states
prob and the results vector
value. If all bits are measured, the
basis is added to the list as
basis. The collapsed state is stored as
psi if exactly one measurement is performed.
In the case of a single qubit measurement
value is of length
and contains all the results of this projection. Otherwise
value is of
length 2^nbits and it contains the counts how often each state has been
1 2 3 4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.