量子计算的复习笔记
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 of a state is as follows:
- 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 and .
Ask GPT
对于一个 的密度矩阵 ,其迹和行列式可以用来计算纯度。具体步骤如下:
设 为 的密度矩阵,其特征值为 和 。
根据密度矩阵的性质, 和 。
纯度 。
利用迹和行列式的关系,可以推导出:
将迹和行列式代入公式:
对于给定的 和 ,计算纯度:
因此,纯度为 。
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 of a 2x2 matrix is .
How to calculate the eigenvalues and eigenvectors of a matrix?
Given a matrix , the eigenvalues and eigenvectors satisfy the following equation:
- 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 ?
Ask GPT
步骤 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 probability. Namely they have probability to overlook the eavesdropper.
What is Quantum Phase Estimation?
The goal is to find the eigenvalues of a unitary operator , given state .
where is the phase. So-called the phase estimation.
How?
Ask GPT
使用一组量子比特 来估计相位 。具体来说,相位 可以表示为:
这意味着我们可以通过测量这些量子比特的状态来得到相位的二进制小数表示。每个量子比特 对应于相位 的二进制表示中的一位,其中 是最高有效位, 是最低有效位。
例如,如果我们有三个量子比特 ,并且测量结果为 ,那么相位 可以表示为:
通过这种方式,我们可以利用量子比特的测量结果来精确估计相位 。
What is Quantum Fourier Transform (QFT)?
To use a set of qubits to estimate the phase of a quantum state.
Ask GPT
每个变量的含义:
- :量子傅里叶变换操作。
- :输入的量子态,通常表示为一个相位 。
- :归一化因子,确保变换后的量子态的总概率为 1,其中 是量子比特的数量。
- :求和符号,表示对所有可能的基态 进行求和。
- :复指数函数,表示相位因子,其中 是周期, 是虚数单位, 是输入态的相位, 是求和变量。
- :计算基态,表示量子态在标准基中的表示。
通过量子傅里叶变换,我们可以将输入的量子态 转换为一个新的量子态,该量子态是所有基态 的叠加,每个基态的系数由复指数函数 确定。
What is the relation between unitary operator and the number of qubits ?
Ask GPT
在量子计算中,使用两个量子比特的例子来说明如何应用 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- operations increases
exponentially. The math is such that these effects basically cancel out and the cost of estimating a
phase with error is proportional to .
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:
Ask GPT
费马小定理/欧拉定理: 如果x,n互质,则
证明1: , 当p是质数,a不是p的倍数时成立。因为两边的p-1个数里都有p-1种可能的余数,两边实际等价的
证明2: ,展开后,除了第一项,其他项都是的倍数,所以等于1
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