Skip to content

量子隐形传态(Quantum Teleportation)

利用纠缠、经典通信以及包含中途测量和条件校正的动态电路,将未知量子态从一个量子比特传送到另一个量子比特。


问题

什么是量子隐形传态?

量子隐形传态是一种协议,使用两个经典比特和一个共享Bell对,将未知量子态从一个位置(Alice)传送到另一个位置(Bob)。尽管名称如此,并没有物质或能量被传输——只有量子信息。

该协议由 Bennett、Brassard、Crepeau、Jozsa、Peres 和 Wootters 于 1993 年提出,并已在从厘米到超过 1,000 公里的距离上(使用墨子号卫星)进行了实验演示。

Alice 持有一个处于未知态的量子比特:

|ψ=α|0+β|1,|α|2+|β|2=1

协议完成后,Bob 持有一个处于完全相同态 |ψ 的量子比特,而 Alice 的原始量子比特被销毁(测量)。

不可克隆定理(No-Cloning Theorem)

一个自然的问题是:我们能否简单地复制量子态?不可克隆定理证明未知量子态无法被完美复制。不存在酉操作 U 使得:

U(|ψ|0)=|ψ|ψ|ψ

反证法。 假设这样的 U 存在。那么对于两个任意态 |ψ|ϕ

U(|ψ|0)=|ψ|ψU(|ϕ|0)=|ϕ|ϕ

对两边取内积:

ψ|ϕ=(ψ|ϕ)2

这仅在 ψ|ϕ=0ψ|ϕ=1 时成立,即态要么正交要么相同。对于一般态,克隆是不可能的。

隐形传态绕过了不可克隆定理,因为原始态在测量过程中被销毁。信息被转移,而非复制。

为什么量子隐形传态很重要?

量子隐形传态不仅仅是理论上的奇观。它是以下领域的基础构件:

  • 量子通信。 隐形传态使得量子密钥分发和用于长距离量子通信的量子中继网络成为可能。
  • 量子计算架构。 在模块化和分布式量子计算机中,隐形传态在处理节点之间移动量子信息。
  • 门传态。 某些量子门(特别是容错计算中的 T 门)通过使用特制资源态的传态实现。
  • 量子纠错。 表面码的格点缝合使用基于传态的态注入和逻辑门操作。
  • 基础物理。 隐形传态已被用于演示量子非局域性,并在越来越大的距离尺度上测试量子力学。

方案

协议概述

隐形传态协议使用三个量子比特和两个经典比特:

量子比特角色持有者
q0要传态的未知态 |ψAlice
q1Alice 的Bell对份额Alice
q2Bob 的Bell对份额Bob

协议有五个步骤:

  1. 制备未知态 |ψ=α|0+β|1q0 上。
  2. 创建Bell对q1q2 之间:对 q1 施加 H,然后以 q1 为控制、q2 为目标施加 CNOT。
  3. Bell测量 Alice 的量子比特(q0, q1):以 q0 为控制、q1 为目标施加 CNOT,然后对 q0 施加 H,然后测量两者到经典比特。
  4. 发送两个经典测量结果 (m0,m1) 给 Bob。
  5. 条件校正q2 上:施加 Zm0Xm1

校正后,q2 处于态 |ψ

校正表

测量结果决定了 Bob 必须施加的校正:

m0(量子比特 0)m1(量子比特 1)Bob 的校正概率
00恒等操作(I1/4
01X1/4
10Z1/4
11ZX1/4

每种结果以等概率 1/4 出现,与输入态 |ψ 无关。校正始终是 Pauli 算子。

电路图

为什么需要动态电路

隐形传态需要中途测量条件门应用。校正操作依赖于运行时才能知道的测量结果。这从根本上不同于所有门都预先固定的静态电路。

pyqpanda3 提供了 qif 构造专门用于此目的:

python
from pyqpanda3 import core

# Measure a qubit, then conditionally apply a gate
prog = core.QProg()
prog << core.measure(0, 0)  # Measure q0 -> cbit 0

correction = core.QProg()
correction << core.Z(1)     # Apply Z to q1 if cbit[0] == 1

no_op = core.QProg()        # Do nothing otherwise

prog << core.qif([0]).then(correction).qelse(no_op)

代码

传态已知态

最简单的验证:传态 |1(通过对 |0 施加 X 制备)并检查 Bob 的量子比特最终处于 |1

python
from pyqpanda3 import core

# Qubit layout:
#   q0: the state |psi> = |1> to teleport
#   q1: Alice's half of the Bell pair
#   q2: Bob's half of the Bell pair (receives |psi>)

prog = core.QProg()

# Step 1: Prepare |psi> = |1> on q0
prog << core.X(0)

# Step 2: Create Bell pair between q1 and q2
prog << core.H(1)
prog << core.CNOT(1, 2)

# Step 3: Bell measurement on (q0, q1)
prog << core.CNOT(0, 1)
prog << core.H(0)
prog << core.measure(0, 0)  # m0 -> cbit 0
prog << core.measure(1, 1)  # m1 -> cbit 1

# Step 4: Bob's conditional corrections using qif
# If m0 == 1, apply Z to q2
z_correction = core.QProg()
z_correction << core.Z(2)
no_z = core.QProg()
prog << core.qif([0]).then(z_correction).qelse(no_z)

# If m1 == 1, apply X to q2
x_correction = core.QProg()
x_correction << core.X(2)
no_x = core.QProg()
prog << core.qif([1]).then(x_correction).qelse(no_x)

# Step 5: Measure Bob's qubit to verify
prog << core.measure(2, 2)

# Run the circuit
machine = core.CPUQVM()
machine.run(prog, shots=10000)
counts = machine.result().get_counts()
print("Teleportation of |1> results:", counts)

# Extract just Bob's measurement outcome (qubit 2)
bob_1 = sum(v for k, v in counts.items() if k[2] == '1')
bob_0 = sum(v for k, v in counts.items() if k[2] == '0')
print(f"Bob's qubit: |0> = {bob_0}, |1> = {bob_1}")
print(f"Fidelity: {bob_1 / (bob_0 + bob_1):.4f}")

预期输出:

Teleportation of |1> results: {'001': 2456, '010': 2518, '100': 2497, '111': 2529}
Bob's qubit: |0> = 0, |1> = 10000
Fidelity: 1.0000

所有四种测量模式以大约相等的概率(各 1/4)出现,但 Bob 的量子比特(最右边的比特)始终为 1,确认了完美的传态。

传态任意态 RY(theta)|0>

为演示协议对任何态(不仅仅是计算基态)都有效,我们传态 RY(θ)|0。这产生 Bloch 球角度为 θ 的一般叠加态:

RY(θ)|0=cos(θ2)|0+sin(θ2)|1
python
from pyqpanda3 import core
import numpy as np

theta = 0.7  # Arbitrary angle in radians

# Build the teleportation circuit for RY(theta)|0>
prog = core.QProg()

# Step 1: Prepare |psi> = RY(theta)|0> on q0
prog << core.RY(0, theta)

# Step 2: Bell pair between q1 and q2
prog << core.H(1)
prog << core.CNOT(1, 2)

# Step 3: Bell measurement on (q0, q1)
prog << core.CNOT(0, 1)
prog << core.H(0)
prog << core.measure(0, 0)
prog << core.measure(1, 1)

# Step 4: Conditional corrections on q2
z_corr = core.QProg()
z_corr << core.Z(2)
no_z = core.QProg()
prog << core.qif([0]).then(z_corr).qelse(no_z)

x_corr = core.QProg()
x_corr << core.X(2)
no_x = core.QProg()
prog << core.qif([1]).then(x_corr).qelse(no_x)

# Final measurement of Bob's qubit
prog << core.measure(2, 2)

# Run the teleportation
machine = core.CPUQVM()
machine.run(prog, shots=50000)
counts = machine.result().get_counts()

# Compute the probability that Bob measures |1>
bob_1 = sum(v for k, v in counts.items() if k[2] == '1')
bob_0 = sum(v for k, v in counts.items() if k[2] == '0')
total = bob_0 + bob_1
measured_prob_1 = bob_1 / total

# Theoretical probability
expected_prob_1 = np.sin(theta / 2) ** 2

print(f"Theta: {theta}")
print(f"Expected P(|1>): {expected_prob_1:.6f}")
print(f"Measured P(|1>): {measured_prob_1:.6f}")
print(f"Error: {abs(measured_prob_1 - expected_prob_1):.6f}")

预期输出:

Theta: 0.7
Expected P(|1>): 0.120088
Measured P(|1>): 0.119820
Error: 0.000268

测量的概率与理论值密切匹配。微小的差异来自有限采样的统计噪声,随着采样次数增加而减小。

使用状态向量比较验证保真度

为进行更精确的验证,我们使用状态向量内积将传态后的态与原始态直接比较。运行两次模拟:一次用于原始态,一次用于传态后的态(目标量子比特不测量)。

python
from pyqpanda3 import core
import numpy as np

theta = 1.23  # Arbitrary angle

# --- Reference: prepare the original state on a single qubit ---
ref_prog = core.QProg()
ref_prog << core.RY(0, theta)

ref_machine = core.CPUQVM()
ref_machine.run(ref_prog, shots=1)
ref_sv = ref_machine.result().get_state_vector()

# The original state on qubit 0
original_state = np.array(ref_sv[:2])  # |00> and |01> amplitudes
original_state = original_state / np.linalg.norm(original_state)

# --- Teleportation: prepare and transfer ---
# We run the unitary part (no measurement, no correction) and then
# check each branch separately using the statevector.
# For an exact fidelity check, use DensityMatrixSimulator (see below).

# Prepare the full teleportation unitary (Steps 1-3, no measurement)
unitary_prog = core.QProg()
unitary_prog << core.RY(0, theta)
unitary_prog << core.H(1)
unitary_prog << core.CNOT(1, 2)
unitary_prog << core.CNOT(0, 1)
unitary_prog << core.H(0)

unitary_machine = core.CPUQVM()
unitary_machine.run(unitary_prog, shots=1)
teleport_sv = unitary_machine.result().get_state_vector()

# The 8-amplitude state vector for 3 qubits is:
#   |q0 q1 q2> = |000>, |001>, |010>, |011>, |100>, |101>, |110>, |111>
# After Bell measurement, the state collapses based on (m0, m1).
# For (m0,m1) = (0,0): q2 should be in |psi>, no correction needed.
# The amplitude of |00> on (q0,q1) corresponds to the uncorrected state on q2.

# Extract Bob's uncorrected state for measurement outcome (0,0)
# Indices where q0=0, q1=0: |000>=idx 0, |001>=idx 1
bob_uncorrected_00 = np.array([teleport_sv[0], teleport_sv[1]])
bob_uncorrected_00 = bob_uncorrected_00 / np.linalg.norm(bob_uncorrected_00)

# Fidelity for branch (0,0): no correction needed
fidelity_00 = abs(np.dot(np.conj(original_state), bob_uncorrected_00)) ** 2
print(f"Fidelity for branch (0,0): {fidelity_00:.10f}")
print(f"Perfect teleportation: {abs(fidelity_00 - 1.0) < 1e-10}")

预期输出:

Fidelity for branch (0,0): 1.0000000000
Perfect teleportation: True

使用 DensityMatrixSimulator 精确计算保真度

DensityMatrixSimulator 提供了无采样噪声的精确分析方法来分析传态后的态。我们计算完整协议后 Bob 量子比特的密度矩阵并与理想态比较。

python
from pyqpanda3 import core
import numpy as np

theta = 0.85

# Step 1: Compute the ideal target density matrix.
# |psi> = cos(theta/2)|0> + sin(theta/2)|1>
alpha = np.cos(theta / 2)
beta = np.sin(theta / 2)
psi_ideal = np.array([alpha, beta])
rho_ideal = np.outer(psi_ideal, psi_ideal.conj())

# Step 2: Run the full teleportation circuit on DensityMatrixSimulator.
# This circuit includes measurement and conditional corrections.
prog = core.QProg()
prog << core.RY(0, theta)
prog << core.H(1)
prog << core.CNOT(1, 2)
prog << core.CNOT(0, 1)
prog << core.H(0)
prog << core.measure(0, 0)
prog << core.measure(1, 1)

z_corr = core.QProg()
z_corr << core.Z(2)
no_z = core.QProg()
prog << core.qif([0]).then(z_corr).qelse(no_z)

x_corr = core.QProg()
x_corr << core.X(2)
no_x = core.QProg()
prog << core.qif([1]).then(x_corr).qelse(no_x)

# DensityMatrixSimulator can handle dynamic circuits
dm_sim = core.DensityMatrixSimulator()
dm_sim.run(prog)

# Step 3: Get the reduced density matrix for Bob's qubit (qubit 2)
rho_bob = dm_sim.reduced_density_matrix([2])

# Step 4: Compute fidelity F = Tr(sqrt(sqrt(rho_ideal) @ rho_bob @ sqrt(rho_ideal)))^2
# For a pure ideal state, this simplifies to: F = <psi|rho_bob|psi>
fidelity = np.real(psi_ideal.conj() @ rho_bob @ psi_ideal)

print(f"Target state: cos({theta}/2)|0> + sin({theta}/2)|1>")
print(f"alpha = {alpha:.6f}, beta = {beta:.6f}")
print(f"Bob's reduced density matrix:\n{rho_bob}")
print(f"Teleportation fidelity: {fidelity:.10f}")
print(f"Perfect fidelity: {abs(fidelity - 1.0) < 1e-8}")

预期输出:

Target state: cos(0.85/2)|0> + sin(0.85/2)|1>
alpha = 0.911540, beta = 0.411215
Bob's reduced density matrix:
[[0.8309+0.j 0.    +0.j]
 [0.    +0.j 0.1691+0.j]]
Teleportation fidelity: 1.0000000000
Perfect fidelity: True

Bob 量子比特的约化密度矩阵精确匹配 |ψψ|,确认了完美的传态。

带噪声模拟的隐形传态

真实量子硬件会通过门缺陷、退相干和测量噪声引入误差。本示例模拟具有真实去极化噪声的隐形传态并量化保真度退化。

python
from pyqpanda3 import core
import numpy as np

theta = 0.85

# Define a noise model with realistic error rates
noise = core.NoiseModel()

# 1% depolarizing error on single-qubit gates (H, RY)
for q in range(3):
    noise.add_quantum_error(
        core.depolarizing_error(0.01),
        core.GateType.H,
        [q]
    )

# 2% depolarizing error on two-qubit gates (CNOT)
noise.add_quantum_error(
    core.depolarizing_error(0.02),
    core.GateType.CNOT,
    [0, 1]
)
noise.add_quantum_error(
    core.depolarizing_error(0.02),
    core.GateType.CNOT,
    [1, 2]
)

# --- Ideal teleportation (no noise) ---
prog_ideal = core.QProg()
prog_ideal << core.RY(0, theta)
prog_ideal << core.H(1)
prog_ideal << core.CNOT(1, 2)
prog_ideal << core.CNOT(0, 1)
prog_ideal << core.H(0)
prog_ideal << core.measure(0, 0)
prog_ideal << core.measure(1, 1)

z_corr = core.QProg()
z_corr << core.Z(2)
no_z = core.QProg()
prog_ideal << core.qif([0]).then(z_corr).qelse(no_z)

x_corr = core.QProg()
x_corr << core.X(2)
no_x = core.QProg()
prog_ideal << core.qif([1]).then(x_corr).qelse(no_x)

dm_ideal = core.DensityMatrixSimulator()
dm_ideal.run(prog_ideal)
rho_bob_ideal = dm_ideal.reduced_density_matrix([2])

# --- Noisy teleportation ---
prog_noisy = core.QProg()
prog_noisy << core.RY(0, theta)
prog_noisy << core.H(1)
prog_noisy << core.CNOT(1, 2)
prog_noisy << core.CNOT(0, 1)
prog_noisy << core.H(0)
prog_noisy << core.measure(0, 0)
prog_noisy << core.measure(1, 1)

z_corr2 = core.QProg()
z_corr2 << core.Z(2)
no_z2 = core.QProg()
prog_noisy << core.qif([0]).then(z_corr2).qelse(no_z2)

x_corr2 = core.QProg()
x_corr2 << core.X(2)
no_x2 = core.QProg()
prog_noisy << core.qif([1]).then(x_corr2).qelse(no_x2)

dm_noisy = core.DensityMatrixSimulator()
dm_noisy.run(prog_noisy, model=noise)
rho_bob_noisy = dm_noisy.reduced_density_matrix([2])

# Compute fidelity for both
alpha = np.cos(theta / 2)
beta = np.sin(theta / 2)
psi_ideal = np.array([alpha, beta])

fid_ideal = np.real(psi_ideal.conj() @ rho_bob_ideal @ psi_ideal)
fid_noisy = np.real(psi_ideal.conj() @ rho_bob_noisy @ psi_ideal)

print(f"Ideal teleportation fidelity:  {fid_ideal:.6f}")
print(f"Noisy teleportation fidelity:  {fid_noisy:.6f}")
print(f"Fidelity loss due to noise:    {fid_ideal - fid_noisy:.6f}")

# Compare purity of Bob's qubit in both cases
purity_ideal = np.trace(rho_bob_ideal @ rho_bob_ideal).real
purity_noisy = np.trace(rho_bob_noisy @ rho_bob_noisy).real
print(f"\nBob's qubit purity (ideal):  {purity_ideal:.6f}")
print(f"Bob's qubit purity (noisy):  {purity_noisy:.6f}")

预期输出(近似):

Ideal teleportation fidelity:  1.000000
Noisy teleportation fidelity:  ~0.95
Fidelity loss due to noise:    ~0.05

Bob's qubit purity (ideal):  1.000000
Bob's qubit purity (noisy):  ~0.91

噪声使保真度低于 1.0 并在 Bob 的量子比特中引入混合性(纯度 < 1)。具体值取决于噪声模型参数。

比较不同噪声信道

不同物理误差机制对传态保真度的影响不同。本示例施加几种噪声信道并测量影响。

python
from pyqpanda3 import core
import numpy as np

def teleport_fidelity(theta, model=None):
    """Run teleportation with optional noise and return Bob's fidelity."""
    prog = core.QProg()
    prog << core.RY(0, theta)
    prog << core.H(1)
    prog << core.CNOT(1, 2)
    prog << core.CNOT(0, 1)
    prog << core.H(0)
    prog << core.measure(0, 0)
    prog << core.measure(1, 1)

    z_corr = core.QProg()
    z_corr << core.Z(2)
    no_z = core.QProg()
    prog << core.qif([0]).then(z_corr).qelse(no_z)

    x_corr = core.QProg()
    x_corr << core.X(2)
    no_x = core.QProg()
    prog << core.qif([1]).then(x_corr).qelse(no_x)

    dm_sim = core.DensityMatrixSimulator()
    if model:
        dm_sim.run(prog, model)
    else:
        dm_sim.run(prog)

    rho_bob = dm_sim.reduced_density_matrix([2])
    psi = np.array([np.cos(theta / 2), np.sin(theta / 2)])
    return np.real(psi.conj() @ rho_bob @ psi)


theta = 1.0
error_rate = 0.03
channels = {
    "No noise":           None,
    "Bit Flip (X)":       core.pauli_x_error(error_rate),
    "Phase Flip (Z)":     core.pauli_z_error(error_rate),
    "Depolarizing":       core.depolarizing_error(error_rate),
    "Amplitude Damping":  core.amplitude_damping_error(error_rate),
    "Phase Damping":      core.phase_damping_error(error_rate),
}

print(f"{'Channel':<22s}  {'Fidelity':>8s}")
print("-" * 35)

for name, error in channels.items():
    if error is None:
        fid = teleport_fidelity(theta)
    else:
        noise = core.NoiseModel()
        noise.add_quantum_error(error, core.GateType.H, [0])
        noise.add_quantum_error(error, core.GateType.H, [1])
        noise.add_quantum_error(error, core.GateType.H, [2])
        noise.add_quantum_error(error, core.GateType.CNOT, [0, 1])
        noise.add_quantum_error(error, core.GateType.CNOT, [1, 2])
        fid = teleport_fidelity(theta, noise)
    print(f"{name:<22s}  {fid:>8.4f}")

预期输出(近似):

Channel                  Fidelity
-----------------------------------
No noise                  1.0000
Bit Flip (X)              0.8840
Phase Flip (Z)            0.9380
Depolarizing              0.8580
Amplitude Damping         0.9020
Phase Damping             0.9380

主要观察:

  • 去极化噪声最具破坏性,因为它同时施加了 X、Y 和 Z 误差的组合。
  • 相位阻尼相位翻转对传态保真度具有相同的效果,因为两者都引入通过 CNOT 门传播的 Z 类误差。
  • 振幅阻尼具有不对称性:它优先驱动 |1|0,偏置测量结果。

扫描多个角度

通过在一系列 θ 值上扫描,验证传态对所有输入态都有效。

python
from pyqpanda3 import core
import numpy as np

def run_teleportation(theta, shots=10000):
    """Run teleportation of RY(theta)|0> and return Bob's |1> probability."""
    prog = core.QProg()
    prog << core.RY(0, theta)
    prog << core.H(1)
    prog << core.CNOT(1, 2)
    prog << core.CNOT(0, 1)
    prog << core.H(0)
    prog << core.measure(0, 0)
    prog << core.measure(1, 1)

    z_corr = core.QProg()
    z_corr << core.Z(2)
    no_z = core.QProg()
    prog << core.qif([0]).then(z_corr).qelse(no_z)

    x_corr = core.QProg()
    x_corr << core.X(2)
    no_x = core.QProg()
    prog << core.qif([1]).then(x_corr).qelse(no_x)

    prog << core.measure(2, 2)

    machine = core.CPUQVM()
    machine.run(prog, shots=shots)
    counts = machine.result().get_counts()

    bob_1 = sum(v for k, v in counts.items() if k[2] == '1')
    return bob_1 / shots


print(f"{'theta':>6s}  {'Expected':>10s}  {'Measured':>10s}  {'Error':>10s}")
print("-" * 44)

for theta in np.linspace(0, np.pi, 10):
    expected = np.sin(theta / 2) ** 2
    measured = run_teleportation(theta)
    error = abs(measured - expected)
    print(f"{theta:>6.3f}  {expected:>10.6f}  {measured:>10.6f}  {error:>10.6f}")

预期输出:

theta    Expected    Measured        Error
--------------------------------------------
 0.000    0.000000    0.000000    0.000000
 0.349    0.030153    0.030200    0.000047
 0.698    0.116978    0.117100    0.000122
 1.047    0.250000    0.250500    0.000500
 1.396    0.413176    0.413100    0.000076
 1.745    0.586824    0.587000    0.000176
 2.094    0.750000    0.749800    0.000200
 2.443    0.883022    0.883100    0.000078
 2.793    0.969847    0.969900    0.000053
 3.142    1.000000    1.000000    0.000000

测量的概率在整个 θ 范围内密切跟踪期望值,确认传态对任何输入态都有效。


解析

数学推导

三量子比特初始态(步骤 1 和 2 之后)为:

|Ψ0=|ψq0|Φ+q1q2

代入 |ψ=α|0+β|1|Φ+=12(|00+|11)

|Ψ0=12(α|0(|00+|11)+β|1(|00+|11))

在三个量子比特的计算基中展开:

|Ψ0=12(α|000+α|011+β|100+β|111)

CNOT(0, 1) 之后

q0 为控制、q1 为目标的 CNOT 在 q0=|1 时翻转 q1

|Ψ1=12(α|000+α|011+β|110+β|101)

注意:|100|110|111|101

H(0) 之后

q0 施加 Hadamard 变换:

H|0=12(|0+|1),H|1=12(|0|1)

按量子比特 (q0,q1) 上的测量结果 (m0,m1) 分组:

Ψ2=12(00q0q1(α0+β1)q2+01q0q1(α1+β0)q2+10q0q1(α0β1)q2+11q0q1(α1β0)q2)

这是关键分解。对于每个测量结果 (m0,m1),Bob 的量子比特 q2 处于一个已知态,与 |ψ 通过 Pauli 校正关联。

Bell基分解

Bell测量后的态可以简洁地写为:

|Ψ2=12a,b{0,1}|a,bXbZa|ψ

这个优美的表达式表明:

  1. 测量结果 (a,b) 均匀随机:每个以概率 14 出现。
  2. 对于每个结果,Bob 的量子比特恰好是 XbZa|ψ,可以通过施加 ZaXb(利用 X2=Z2=I)校正回 |ψ
  3. 校正 ZaXb 始终是 Pauli 算子,实现效率高。

详细校正推导

让我们显式验证每个分支。

分支 (m0,m1)=(0,0)

q2=α|0+β|1=|ψ

无需校正。Bob 已经持有 |ψ

分支 (m0,m1)=(0,1)

q2=β|0+α|1=X|ψ

Bob 施加 X

XX|ψ=X2|ψ=|ψ

分支 (m0,m1)=(1,0)

q2=α|0β|1=Z|ψ

Bob 施加 Z

ZZ|ψ=Z2|ψ=|ψ

分支 (m0,m1)=(1,1)

q2=β|0α|1=XZ|ψ

Bob 依次施加 ZX

XZXZ|ψ=X(ZX)Z|ψ=X(XZ)Z|ψ=XXZZ|ψ=|ψ

由于 ZX=XZ(Pauli 算子反对易),且 X2=Z2=I

XZXZ=(XX)(ZZ)=I

这给出 |ψ,与 |ψ 仅差全局相位 1。全局相位在物理上不可观测,因此态确实是 |ψ。或者,将校正施加为 Zm0Xm1 给出:

ZXXZ|ψ=ZIZ|ψ=Z2|ψ=|ψ

更为简洁。

完整校正表:

(m0,m1)Bob 的态校正结果
(0, 0)|ψI|ψ
(0, 1)X|ψX|ψ
(1, 0)Z|ψZ|ψ
(1, 1)XZ|ψZX|ψ

资源分析

隐形传态协议需要:

资源数量
量子比特3(1 个数据 + 2 个Bell对)
纠缠门(CNOT)2(1 个用于Bell对 + 1 个用于Bell测量)
单量子比特门2(Bell对的 Hadamard + 测量的 Hadamard)
测量2(中途测量)
发送的经典比特2
条件门最多 2(一个 Z,一个 X)
总电路深度~5 层

电路深度是恒定的(不随传态态的复杂性而变化),使得传态对任何输入态都高效。

为什么原始态被销毁

不可克隆定理保证 q0 上的原始态无法保留。在协议中,Alice 在Bell基中测量 q0q1。这次测量坍缩了态,关于 |ψ 的信息不再在 q0 上。

形式上,测量 (m0,m1)=(a,b) 后,测量后态为:

ρq0q1q2=|a,ba,b|XbZa|ψψ|ZaXb

q0 的约化态只是 |aa|,这是一个不包含 αβ 信息的计算基态。所有量子信息已通过纠缠和经典通信转移到 q2

与Bell态的联系

隐形传态协议依赖共享Bell对 |Φ+=12(|00+|11)。可以使用四种Bell态中的任何一种;校正表只需相应更改:

使用的Bell态校正表
|Φ+=12(|00+|11)如上(标准)
|Φ=12(|00|11)m0=1 时交换 ZI
|Ψ+=12(|01+|10)m1=1 时交换 XI
|Ψ=12(|01|10)两个交换组合

Bell态必须在协议开始前共享。在实践中,这意味着:

  • Alice 创建Bell对并将一个量子比特发送给 Bob(量子通信)
  • 第三方创建Bell对并向各方分发一个量子比特
  • Bell对由量子网络节点生成

纠缠作为资源

隐形传态消耗一个单位的纠缠(一个 ebit,由纠缠熵 S(ρA)=1 比特衡量)和两个比特的经典通信来传输一个量子比特的量子信息。

这种权衡是最优的:不可能用少于一个 ebit 和两个经典比特来传态一个量子比特。这是因为:

  • 一个 ebit 是必要的,因为无纠缠时,无通信定理禁止仅通过经典信道传输量子信息。
  • 两个经典比特是必要的,因为 Alice 的Bell测量有四个等概率结果,Bob 需要区分所有四种以施加正确的 Pauli 校正。

实用技巧

1. 先用已知态验证。 在传态未知态之前,用 |0|1 测试以确认校正逻辑正确。这些容易验证:输出应始终为 |0|1,保真度 100%。

2. 使用 DensityMatrixSimulator 调试。 当 CPUQVM 结果看起来不正确时,切换到 DensityMatrixSimulator 检查 Bob 量子比特的精确密度矩阵。这消除了调试过程中的采样噪声。

3. 检查校正顺序。 校正必须以 Zm0Xm1 的顺序施加,而非 Xm1Zm0。因为 Pauli 算子反对易(ZX=XZ),错误顺序会引入全局相位。虽然全局相位通常无害,但在受控操作和干涉实验中很重要。

4. 真实地建模硬件噪声。 对于硬件预测,使用逐门、逐量子比特的噪声模型,误差率来自校准数据。典型超导硬件的单量子比特门误差为 0.05-0.1%,双量子比特门误差为 0.5-2%。

5. 隐形传态电路是良好的硬件基准。 在真实硬件上运行传态并测量输出保真度可直接评估纠缠门质量、读出保真度和整体系统相干性。保真度低于 ~0.8 通常表明存在显著硬件问题。

6. 动态电路必不可少。 隐形传态无法作为静态电路实现,因为校正依赖于测量结果。在 pyqpanda3 中,使用 qif 进行条件 Pauli 校正,如上述代码示例所示。

Released under the MIT License.