Is there a way to represent measurements in other bases in Qiskit? The default measurement is in the Z (computational) basis. Can I also depict measurement in X, Y and general Pauli Measurements?

I know that I can apply a suitable unitary and then measure in the Z basis, but I am looking for a way to add the measurements to the circuit almost like "gates". I will be putting many such measurements in sequence in my circuits. I will be happy to use any external/in-development tool that allows this and interfaces well with Qiskit.

  • 3
    $\begingroup$ In progress: github.com/Qiskit/qiskit-terra/pull/5311 $\endgroup$ Commented Mar 7, 2021 at 7:01
  • $\begingroup$ Hi, Thanks for your quick answer. Do you think that is ready to use for what I have said I want to do? $\endgroup$
    – shashvat
    Commented Mar 7, 2021 at 8:32
  • $\begingroup$ Probably, but I don't think it will be easy for you to apply it without a proper release of Qiskit that includes it. $\endgroup$ Commented Mar 7, 2021 at 12:06
  • $\begingroup$ Have you looked into using Pennylane? They allow you to measure in arbitrary basis as you mentioned.... look here: pennylane.readthedocs.io/en/stable/introduction/… and there is a plugin between Pennylane and Qiskit pennylane-qiskit.readthedocs.io/en/latest which allows you to execute your work on IBM hardware. $\endgroup$
    – KAJ226
    Commented Mar 7, 2021 at 17:30
  • $\begingroup$ @KAJ226 Thanks for sharing! Unfortunately it looks like while Pennylane does allow the general Pauli measurements I want, it still does not allow multiple measurements per circuit. $\endgroup$
    – shashvat
    Commented Mar 8, 2021 at 3:18


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.