Returns a single MeasurementGate applied to all the given qubits.

The qubits are measured in the computational basis. This can also be used with the alias cirq.M.

*target The qubits that the measurement gate should measure. These can be specified as separate function arguments or with a single argument for an iterable of qubits.
key Optional str or cirq.MeasurementKey that gate should use. If none provided, it defaults to a comma-separated list of str(qubit) for each of the target qubits.
invert_mask A list of Truthy or Falsey values indicating whether the corresponding qubits should be flipped. None indicates no inverting should be done.
confusion_map A map of qubit index sets (using indices in target) to the 2D confusion matrix for those qubits. Indices not included use the identity. Applied before invert_mask if both are provided.

An operation targeting the given qubits with a measurement.

ValueError If the qubits are not instances of Qid.