CS代写 1 Tensor (Kronecker) Product

1 Tensor (Kronecker) Product
For matrices A = [aij], B = [bij] their tensor product is A ⊗ B = [aijB]. Example 1
􏰃a11 a12􏰄 􏰃a11B a12B􏰄 A=aa,A⊗B=aBaB.
21 22 21 22

Copyright By PowCoder代写 加微信 powcoder

The properties of the tensor product that we will use:
(A+B)⊗C=A⊗C+B⊗C,C⊗(A+B)=C⊗A+C⊗B, (1)
(A ⊗ B) ⊗ C = A ⊗ (B ⊗ C), (2) (A ⊗ B)(C ⊗ D) = AC ⊗ BD. (3)
Let v1 be a vector from the standard basis of Cn1 and v2 be a vector from the standard basis of Cn2 . It is not difficult to see that v12 = v1 ⊗v2 is a vector from the standard basis of Cn1n2. It is easy to check that the concatenation rule for vectors in Dirac notation, which we introduced before, is in fact the tensor product.
0 0 0
0   0 0 1
v1 = 1 ,v2 =1,v12 =v1 ⊗v2 =0.
The concatenation of these vectors in Dirac notation, which we introduced before, gives the same result:
|1⟩|10⟩ = |110⟩ = v12. 1
In Dirac notation we have
v1 = |1⟩, v2 = |10⟩, and v12 = |110⟩.

Figure 1: Tensor product of unitary gates
In quantum circuits all gates, except measurements, conducted at the same time mean the unitary operation obtained as the tensor product of the individual unitary operators corresponding to the gates, like it is shown in Fig. 1.
Example 3 Let
􏰅0 1􏰆 􏰅1 0􏰆 U1 = X = 1 0 , U2 = Z = 0 −1
0 0 1 0 U1⊗U2=0 0 0−1 1 0 0 0
0 −1 0 0 For a generic quantum state |v⟩ we have
α00  |v⟩ = α00|00⟩ + … + α11|11⟩ = α01
α00 α10
|w⟩=U1 ⊗U2|v⟩=U1 ⊗U2α01=−α11  α10 α00
= α10|00⟩ − α11|01⟩ + α00|10⟩ − α01|11⟩. (4)
α10  α11

We can do these calculations using only Dirac notations (no linear algebra notations), and in fact it is easier to do computations in this way. Recall that
X|0⟩ = |1⟩, X|1⟩ = |0⟩, Z|0⟩ = |0⟩, Z|1⟩ = −|1⟩. Using this, we get
U1 ⊗U2|v⟩=X⊗Z|v⟩=α00(X⊗Z)|00⟩+…+α11(X⊗Z)|11⟩ = α00(X|0⟩ ⊗ Z|0⟩) + … + α11(X|1⟩ ⊗ Z|1⟩)
Usually we drop ”⊗” and write the last expression as
α00(X|0⟩Z|1⟩) + … + α11(X|1⟩Z|1⟩)
=α00|1⟩|0⟩ + α01|1⟩(−|1⟩) + α10|0⟩|0⟩ + α11|0⟩(−|1⟩) =α00|10⟩ − α11|11⟩ + α10|00⟩ − α11|01⟩.
Thus we obtained (4).
Example 4 Let us consider the next circuit
Figure 2: The tensor product of a gate and wire
We recall that
and therefore
H|0⟩ = √1 (|0⟩ + |1⟩), H|1⟩ = √1 (|0⟩ − |1⟩), 22
|w⟩ = (H ⊗ I2)|v⟩. 3

We can obtain this result using only Dirac notation:
(H ⊗ I2)|v⟩ = α00H|0⟩|0⟩ + α01H|0⟩|1⟩ + α10H|1⟩|0⟩ + α11H|1⟩|1⟩ We used that I2|0⟩ = |0⟩, I2|1⟩ = |1⟩
=α00√1 (|0⟩+|1⟩)|0⟩+α01√1 (|0⟩+|1⟩)|1⟩+α10√1 (|0⟩−|1⟩)|0⟩+α11√1 (|0⟩−|1⟩)|1⟩ 2222
= √1 􏰁α00(|00⟩ + |10⟩) + α01(|01⟩ + |11⟩) + α10(|00⟩ − |10⟩) + α11(|01⟩ − |11⟩)􏰂 2
= √1 􏰁(α00 + α10)|00⟩ + (α01 + α11)|01⟩ + (α00 − α10)|10⟩ + (α01 − α11)|11⟩􏰂. 2
2 Circuit for Preparing EPR Pairs
As we discussed an EPR pair is two qubits in the state √1 (|00⟩ + |11⟩). The
|ψ1⟩ = |00⟩,
|ψ2⟩ = (H ⊗ I2)|00⟩ = √1 (|0⟩ + |1⟩)|0⟩ = √1 (|00⟩ + |10⟩),
|ψ3⟩ = √1 (|00⟩ + |11⟩). 2
3 Superdense Coding
Superdense coding allows one to send two classical bits by sending only one qubit, under the condition that we shared in advance an EPR pair between
following simple circuit produces for us an EPR pair:
Figure 3: Preparing an EPR pair

the transmitter and receiver.
Figure 4: EPR pair is shared in advance between Alice and Bob
1. We prepare 2 qubits in the state √1 (|00⟩ + |11⟩). We will use :
􏰅0 1􏰆 􏰅1 0􏰆 􏰅0 −i􏰆 X = 1 0 , Z = 0 −1 , Y = i 0
2. Alice wants to send 2 classical bits to Bob.
2 Classical Bits 00
Alice’s Action Nothing
Apply X to 1st qubit Apply Z to 1st qubit Apply iY to 1st qubit
New state of the 2 qubits |ψ00⟩ = √1 (|00⟩ + |11⟩)
|ψ01⟩ = √1 (|10⟩ + |01⟩) 2
|ψ10⟩ = √1 (|00⟩ − |11⟩) 2
|ψ11⟩ = √1 (|01⟩ − |10⟩) 2
3. Alice sends her qubit to Bob.
4. Now Bob has two qubits in one of the states
|ψ00⟩, |ψ01⟩, |ψ10⟩, |ψ11⟩.
5. Bob uses these two qubits as the input for the quantum circuit shown
in Fig. 5 and obtains classical bits j1, j2. 5

Figure 5: Circuit for restoring classical bits j1 and j2
Input States
|ψ00 ⟩ |ψ01 ⟩ |ψ10 ⟩ |ψ11 ⟩
j1 j2 0 0 0 1 1 0 1 1
4 Simulation of Classical Circuits with Quan- tum Circuits
Quantum circuits are always reversible (before the measurement blocks) since they are unitary operations. Classical circuits are typically not reversible, for example any 2 inputs and 1 output gate (like AND gate) is not reversible. However, it is possible to convert any classical circuits into reversible form. The complexity of the new classical reversible circuit is only about 2 times larger than the complexity of the original circuit.
Any classical circuit can be simulated by a quantum circuit. The following quantum circuits, that involve only Toffoli gate, can be used to simulate classical gates. In these circuits quantum states |a⟩ and |b⟩ can take only values |0⟩ or |1⟩ and therefore their behaviour is classical.
Figure 6: Simulation of AND gate
Example 5 The quantum circuits shown on Fig. 9 and Fig. 10 simulate classical NAND gate (the second circuit is simpler of course):

Figure 7: Simulation of NOT gate
Figure 8: Simulation of FANOUT gate
Figure 9: Simulation of NAND gate
Figure 10: More efficient simulation of NAND gate

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com