In this subsection, we check a calculation that would
be relatively difficult to check by hand.
Consider a pair of entangled qubits
and
, and another
entangled pair
and
. By performing a joint
measurement on, say
and
, we can put
and
in
an entangled state although they may be widely separated.
We begin by considering the most general projective measure
on
and
, and calculate the reduced density matrix for
a single qubit and the probability of outcome. In this
example we calculate these quantities two ways-- one,
directly from the density matrix formalism, and two, via
formulas taking advantage of the particulars of this
problem. To do the first calculation by hand would be
extremely unpleasant, as it involves multiplying
matrices with several factors in a single element. Carrying
it out below with Maxima is a concise exercise.
At present this example does not continue by discussing
the measurements that maximize the resulting entanglement
of
and
.
Qubits
and
are in the state
We consider the projective measurement
, that is
and
. We consider only a single basis vector
here, so we don't use the subscript
for Maxima vector name.
We need to use Maxima's
declare
to declare that
the components are complex.
The state
is normalized, but we don't need to impose that condition in
Maxima at this point.
The initial joint state
is pure and remains
so after the measurement applying
to qubits
and
.
But we write the density operator
because we will examine the reduced states, which are mixed.
In the case that
and
are projected onto
, the state
of the entire system of four qubits after the measurement is given by
| (8) |
where conjsimp
(supplied via the Maxima listserv by Barton Willis) replaces
with
,
and
n
is the
identity matrix.
The output was suppressed with the trailing dollar sign because the
is
a
matrix with large expressions for entries.
The reduced state of qubits
and
is obtained by tracing out components
and
corresponding to qubits
and
, ie
.
Likewise, the reduced state of just qubit
is
.
The second method of calculating
is as follows.
Considering the following map from
to
:
.
The Maxima function implementing the mapping (9) is
Then the second calculation of
, which we call rho_4a is given by
the following lines.
We compare (%o9) and (%o13), to see that the two methods of calculating
the reduced state for qubit
after the measurement give the same result
Now we compute the probability
that the state is in fact projected onto
.
Finally, we compare this to the trace computed by hand from the expression following (9),
which is given by
| (10) | ![]() |
Here we have used Maxima's
apply
and
create_list
functions.
Once again we compare the probabilities computed via the two methods
and see that they give the same result.