Reading Week 4 - Multiqubit Gates, Quantum Entanglement
2.11: Tensors (for me)
The Tensor Product or the Kronecker product, or the direct product is defined as follows. A new set of basis vectors
View this as a space
As an example, if
For a tensor product of 2x2 matrices, we just repeat entries into submatrices:
Notice:
if
while:
Thus:
5.4 (cont.) Multiqubit States (no Gates)
To catch up see Reading Week 3 - Ending Quantum Superposition, Starting Qubits#5.4 Quantum Gates
5.4.4: Multiqubit Gates
We'll learn how to represent a system of two or more qubits and the gate operations which are performed on two or more qubits.
5.4.5: Representing a Multi Qubit State
A system of
where we require:
Recollect the tensor math from Reading Week 4 - Multiqubit Gates, Quantum Entanglement#2.11 Tensors (for me). Assume
We require that
We use the
Sometimes, to save space, we contract the
As with a single qubit, the probability of measuring a single eigenvalue is via:
where here
The probability of measuring a 0 in the first qubit is:
A partial measurement of the system results in a new superposition state. We calculate the state by removing terms which are no longer applicable, and we must normalize the new superposition state since the sum of probabilities may not be 1:
similarly for measuring 1 in the first qubit:
5.6: Quantum Entanglement
In the last section, we looked at a quantum system with
Consider the following QC:
We have two qubits in the default q[0]
and perform a CNOT (see later section on multi-qubit systems) gate with target q[1]
and q[0]
being the control bit. We then measure q[0],q[1]
at the and put on the classical wire.
Step 1: Apply Gate
apply this in a tensor product to bring back to a 2 qubit system:
Step 2: Apply CNOT
Note that we cannot "factor" out the q[0]
and q[1]
. This resultant state is an entangled state and the qubits are said to be maximally entangled. The entangled qubits are the EPR Pair.
Here
Some example code to see entanglement:
q = QuantumRegister(2, 'q')
c = ClassicalRegister(2, 'c')
qc = QuantumCircuit(q, c)
qc.h(q[0])
qc.cx(q[0], q[1])
qc.measure(q[0], c[0])
qc.measure(q[1], c[1])
Lecture Slides: Multiple Qubit Systems
![[Physics CPE 345 Quantum Computing Lecture slides Week 4 Multi qubit systems 240424 2-1.pdf#page=1]]
Lecture Slides: Systems of Multiple Qubits
![[Physics CPE 345 Quantum Computing Lecture slides Week 4 Multi qubit systems 240501.pdf#page=13]]
Ch 5.4: (cont.) Multi-qubit Gates
We continue our discussion from before.
5.4.6: Controlled U Gates
The general form of a controlled-
where the unitary matrix
We get the mapping:
Notice the LHS qubit is the control bit, and the RHS qubit is the target qubit.
5.4.6.1 The Controlled NOT (CNOT) or Gate
Operates on two qubits. The first qubit serves as the control bit. The second is the target, and inverts whatever that state is:
where here
5.4.6.2: and (CPHASE) Gates
These operate similar to the
Here the
5.4.6.3: Controlled Hadamard Gate
It's the same idea, except replace the bottom right of the matrix with Reading Week 3 - Ending Quantum Superposition, Starting Qubits#5.4.1.3 The Hadamard Gate,
5.4.6.4: Controlled -Gate or the Gate
Same idea, except use the Reading Week 3 - Ending Quantum Superposition, Starting Qubits#5.4.2.3
5.4.6.5: Controlled -Gate or the gat
Same idea but applies a
5.4.6.6: Controlled -Gate or the Gate
Reading Week 3 - Ending Quantum Superposition, Starting Qubits#5.4.3.2
5.4.7: Extended Gates
- The Toffoli Gate is a Q Gate with two control qubits and one target qubit.
- The Gredkin Gate has one control get, but two target qubits
5.4.7.1: The Toffoli or CCNOT Gate or the Gate
- 3 qubit gate
- 2 control qubits
- 1 target qubit
- Applies NOT to the target, but ONLY if the control bits are in
here
5.4.7.2: The Fredkin or the CSWAP or the Gate
- Performs a controlled SWAP of two target qubits.
- It's a 3 qubit gate
5.4.7.3: The Deutsch Gate
- Is a 3 qubit gate
- 2 control
- 1 target
- When both controls are
the gate performs an operation