I noticed a strange behavior as I tried to familiarize myself with Qiskit's stabilizer functionalities:

import qiskit

qc = qiskit.QuantumCircuit(2)
qc.cx(0, 1)
qc.cz(0, 1)
qc.cz(0, 1)
cliff = qiskit.quantum_info.Clifford(qc)

Next, I compute two state vectors; once directly from qc and once from cliff.

from qiskit.quantum_info import Statevector
sv = Statevector.from_instruction(qc)
svcl = Statevector.from_instruction(cliff)

I'd expect that those two state vectors would be the same, however:

Statevector([0.-0.5j, 0.+0.5j, 0.-0.5j, 0.-0.5j],
            dims=(2, 2))


Statevector([-0.35355339+0.35355339j,  0.35355339-0.35355339j,
             -0.35355339+0.35355339j, -0.35355339+0.35355339j],
            dims=(2, 2))

Am I missing something?

  • $\begingroup$ The two vectors differ by just a global phase factor. $\endgroup$
    – Guangliang
    May 17, 2023 at 21:18

1 Answer 1


The difference in behavior arises from how Statevector.from_instruction() treats a QuantumCircuit object (by simulating the circuit) versus a Clifford object (by assuming it represents a unitary operator). If you want to obtain the state vector resulting from simulating a circuit, you should use Statevector.from_instruction(qc) directly on the QuantumCircuit object.


Your Answer

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

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