META AI:
Qiskit PauliVec; I have a 2-qubit circuit with the first a Hadamard gate and the second a cx with q(0) as control and q(1) as target. A PauliVec representation shows the YY as negative1, while the other three are positive. What accounts for this?
A nice question about Qiskit and quantum computing!
The PauliVec representation you're referring to is likely the Pauli Vector representation of the density matrix of your 2-qubit circuit. This representation decomposes the density matrix into a linear combination of Pauli matrices.
In your case, the circuit consists of:
Hadamard gate (H) on qubit 0
Controlled-NOT gate (CX) with qubit 0 as control and qubit 1 as target
To understand why the YY term is negative, let's analyze the circuit:
Step 1: Hadamard gate on qubit 0
The Hadamard gate creates a superposition state on qubit 0: |0+ |1. This can be represented as:
ρ = |ψψ| = (|00+ |10+ |01+ |11) / 2
Step 2: Controlled-NOT gate
The CX gate applies a NOT operation to qubit 1 if qubit 0 is in the state |1. This creates entanglement between the qubits.
After applying CX, the state becomes:
ρ = |ψψ| = (|00+ |11- |01+ |10) / 2
Notice the relative phase difference between |00and |11.
Pauli Vector representation
Now, let's decompose the density matrix ρ into Pauli matrices:
ρ = (I ⊗ I + X ⊗ X + Y ⊗ Y - Z ⊗ Z) / 4
Here:
I is the identity matrix
X, Y, Z are the Pauli matrices
⊗ denotes the tensor product
The coefficients of the Pauli Vector representation are:
II: +1
XX: +1
YY: -1 (this is what you observed)
ZZ: +1
The negative coefficient for YY arises from the relative phase difference between |00and |11in the entangled state. Specifically, it's due to the antisymmetric nature of the Bell state |ψ= (|00- |11)/√2, which is present in the density matrix.
In summary, the negative YY term in the PauliVec representation is a consequence of the entanglement generated by the CX gate and the relative phase difference between the computational basis states.
Could I see a calculation of the tensor product for the two Ys?
Here's the calculation for the tensor product of two Y Pauli matrices:
Y ⊗ Y =
= |0⊗0 |0⊗1 |1⊗0 |1⊗1
|0 -i 0 0 | |0 0 -i 0 |
|0 i 0 0 | |0 0 i 0 |
|0 0 -i 0 | |0 -i 0 0 |
|0 0 i 0 | |0 0 0 -i |
Now, let's calculate the expectation value of Y ⊗ Y in the state:
ρ = (|00+ |11- |01+ |10) / 2
We'll compute the trace of the product ρ(Y ⊗ Y):
Tr[ρ(Y ⊗ Y)] =
= (∑ij ρij (Y ⊗ Y)ji) / 2
= [ρ00 (Y ⊗ Y)00 + ρ11 (Y ⊗ Y)11 + ρ01 (Y ⊗ Y)10 + ρ10 (Y ⊗ Y)01] / 2
Using ρij values from ρ:
ρ00 = ρ11 = 1/2, ρ01 = ρ10 = 0
Tr[ρ(Y ⊗ Y)] =
= [(1/2)(-i) + (1/2)(i)] / 2
= -1/2 - 1/2
= -1
So, the coefficient of YY in the PauliVec representation is indeed -1
PERPLEXITY:
No comments:
Post a Comment