I would like to extract the state of single qubits from combined states, using QuTip (the Quantum Toolbox in Python. Is there some QuTiP function that will extract a single qubit state from a combined state?
Example
For example, suppose I begin with two qubits, |0⟩ and |1⟩. I can create these in QuTiP (as q1
and q2
) as follows:
q1 = basis(2,0)
q2 = basis(2,1)
This gives me:
q1=[10] and q2=[01].
I can then combine q1
and q2
using tensor multiplication:
q1q2 = tensor(q1, q2)
This gives me:
q1⊗q2=[0100]
Now, suppose that I apply a Hadamard gate to q1
, and Identity to q2
. I can do this as follows:
H = hadamard_transform(1)
I = qeye(2)
HI = tensor(H, I)
result = HI * q1q2
This returns H=[0.707106780.707106780.70710678−0.70710678] and I=[1001],
with result
:
(H⊗I)(q1⊗q2)=[0.7071067800.70710678000.7071067800.707106780.707106780−0.70710678000.707106780−0.70710678][0100]=[00.7071067800.70710678]
By reading off the values from this matrix, q1
is in the state |0⟩+|1⟩√2, and q2
is in the state |1⟩. Put another way, if we write q1
in the form α|0⟩+β|1⟩, we get α=1√2 and β=1√2. And for q2
we get α=0 and β=1.
Extraction
Given a combined state, finding the values of α and β for single qubits are what I mean by "extract a single qubit state from a combined state." I would like QuTiP to find those values for me. Of course in this simple case, I know I can do this by inspection; but in more complicated cases, I would like QuTiP to do it for me.
Answer
Before we talk about how to get QuTip to do what you're asking, we should make sure you understand what it means to "extract" one of the qubits" states. In general, such "extraction" is not possible.
Combined quantum systems
The question, we have four dimensional vectors representing the states of the combined two-qubit system. Note that when you write a vector in terms of components, there's an underlying assumed basis for the vector space. For example, when the question writes 1√2[0101],
How describe a sub-part of a combined system
Of course, if you make an entangled state, you can make measurements on just one of the qubits, so there must be some way to talk about the information contained in a single qubit without the second one even if the state can't be factored. To do this, we have to go beyond the usual state vector description of quantum systems and use a density matrix. Given a regular state |Ψ⟩, the associated density matrix ρ is ρ≡|Ψ⟩⟨Ψ|.
What's the density matrix for the Bell state (1/√2)(|00⟩+|11⟩)? Well, following the recipe, it's ρBell=12(|00⟩⟨00|+|00⟩⟨11|+|11⟩⟨00|+|11⟩⟨11|).
Answer to the question
QuTip supports combined systems, including the partial trace.
[a]: Note that there are bases in which the Bell state factors, but the states in those bases mix the two qubits. For example, a Bell state is factorable if you use the Bell states {|00⟩+|11⟩,|00⟩−|11⟩,|01⟩+|10⟩,|01⟩−|10⟩}
No comments:
Post a Comment