量子计算中的线性代数工具
给定一个 n n n 维 ket 的集合 { ∣ b 1 ⟩ , ∣ b 2 ⟩ , ⋅ ⋅ ⋅ , ∣ b n ⟩ } \{|b_1\rangle, |b_2\rangle, ···, |b_n\rangle\} {∣b1⟩,∣b2⟩,⋅⋅⋅,∣bn⟩}, 检验它是否构成一组标准正交基
解决办法:
首先构建 A = [ ∣ b 1 ⟩ ∣ b 2 ⟩ ⋅ ⋅ ⋅ ∣ b n ⟩ ] A=[|b_1\rangle |b_2\rangle ··· |b_n\rangle] A=[∣b1⟩∣b2⟩⋅⋅⋅∣bn⟩] , 然后计算 A T A A^TA ATA.
如果结果是单位矩阵, 他就是一组标准正交基, 否则不是.
给定一组标准正交基 { ∣ b 1 ⟩ , ∣ b 2 ⟩ , ⋅ ⋅ ⋅ , ∣ b n ⟩ } \{|b_1\rangle, |b_2\rangle, ···, |b_n\rangle\} {∣b1⟩,∣b2⟩,⋅⋅⋅,∣bn⟩} 和一个 ket ∣ v ⟩ |v\rangle ∣v⟩, 将这个ket表示成基向量的线性组合, 也就是说解方程 ∣ v ⟩ = x 1 ∣ b 1 ⟩ + x 2 ∣ b 2 ⟩ + ⋅ ⋅ ⋅ + x i ∣ b i ⟩ + ⋅ ⋅ ⋅ + x n ∣ b n ⟩ |v\rangle=x_1|b_1\rangle+x_2|b_2\rangle+···+x_i|b_i\rangle+···+x_n|b_n\rangle ∣v⟩=x1∣b1⟩+x2∣b2⟩+⋅⋅⋅+xi∣bi⟩+⋅⋅⋅+xn∣bn⟩
解决办法:
构建 A = [ ∣ b 1 ⟩ ∣ b 2 ⟩ ⋅ ⋅ ⋅ ∣ b n ⟩ ] A=[|b_1\rangle |b_2\rangle ··· |b_n\rangle] A=[∣b1⟩∣b2⟩⋅⋅⋅∣bn⟩] , 那么
[ x 1 x 2 ... x n ] = A T ∣ v ⟩ = [ ⟨ b 1 ∣ v ⟩ ⟨ b 2 ∣ v ⟩ ... ⟨ b n ∣ v ⟩ ] \begin{bmatrix}x_1\\x_2\\...\\x_n\end{bmatrix}=A^T|v\rangle=\begin{bmatrix}\langle b_1|v \rangle\\\langle b_2|v \rangle\\...\\\langle b_n|v \rangle\end{bmatrix} x1x2...xn =AT∣v⟩= ⟨b1∣v⟩⟨b2∣v⟩...⟨bn∣v⟩
给定一组标准正交基 { ∣ b 1 ⟩ , ∣ b 2 ⟩ , ⋅ ⋅ ⋅ , ∣ b n ⟩ } \{|b_1\rangle, |b_2\rangle, ···, |b_n\rangle\} {∣b1⟩,∣b2⟩,⋅⋅⋅,∣bn⟩} 和 ∣ v ⟩ = c 1 ∣ b 1 ⟩ + c 2 ∣ b 2 ⟩ + ⋅ ⋅ ⋅ + c i ∣ b i ⟩ + ⋅ ⋅ ⋅ + c n ∣ b n ⟩ |v\rangle=c_1|b_1\rangle+c_2|b_2\rangle+···+c_i|b_i\rangle+···+c_n|b_n\rangle ∣v⟩=c1∣b1⟩+c2∣b2⟩+⋅⋅⋅+ci∣bi⟩+⋅⋅⋅+cn∣bn⟩, 求 ∣ v ⟩ |v\rangle ∣v⟩ 的长度
解决办法:
使用 ∣ ∣ v ⟩ ∣ 2 = c 1 2 + c 2 2 + ⋅ ⋅ ⋅ + c i 2 + ⋅ ⋅ ⋅ c n 2 ||v\rangle|^2=c_1^2+c_2^2+···+c_i^2+···c_n^2 ∣∣v⟩∣2=c12+c22+⋅⋅⋅+ci2+⋅⋅⋅cn2
摘自: 《人人可懂的量子计算》