Pure and Mixed States 纯态与混合态

本文介绍了量子力学中的纯态和混合态。纯态可以用单个状态向量表示,完全确定系统状态;而混合态则表示我们对系统的状态只有部分或无知识,需要用概率组合来描述。混合态并非不同波函数的叠加,而是无相干混合。密度算子ρ^用于表示当系统初始状态不确定时的状态,其性质包括归一化和熵等。纯态的密度矩阵等于其投影算子,而混合态的密度矩阵由所有可能纯态的概率加权求和得到。

1. Pure States

A pure state is any state that can be represented by a single state vector ∣ ψ ⟩ |\psi \rangle ψ. What this means in practice is that at any time we can say for certain (with 100% probability) that our system is in state ∣ ψ ⟩ |\psi \rangle ψ. In other words, for a pure state we have complete knowledge of the system and therefore know exactly what state it is in. ∣ 0 ⟩ |0\rangle 0, ∣ 1 ⟩ |1\rangle 1, ∣ 0 ⟩ + ∣ 1 ⟩ 2 \frac{|0\rangle+|1\rangle}{\sqrt{2}} 2 0+1 are all examples of pure states.

2. Mixed States

A system is in a mixed state if we have limited or no knowledge of the state that it is prepared in. Thus we cannot be 100% sure if it is in pure state ∣ ψ 1 ⟩ |\psi_1\rangle ψ1 or ∣ ψ 2 ⟩ |\psi_2\rangle ψ2 or any other possible states. We therefore must describe the state of the system as a probabilistic combination of all the pure states it could possibly have been prepared in. There are several reasons this may be the case:

  • inconsistencies with lab equipment;
  • entanglement with an external system that is out of our control. (See Sec.4 below.)

Mixed states are not superpositions of different wavefunctions, but incoherent mixtures. For example, if ∣ V ⟩ |V\rangle V is a vertically polarized photon, and ∣ H ⟩ |H\rangle H is a horizontally polarized photon, then the superposition ( 1 / 2 ) ( ∣ V ⟩ + ∣ H ⟩ (1/\sqrt{2}) (|V\rangle+|H\rangle (1/2 )(V+H) is a diagonally polarized photon, while the unpolarized photon is a mixture of half ∣ V ⟩ |V\rangle V and half ∣ H ⟩ |H\rangle H, described by the density matrix 1 / 2 ( ∣ V ⟩ ⟨ V ∣ + ∣ V ⟩ ⟨ H ∣ ) 1/\sqrt{2}(|V\rangle \langle V | + |V\rangle\langle H|) 1/2 (VV+VH). The superposition is in both states, the mixture is in perhaps one or perhaps the other.

Suppose we want to compute the ensemble expectation of an operator A A A. In a pure state ∣ ψ n ⟩ |\psi_n\rangle ψn, the quantum expectation is < A > p u r e = ∫ ψ n ∗ A ψ n = ⟨ ψ n ∣ A ∣ ψ n ⟩ = Tr ( ∣ ψ n ⟩ ⟨ ψ n ∣ A ) \left<A\right>_{pure}=\int\psi_n^*A\psi_n=\langle\psi_n|A|\psi_n\rangle=\text{Tr}(|\psi_n\rangle\langle\psi_n|A) Apure=ψnAψn=ψnAψn=Tr(ψnψnA) but in the ensemble of pure states { ∣ ψ n ⟩ } \{|\psi_n\rangle\} { ψn} the expectation is the probabilistic weighted averages of the expectation values of the pure states: < A > m i x e d = ∑ n p n ( ∫ ψ n ∗ A ψ n ) = ∑ n p n ⟨ ψ n ∣ A ∣ ψ n ⟩ = ∑ n p n Tr ( ∣ ψ n ⟩ ⟨ ψ n ∣ A ) = Tr ( ρ ^ A ) . \left<A\right>_{mixed}=\sum_n p_n\left(\int\psi_n^*A\psi_n\right)=\sum_n p_n\langle\psi_n|A|\psi_n\rangle=\sum_n p_n\text{Tr}(|\psi_n\rangle\langle\psi_n|A)=\text{Tr}(\hat{\rho}A). Amixed=npn(ψnAψn)=npnψnAψn=npnTr(ψnψnA)=Tr(ρ^A). The Traces in the above equalities will be discussed in the following.

3. The Density Operator, ρ ^ \hat{\rho} ρ^

We want to avoid carrying around the particular states ∣ ψ n ⟩ |\psi_n\rangle ψn. Pick any complete orthonormal basis ∣ ϕ i ⟩ |\phi_i\rangle ϕi, then the identity operator is I ^ = ∑ i ∣ ϕ i ⟩ ⟨ ϕ i ∣ \hat{I}=\sum_i |\phi_i\rangle \langle\phi_i| I^=iϕiϕi. Substitute the identity into < A > m i x e d \left<A\right>_{mixed} Amixed, we have < A > m i x e d = ∑ i ⟨ ϕ i ∣ A ( ∑ n p n ∣ ψ n ⟩ ⟨ ψ n ∣ ) ∣ ϕ i ⟩ = Tr ( A ρ ^ ) \left<A\right>_{mixed}=\sum_i \langle\phi_i|A\left(\sum_n p_n |\psi_n\rangle \langle\psi_n|\right)|\phi_i\rangle=\text{Tr}(A\hat{\rho}) Amixed=iϕiA(npnψnψn)ϕi=Tr(Aρ^)

The density operator can be used to represent the state of the system when we don’t know the starting state with certainty. It is a more general form of the state vector (used to describe pure states). (Eq.1) ρ ^ = ∑ n = 1 N p n ∣ ψ n ⟩ ⟨ ψ n ∣ \hat{\rho}=\sum_{n=1}^N p_n |\psi_n\rangle \langle\psi_n|\tag{Eq.1} ρ^=n=1Npnψnψn(Eq.1) where p i p_i pi is the probability of the system being in pure state ∣ ψ i ⟩ |\psi_i\rangle ψi at the start. The set of pure states { ∣ ψ i ⟩ } \{|\psi_i\rangle\} { ψi} in a general mixture need not be eigenstates or even orthogonal. The number N could be anything, and is not limited by the dimension of the Hilbert space(比如,可以与其他系统发生各种量子纠缠).

We could interpret the weights p i p_i pi as probabilities, but we have to be careful: we should not think of p i p_i pi as the probability to find the particle in the state ∣ ψ i ⟩ |\psi_i\rangle ψi!

Properties

  • Reduction to the pure case.
    If the starting state is a pure one ∣ ψ ⟩ |\psi\rangle ψ (i.e. there is only one possible state the system could be in at the start), then ρ ^ p u r e = ∣ ψ ⟩ ⟨ ψ ∣ \hat{\rho}_{pure}=|\psi\rangle\langle\psi| ρ^pure=ψψ. This is another definition for a pure state – any state that has a density operator ρ ^ = ∣ ψ ⟩ ⟨ ψ ∣ \hat{\rho}=|\psi\rangle\langle\psi| ρ^=ψψ is a pure one (i.e. its density matrix consists of a single projector).

    在坐标表象下从纯态的密度矩阵 ρ ^ p u r e \hat{\rho}_{pure} ρ^pure重构出纯态的波函数 ψ ( x ) \psi(x) ψ(x)
    [*Refer to Sethna《Entropy Order Parameters Complexity》7.1.1]
    In the position basis ∣ x ⟩ |x\rangle x, this pure-state density matrix has matrix elements ρ p u r e ( x , x ′ ) = ⟨ x ∣ ρ ^ p u r e ∣ x ′ ⟩ = ψ ∗ ( x ′ ) ψ ( x ) \rho_{pure}(x,x')=\langle x|\hat{\rho}_{pure}|x'\rangle=\psi^*(x')\psi(x) ρpure(x,x)=xρ^purex=ψ(x)ψ(x). We can reconstruct the wavefunction from a pure-state density matrix, up to an overall physically unmeasurable phase. In particular, since ψ ( x ) \psi(x) ψ(x) is normalized, ∫ d x ∣ ρ ( x , x ′ ) ∣ 2 = ∫ d x ∣ ψ ∗ ( x ′ ) ∣ 2 ∣ ψ ( x ) ∣ 2 = ∣ ψ ∗ ( x ′ ) ∣ 2 \int dx|\rho(x,x')|^2=\int dx |\psi^*(x')|^2|\psi(x)|^2=|\psi^*(x')|^2 dxρ(x,x)2=dxψ(x)2ψ(x)2=ψ(x)2 and thus ψ ( x ) = ρ ( x , x ′ ) d x ~ ∣ ρ ( x ~ , x ′ ) ∣ 2 . \psi(x)=\frac{\rho(x,x')}{\sqrt{d\tilde{x}|\rho(\tilde{x},x')|^2}}. ψ(x)=dx

<think>好的,我现在需要帮助用户解决如何用Python计算量子力学中的密度矩阵的问题。首先,我需要回顾一下密度矩阵的基本概念。密度矩阵是用来描述量子系统统计状的工具,特别是当系统处于混合态时。它通常表示为的系综的概率加权和,或者通过部分迹来约化复合系统的状。 用户提到了参考引用中的内容,特别是引用[2]提到了使用Python实现量子力学的例子,以及引用[3]中提到的toqito库。这可能意味着用户希望看到具体的代码示例,并且可能需要使用现有的库来简化计算。 首先,我需要确定密度矩阵的计算方法。对于,密度矩阵是向量外积的期望值。对于混合态,则是各个密度矩阵的概率加权和。此外,对于复合系统,可能需要通过部分迹来获得子系统的密度矩阵。 接下来,我应该考虑用户可能的背景。他们可能已经了解量子力学的基础知识,但需要具体的编程指导。因此,提供分步骤的示例代码会很有帮助。同时,用户提到了toqito库,所以需要展示如何使用该库中的相关函数,比如partial_trace。 我需要确保代码示例的正确性。例如,当计算的密度矩阵时,正确的做法是计算向量的外积。在Python中,可以使用numpy库的outer函数来实现。对于混合态的例子,需要构造各个的密度矩阵,并按概率加权求和。 另外,引用[2]中提到了使用向量表示函数和矩阵表示算符,这可能涉及到将量子表示为向量,并使用矩阵运算来处理它们。因此,在示例代码中使用numpy数组是合适的。 在编写部分迹的示例时,需要注意如何将复合系统的张量积分解,并对其中一个子系统进行迹操作。toqito的partial_trace函数可以简化这一过程,但需要正确指定要保留和约化的子系统。 用户还可能关心如何验证他们的计算结果是否正确。例如,的密度矩阵的迹平方应该等于1,而密度矩阵本身应该是秩1的矩阵。混合态的密度矩阵的迹平方应该小于1。这些验证步骤可以作为代码中的注释或附加说明。 最后,需要确保回答结构清晰,分步骤说明,并引用相关的参考文献。同时,生成的相关问题应该密度矩阵的应用、验证和扩展相关,帮助用户进一步探索。</think>### 如何用 Python 计算量子力学中的密度矩阵? 密度矩阵(密度算符)是量子力学中描述量子系统统计状的核心工具,适用于混合态。以下是分步实现方法及代码示例: --- #### 1. **密度矩阵** 密度矩阵定义为向量其共轭转置的外积: $$\rho = |\psi\rangle \langle\psi|$$ **代码示例**: ```python import numpy as np # 定义 |ψ> = (1/√2)(|0> + |1>) psi = np.array([1/np.sqrt(2), 1/np.sqrt(2)]) # 计算密度矩阵 rho_pure = np.outer(psi, psi.conj()) print("密度矩阵:\n", rho_pure) ``` **验证**: - 迹为 1:`np.trace(rho_pure)` 应输出 1.0。 - 条件:`np.trace(rho_pure @ rho_pure)` 应输出 1.0。 --- #### 2. **混合态密度矩阵** 混合态密度矩阵是多个密度矩阵的概率加权和: $$\rho = \sum_i p_i |\psi_i\rangle \langle\psi_i|$$ **代码示例**: ```python # 定义两个 |ψ1> = |0>, |ψ2> = |1> psi1 = np.array([1, 0]) psi2 = np.array([0, 1]) prob = [0.6, 0.4] # 概率权重 # 计算混合态密度矩阵 rho_mixed = prob[0] * np.outer(psi1, psi1.conj()) + prob[1] * np.outer(psi2, psi2.conj()) print("混合态密度矩阵:\n", rho_mixed) ``` **验证**: - 迹为 1:`np.trace(rho_mixed)` 应输出 1.0。 - 混合态条件:`np.trace(rho_mixed @ rho_mixed)` 应小于 1.0。 --- #### 3. **复合系统的约化密度矩阵** 对于复合系统 $A \otimes B$,子系统的约化密度矩阵通过对另一子系统取部分迹得到: $$\rho_A = \text{Tr}_B(\rho_{AB})$$ **代码示例(使用 `toqito` 库)**: ```python from toqito.states import basis from toqito.matrix_ops import partial_trace # 定义复合系统 Bell |Φ+> = (|00> + |11>)/√2 e0, e1 = basis(2, 0), basis(2, 1) bell_state = (np.kron(e0, e0) + np.kron(e1, e1)) / np.sqrt(2) rho_bell = np.outer(bell_state, bell_state.conj()) # 对子系统 B 取部分迹(保留子系统 A) rho_A = partial_trace(rho_bell, [2, 2], 2) # 参数说明:输入矩阵、子系统维度列表、待约化的子系统索引 print("约化密度矩阵(子系统 A):\n", rho_A) ``` --- #### 4. **使用 `qutip` 库简化操作** `qutip` 提供了更直观的量子力学计算接口: ```python from qutip import basis, ket2dm, ptrace # 密度矩阵 psi = (basis(2, 0) + basis(2, 1)).unit() rho_pure = ket2dm(psi) # 复合系统部分迹 rho_AB = rho_pure.tensor(rho_pure) # 示例:复合系统密度矩阵 rho_A = ptrace(rho_AB, 0) # 保留第一个子系统 ``` --- ### 关键注意事项 1. **数值稳定性**:高维密度矩阵计算需注意浮点精度误差。 2. **物理意义验证**: - 密度矩阵应为半正定矩阵(特征值非负)。 - 迹必须为 1。 3. **库依赖**:`numpy` 提供基础运算,`toqito` 和 `qutip` 封装了量子信息专用函数[^2][^3]。 ---
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值