Is there a function in Qiskit similar to this function in Q# which measures strings of Pauli operators applied to different qubits?


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.