Is there a function in Qiskit similar to this function in Q# which measures strings of Pauli operators applied to different qubits?
$\begingroup$
$\endgroup$
3
You can create a string of Pauli operators, applied to different qubits, using the Pauli
class from qiskit.quantum_info
, and then just do a measurement like you would do for any circuit.
-
$\begingroup$ Could you please give a bit more information ? $\endgroup$ – BrockenDuck Aug 21 '20 at 22:43
-
$\begingroup$ Well I wanted to measure in the eigenbasis of that corresponding Pauli operator. Something like "measure X" equals applying the Hadamard gate and then measure in the computational basis. Just as a preimplemented function in qiskit. $\endgroup$ – sycramore Aug 31 '20 at 22:12
-
$\begingroup$ Sorry for commenting so late. But maybe the WeightedPauliOperator answers your question @sycramore. $\endgroup$ – e-eight Oct 9 '20 at 18:57