# 受控非门

受控非门通常写作 CNOT 或 CX，是一种双量子比特量子逻辑门：当且仅当另一个量子比特——控制量子比特——处于状态 \( |1\rangle \) 时，它翻转一个量子比特——目标量子比特——的状态。它是量子计算线路模型中的典型多量子比特门，也是量子算法、纠缠制备和量子纠错的标准构建模块之一。<sup>[1](https://quantum.cloud.ibm.com/learning/en/courses/utility-scale-quantum-computing/bits-gates-and-circuits)</sup><sup> • </sup><sup>[2](https://ncatlab.org/nlab/files/NielsenChuangQuantumComputation.pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| 作用 | 仅当控制量子比特处于 \( |1\rangle \) 时翻转目标量子比特；控制量子比特保持不变<sup>[1](https://quantum.cloud.ibm.com/learning/en/courses/utility-scale-quantum-computing/bits-gates-and-circuits)</sup> |
| 矩阵 | \( \begin{bmatrix} 1&0&0&0\\0&1&0&0\\0&0&0&1\\0&0&1&0 \end{bmatrix} \)，一个作用于双量子比特态矢量的 4 × 4 酉矩阵<sup>[3](https://learn.microsoft.com/en-us/azure/quantum/concepts-multiple-qubits)</sup> |
| 纠缠性 | CNOT 不能写成单量子比特门的张量积，这使它成为纠缠门<sup>[3](https://learn.microsoft.com/en-us/azure/quantum/concepts-multiple-qubits)</sup> |
| 通用性 | 集合 \( \{H, T, \mathrm{CNOT}\} \) 是通用的：这些门的乘积能以任意精度逼近任意酉操作<sup>[3](https://learn.microsoft.com/en-us/azure/quantum/concepts-multiple-qubits)</sup> |
| Clifford 属性 | CNOT 是 Clifford 操作（可用 H、S 和 CNOT 门实现），而仅靠 Clifford 操作并不通用<sup>[4](https://quantum.cloud.ibm.com/learning/en/courses/foundations-of-quantum-error-correction/stabilizer-formalism/stabilizer-codes)</sup> |
| 与 CZ 的关系 | \( U_{\mathrm{CNOT}} = U_H^{(2)} U_{\mathrm{CZ}} U_H^{(2)} \)：在受控 Z 门两侧对目标量子比特施加哈达玛（Hadamard）门<sup>[5](https://www.nature.com/articles/s43246-022-00311-w)</sup> |
| 首次超导演示 | 普兰滕贝格（Plantenberg）、德赫罗特（de Groot）、哈曼斯（Harmans）和莫伊（Mooij），《自然》447, 836–839（2007），在一对耦合磁通量子比特上实现<sup>[6](https://www.nature.com/articles/nature05896)</sup> |

## 对基态的作用

在计算基下，把控制位写在前面，该门映射为 \( |00\rangle \to |00\rangle \)、\( |01\rangle \to |01\rangle \)、\( |10\rangle \to |11\rangle \) 和 \( |11\rangle \to |10\rangle \)。<sup>[7](https://learn.microsoft.com/en-us/azure/quantum/concepts-entanglement)</sup> 目标位与控制位进行异或，因此该门实现可逆经典映射 \( (x, y) \to (x, x \oplus y) \)。<sup>[8](https://arxiv.org/abs/quant-ph/9503016)</sup> 由于控制位保持不变，该门是自身的逆：施加两次会使两个量子比特都回到原状态。

在线路图中，该门画成每个量子比特一条水平线，控制量子比特线上有一个实心圆点，通过竖线连接到目标量子比特线上一个类似符号 \( \oplus \) 的圆圈。<sup>[9](https://quantum.cloud.ibm.com/learning/en/courses/basics-of-quantum-information/quantum-circuits/circuits)</sup> 在 Qiskit 中，该门通过 `qc.cx(control_qubit, target_qubit)` 调用。<sup>[1](https://quantum.cloud.ibm.com/learning/en/courses/utility-scale-quantum-computing/bits-gates-and-circuits)</sup>

## 纠缠生成

CNOT 作用于基态时表现得像普通可逆逻辑门，但作用于叠加态时会产生纠缠。标准做法从 \( |00\rangle \) 出发，对控制量子比特施加哈达玛门，得到 \( \frac{1}{\sqrt{2}}(|0_c\rangle + |1_c\rangle)|0_t\rangle \)，然后施加 CNOT：<sup>[7](https://learn.microsoft.com/en-us/azure/quantum/concepts-entanglement)</sup>

\[ \mathrm{CNOT}\, \frac{1}{\sqrt{2}}\left(|0_c 0_t\rangle + |1_c 0_t\rangle\right) = \frac{1}{\sqrt{2}}\left(|0_c 0_t\rangle + |1_c 1_t\rangle\right) = |\phi^+\rangle. \]

结果是贝尔（Bell）态 \( |\phi^+\rangle \)，其中测量一个量子比特即可确定另一个量子比特的结果。这种先 H 后 CNOT 的组合被描述为在两个量子比特之间产生纠缠的最常见方式之一。<sup>[7](https://learn.microsoft.com/en-us/azure/quantum/concepts-entanglement)</sup>

这一行为使 CNOT 区别于任何由单量子比特门张量积形成的双量子比特门。这类乘积门从不会使量子比特产生关联；CNOT 无法按那种方式分解，是最简单的纠缠门例子。<sup>[3](https://learn.microsoft.com/en-us/azure/quantum/concepts-multiple-qubits)</sup>

## 通用性与 Clifford 层级

如果一个门集合中门的乘积能以任意精度逼近任意酉操作，则该门集合是通用的。CNOT 出现在标准通用门集合中：哈达玛门、T 门和 CNOT 构成双量子比特及多量子比特上的通用门集合，而所有单量子比特门与 CNOT 一起，对于任意多量子比特上的酉操作是通用的。<sup>[3](https://learn.microsoft.com/en-us/azure/quantum/concepts-multiple-qubits)</sup><sup> • </sup><sup>[8](https://arxiv.org/abs/quant-ph/9503016)</sup>

CNOT 也是一种 Clifford 操作，这意味着它可由哈达玛门、S 门和 CNOT 门构建，并且在不计全局相位的情况下，恰好是一个通过共轭把泡利（Pauli）操作映射为泡利操作的酉操作。仅靠 Clifford 操作并不通用；用它们无法逼近任意酉操作，因此必须加入 T 门这样的非 Clifford 门。<sup>[4](https://quantum.cloud.ibm.com/learning/en/courses/foundations-of-quantum-error-correction/stabilizer-formalism/stabilizer-codes)</sup> 这一归类在容错计算中有实际后果：由于没有非平凡量子纠错码能横向实现通用门集合，非 Clifford 门通常通过魔法态注入获得，其中用 CNOT 将所需门隐形传态到数据量子比特上。<sup>[10](https://eu-de.quantum.cloud.ibm.com/learning/en/courses/foundations-of-quantum-error-correction/fault-tolerant-quantum-computing/controlling-error-propagation)</sup>

## 物理实现

硬件很少直接实现 CNOT。在许多平台上，原生纠缠操作是受控相位（CZ）门，而 CNOT 通过在目标量子比特上用类哈达玛单量子比特旋转将 CZ 夹在中间来合成。例如，在使用微磁体的电子自旋量子比特架构中，交换相互作用 \( J(t) \) 以绝热方式开启并持续 \( \tau = \pi\hbar/J \)，会产生 CZ 或 CNOT 门。<sup>[11](https://www.nature.com/articles/s41467-024-49182-4)</sup> 同样的 CZ 加哈达玛构造也被用于基于半子的磁性纳米盘量子比特方案中。<sup>[5](https://www.nature.com/articles/s43246-022-00311-w)</sup>

超导量子比特上 CNOT 门的首次演示，向一对耦合磁通量子比特施加微波脉冲，并执行了完整的四种条件 CNOT 变体：任一量子比特都可作为控制或目标，且作用以 0 态或 1 态为条件；真值表通过态转移振幅和类拉姆齐（Ramsey）干涉测量。<sup>[6](https://www.nature.com/articles/nature05896)</sup> 在逻辑量子比特实验中，横向逻辑 CNOT 实现为对应数据量子比特之间的物理 CNOT，例如在悟空（Wukong）超导处理器上的距离为 2 的表面码演示中，逻辑 CNOT 由四个物理 CNOT 门组成。<sup>[12](https://www.nature.com/articles/s41534-025-01118-6)</sup>

## 推广

受控非门的思想有两个推广方向。一般地，受控门除非指定量子比特处于 \( |1\rangle \)，否则表现为恒等操作；当指定量子比特处于该状态时，对目标量子比特施加任意单量子比特酉操作 \( U \)。例如，受控 Z 门施加 Z 操作，可写作 \( (\mathbf{1} \otimes H)\,\mathrm{CNOT}\,(\mathbf{1} \otimes H) \)。<sup>[3](https://learn.microsoft.com/en-us/azure/quantum/concepts-multiple-qubits)</sup> 门也可以受经典信息控制；在这种情况下，该门仅在量子程序的一个分支中施加，类似 if 语句。<sup>[3](https://learn.microsoft.com/en-us/azure/quantum/concepts-multiple-qubits)</sup> 增加更多控制位可得到托佛利（Toffoli）门（即双控制非门）等门；该门已在超导量子比特-量子三态电路中实现，方法是先实现双控制相位门，再用哈达玛门共轭目标。<sup>[13](https://www.nature.com/articles/s41598-019-49657-1)</sup>

## References

1. [Bits, gates, and circuits, IBM Quantum Learning](https://quantum.cloud.ibm.com/learning/en/courses/utility-scale-quantum-computing/bits-gates-and-circuits)
2. [Quantum Computation and Quantum Information (Nielsen & Chuang), nLab PDF copy](https://ncatlab.org/nlab/files/NielsenChuangQuantumComputation.pdf)
3. [Multiple-qubit Operations, Azure Quantum, Microsoft Learn](https://learn.microsoft.com/en-us/azure/quantum/concepts-multiple-qubits)
4. [Stabilizer codes, IBM Quantum Learning](https://quantum.cloud.ibm.com/learning/en/courses/foundations-of-quantum-error-correction/stabilizer-formalism/stabilizer-codes)
5. [Qubits based on merons in magnetic nanodisks, Communications Materials (2022)](https://www.nature.com/articles/s43246-022-00311-w)
6. [Demonstration of controlled-NOT quantum gates on a pair of superconducting quantum bits, Nature 447, 836–839 (2007)](https://www.nature.com/articles/nature05896)
7. [Entanglement & Correlations, Azure Quantum, Microsoft Learn](https://learn.microsoft.com/en-us/azure/quantum/concepts-entanglement)
8. [Elementary gates for quantum computation, Barenco et al., arXiv:quant-ph/9503016](https://arxiv.org/abs/quant-ph/9503016)
9. [Circuits, IBM Quantum Learning](https://quantum.cloud.ibm.com/learning/en/courses/basics-of-quantum-information/quantum-circuits/circuits)
10. [Controlling error propagation, IBM Quantum Learning](https://eu-de.quantum.cloud.ibm.com/learning/en/courses/foundations-of-quantum-error-correction/fault-tolerant-quantum-computing/controlling-error-propagation)
11. [The SpinBus architecture for scaling spin qubits with electron shuttling, Nature Communications (2024)](https://www.nature.com/articles/s41467-024-49182-4)
12. [Demonstrating a universal logical gate set in error-detecting surface codes on a superconducting quantum processor, npj Quantum Information (2025)](https://www.nature.com/articles/s41534-025-01118-6)
13. [Realization of efficient quantum gates with a superconducting qubit-qutrit circuit, Scientific Reports (2019)](https://www.nature.com/articles/s41598-019-49657-1)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 物理学 › 量子物理学 › Quantum information science › Quantum computing and algorithms › Quantum gates and circuits › Multi-qubit and entangling gates

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/controlled-not-gate

English original: https://www.edgepedia.org/controlled-not-gate
