Is there a function in Qiskit to measure tensor products of Pauli operators?

2

1

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

sycramore

Posted 2020-08-19T01:39:17.257

Reputation: 137

Answers

0

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.

e-eight

Posted 2020-08-19T01:39:17.257

Reputation: 130

Could you please give a bit more information ? – BrockenDuck – 2020-08-21T22:43:16.200

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. – sycramore – 2020-08-31T22:12:39.873

Sorry for commenting so late. But maybe the WeightedPauliOperator answers your question @sycramore.

– e-eight – 2020-10-09T18:57:31.437