量子计算的复习笔记
What is Observables?
(Page 125 of the textbook)
- Observables are represented by hermitian operators. The result of an observation is always an eigenvalue of the hermitian.
- The expression
represents the expected value of observing on . - Observables in general do not commute. This means that the order of observation matters. Moreover, if the commutator of two observables is not zero, there is an intrinsic limit to our capability of measuring their values simultaneously.
What is Measurement?
(Page 129 of the textbook)
- The end state of the measurement of an observable is always one of its eigenvectors.
- The probability for an initial state to collapse into an eigenvector of the observable is given by the length squared of the projection.
- When we measure several observables, the order of measurements matters.
What is Dynamics?
(Page 132 of the textbook)
- Quantum dynamics is given by unitary transformations.
- Unitary transformations are invertible; thus, all closed system dynamics are reversible in time (as long as no measurement is involved).
- The concrete dynamics is given by the Schr ̈odinger equation, which determines the evolution of a quantum system whenever its hamiltonian is specified.
What is density matrix?
A matrix that describes the state of a quantum system. It could be pure or mixed states.
For example, the density matrix
- Pure states:
- Mixed states:
The Trace of the density matrix is always 1.
How to distinguish between pure and mixed states?
Single-qubit pure states are represented by points on the Bloch sphere, while mixed states are represented by points inside the Bloch sphere.
Purity is a measure of the mixedness of a state. The purity of a state is 1 if and only if the state is pure.
Question: Given trace and determinant, how to determine the purity?
For example, if
Tips
对于一个
设
将迹和行列式代入公式:
对于给定的
因此,纯度为
What is trace?
The trace of a matrix is the sum of its diagonal elements.
What is determinant?
The determinant of a matrix is a scalar value that can be computed from the multiple of its eigenvalues.
For example, the determinant
How to calculate the eigenvalues and eigenvectors of a matrix?
Given a matrix
- Step 1: Calculate the characteristic equation of the matrix
: - Step 2: Solve the characteristic equation to get the eigenvalues
- Step 3: Substitute the eigenvalues back into the equation
to get the eigenvectors
How to calculate the eigenvalues and eigenvectors given a matrix
Tips
步骤 1: 计算矩阵
步骤 2: 解特征方程得到特征值
步骤 3: 将特征值代入方程
对于
展开并得到线性方程组:
简化并解方程组:如果
Note: as
What is a state?
- Amplitude:
, where amplitudes can be complex numbers - probability:
, where the square of the modulus can be the multiplication of the complex conjugate of the amplitude with itself (not simple multiplication!)
What is dense coding?
Dense coding is a quantum communication protocol that allows two parties to communicate two classical bits by sending a single qubit.
After preparing the Bell pair, Bob (the reciever) will hold onto the second qubit, and Alice (the sender) will apply the Z and/or X gates to the first qubit according to the two classical bits she wants to send.
Then Alice transmits the first qubit to Bob, who can then apply the CNOT gate between the first and the second qubit, and apply the Hadamard gate to the first qubit to recover the two classical bits.
With quantum entanglement, Alice can send two classical bits of information by send- ing only one qubit. However, to fully decode the information, Bob needs two qubits: the qubit sent by Alice and the qubit that Bob holds.
What is Quantum Key Distribution (QKD)?
To teleport the state of a qubit to another qubit.
BB84 is an early QKD protocol.
- Step 1: Alice prepares a random qubit
010011
and basesZXYXZY
, and sends the qubits to Bob. - Step 2: Bob measures the qubits with random bases
ZYZYXZ
. - Step 3: Alice and Bob share their bases publicly and discard the qubits measured in different bases.
- Step 4: Alice and Bob compare a subset of their qubits to check for eavesdropping.
- Step 5: Eeavesdropping can be detected if some qubits with the same bases have different values.
If there is a earvesdropper, the qubits will be different with
What is Quantum Phase Estimation?
The goal is to find the eigenvalues of a unitary operator
where
How?
Tips
使用一组量子比特
这意味着我们可以通过测量这些量子比特的状态来得到相位的二进制小数表示。每个量子比特
例如,如果我们有三个量子比特
通过这种方式,我们可以利用量子比特的测量结果来精确估计相位
What is Quantum Fourier Transform (QFT)?
To use a set of qubits to estimate the phase of a quantum state.
Tips
每个变量的含义:
:量子傅里叶变换操作。 :输入的量子态,通常表示为一个相位 。 :归一化因子,确保变换后的量子态的总概率为 1,其中 是量子比特的数量。 :求和符号,表示对所有可能的基态 进行求和。 :复指数函数,表示相位因子,其中 是周期, 是虚数单位, 是输入态的相位, 是求和变量。 :计算基态,表示量子态在标准基中的表示。
通过量子傅里叶变换,我们可以将输入的量子态
What is the relation between unitary operator
Tips
在量子计算中,使用两个量子比特的例子来说明如何应用 Hadamard 门(忽略归一化因子)后所需的操作:
我们可以看到,操作
所以,问题中的操作是:在第
One more point of importance. Generally it is not possible to represent a given phase exactly using a limited number of estimation qubits. Thus, there is typically a distribution of possible outcomes, which induce an error in the estimation. We’ll see an example in the code below. The error decreases expo- nentially with the number of estimation qubits, but the number of controlled-
What is RSA public key encryption?
Alice creates a public encryption function that anyone can encrypt, but only she can decrypt.
, where and are large prime numbers is a random number , where called Euler's totient function 同余,在模下相等- public:
, private: - 原理:如果
,则 - Bob:
- Alice:
Tips
费马小定理/欧拉定理: 如果x,n互质,则
证明1:
证明2:
What is Shor's algorithm?
Attempt to use period finding to factorize a number though quantum computing.
The classical part:
- Step 1: Choose a random number
between 1 and - Step 2: Find the greatest common divisor of
and , if it is not 1, then we have found a factor - Step 3: If the greatest common divisor is 1, then we find the period
of- Quantum part applies here
- Step 4: If
is odd, go back to step 1 - Step 5: If
is even, then is a non-trivial factor of
The quantum part:
- Step 1: Prepare two registers, one for the input and one for the data processing
- Step 2: Apply Hadamard gates to the first register to create a superposition of all possible inputs
- Step 3: Apply a quantum operation that computes
in superposition - Step 4: Measure the second register to collapse the superposition
- Step 5: Use the quantum Fourier transform to estimate the period