Description Usage Arguments Details Value Note See Also
A gate that measures qubits in the computational basis.
1 | measurement_gate(num_qubits = NULL, key = "str", invert_mask, qid_shape = NULL)
|
num_qubits |
The number of qubits to act upon. |
key |
The string key of the measurement. |
invert_mask |
A list of values indicating whether the corresponding qubits should be flipped. The list’s length must not be longer than the number of qubits, but it is permitted to be shorter. Qubits with indices past the end of the mask are not flipped. |
qid_shape |
Specifies the dimension of each qid the measurement applies to. The default is 2 for every qubit. |
The measurement gate contains a key that is used to identify results of measurements.
a list of operations individually measuring the given qubits.
If the length of invert_mask is greater than num_qubits. Or if the length of qid_shape doesn’t equal num_qubits.
Other Measurement:
measure_each()
,
measure()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.