Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

Linear Algebra and its Applications

Optimal implementation of quantum gates with two controls

Jens Palsberg, Nengkun Yu

Published Apr 4, 2024• 3 citations
Publisher

Abstract

We give a detailed proof of a well-known theorem in quantum computing. The theorem characterizes the number of two-qubit gates that is necessary for implementing three-qubit quantum gates with two controls. For example, the theorem implies that five 2-qubit gates are necessary for implementing the Toffoli gate. No detailed proof was available earlier.

DOI
10.1016/j.laa.2024.03.039

Related papers

Optimal simulation of three-qubit gates

Nengkun Yu, Mingsheng Ying

In this paper, we study the optimal simulation of three-qubit unitary by using two-qubit gates. First, we give a lower bound on the two-qubit gates cost of simulating a multi-qubit gate. Secondly, we completely characterize the two-qubit gate cost of simulating a three-qubit controlled controlled gate by generalizing our result on the cost of Toffoli gate. The function of controlled controlled gate is simply a three-qubit controlled unitary gate and can be intuitively explained as follows: the gate will output the states of the two control qubit directly, and apply the given one-qubit unitary $u$ on the target qubit only if both the states of the control are $\ket{1}$. Previously, it is only known that five two-qubit gates is sufficient for implementing such a gate [Sleator and Weinfurter, Phys. Rev. Lett. 74, 4087 (1995)]. Our result shows that if the determinant of $u$ is 1, four two-qubit gates is achievable optimal. Otherwise, five is optimal. Thirdly, we show that five two-qubit gates are necessary and sufficient for implementing the Fredkin gate(the controlled swap gate), which settles the open problem introduced in [Smolin and DiVincenzo, Phys. Rev. A, 53, 2855 (1996)]. The Fredkin gate is one of the most important quantum logic gates because it is universal alone for classical reversible computation, and thus with little help, universal for quantum computation. Before our work, a five two-qubit gates decomposition of the Fredkin gate was already known, and numerical evidence of showing five is optimal is found.

arXiv:1301.3727•Jan 16, 2013•2 citations

Five two-qubit gates are necessary for implementing the Toffoli gate

Nengkun Yu, Runyao Duan, Mingsheng Ying

In this Rapid Communication, we consider the open problem of the minimum cost of two-qubit gates for simulating the Toffoli gate and show that five two-qubit gates are necessary. Before our work, it was known that five two-qubit gates are sufficient to implement the Toffoli gate, and numerical evidence indicates that five two-qubit gates are also necessary. The idea introduced here can also be used to solve the problem of optimal simulation of Deutsch three-qubit gates.

arXiv:1301.3372•Physical Review A•Jul 30, 2013•77 citations

Toffoli Requires Six Quantum Neighbor Gates

Keli Huang, Jens Palsberg

Toffoli gates are key building blocks in quantum programs, and on most current quantum computers, they must be implemented with smaller gates. Such an implementation requires five 2-qubit gates if we assume that each gate can operate on any two qubits. However, many current quantum computers have only 2-qubit gates that operate on neighboring qubits; we call them neighbor gates. How many neighbor gates are required to implement a Toffoli gate? In this article, we show that six neighbor gates are necessary and sufficient, and we generalize to a characterization of all 3-qubit diagonal gates.

ACM Transactions on Quantum Computing•Jan 2, 2026•0 citations

Optimal simulation of Deutsch gates and the Fredkin gate

Nengkun Yu, Mingsheng Ying

In this paper, we study the optimal simulation of the three-qubit unitary using two-qubit gates. First, we completely characterize the two-qubit gate cost of simulating the Deutsch gate (controlled-controlled gate) by generalizing our result on the two-qubit cost of the Toffoli gate. The function of any Deutsch gate is simply a three-qubit controlled-unitary gate and can be intuitively explained as follows: The gate outputs the states of the two control qubits directly, and applies the given one-qubit unitary $u$ on the target qubit only if both the states of the control qubits are $|1\ensuremath{\rangle}$. Previously, it was only known that five two-qubit gates are sufficient for implementing such a gate [Sleator and Weinfurter, Phys. Rev. Lett. 74, 4087 (1995)]. We show that if the determinant of $u$ is 1, four two-qubit gates are optimal. Otherwise, five two-qubit gates are required. For the Fredkin gate (the controlled-swap gate), we prove that five two-qubit gates are necessary and sufficient, which settles the open problem introduced in Smolin and DiVincenzo [Phys. Rev. A 53, 2855 (1996)].

Physical Review A•Mar 6, 2015•38 citations

The simplified Toffoli gate implementation by Margolus is optimal

Guang Song, Andreas Klappenecker

Unitary operations are expressed in the quantum circuit model as a finite sequence of elementary gates, such as controlled-not gates and single qubit gates. We prove that the simplified Toffoli gate by Margolus, which coincides with the Toffoli gate up to a single change of sign, cannot be realized with less than three controlled-not gates. If the circuit is implemented with three controlled-not gates, then at least four additional single qubit gates are necessary. This proves that the implementation suggested by Margolus is optimal.

arXiv:quant-ph/0312225•Dec 31, 2003•11 citations

Efficient Toffoli gates using qudits

Timothy C. Ralph, Kevin J. Resch, Alexei Gilchrist

The simplest decomposition of a Toffoli gate acting on 3 qubits requires five 2-qubit gates. If we restrict ourselves to controlled-sign (or controlled-NOT) gates this number climbs to 6. We show that the number of controlled-sign gates required to implement a Toffoli gate can be reduced to just 3 if one of the three quantum systems has a third state that is accessible during the computation---i.e., is actually a qutrit. Such a requirement is not unreasonable or even atypical since we often artificially enforce a qubit structure on multilevel quantums systems (e.g., atoms, photonic polarization plus spatial modes). We explore the implementation of these techniques in optical quantum processing and show that linear optical circuits could operate with much higher probabilities of success.

arXiv:0806.0654•Physical Review A•Feb 16, 2007•293 citations
We give a detailed proof of a well-known theorem in quantum computing. The theorem characterizes the number of two-qubit gates that is necessary for implementing three-qubit quantum gates with two controls. For example, the theorem implies that five 2-qubit gates are necessary for implementing the Toffoli gate. No detailed proof was available earlier.
In this paper, we study the optimal simulation of three-qubit unitary by using two-qubit gates. First, we give a lower bound on the two-qubit gates cost of simulating a multi-qubit gate. Secondly, we completely characterize the two-qubit gate cost of simulating a three-qubit controlled controlled gate by generalizing our result on the cost of Toffoli gate. The function of controlled controlled gate is simply a three-qubit controlled unitary gate and can be intuitively explained as follows: the gate will output the states of the two control qubit directly, and apply the given one-qubit unitary uuu on the target qubit only if both the states of the control are ∣1⟩\ket{1}∣1⟩. Previously, it is only known that five two-qubit gates is sufficient for implementing such a gate [Sleator and Weinfurter, Phys. Rev. Lett. 74, 4087 (1995)]. Our result shows that if the determinant of uuu is 1, four two-qubit gates is achievable optimal. Otherwise, five is optimal. Thirdly, we show that five two-qubit gates are necessary and sufficient for implementing the Fredkin gate(the controlled swap gate), which settles the open problem introduced in [Smolin and DiVincenzo, Phys. Rev. A, 53, 2855 (1996)]. The Fredkin gate is one of the most important quantum logic gates because it is universal alone for classical reversible computation, and thus with little help, universal for quantum computation. Before our work, a five two-qubit gates decomposition of the Fredkin gate was already known, and numerical evidence of showing five is optimal is found.
Toffoli gates are key building blocks in quantum programs, and on most current quantum computers, they must be implemented with smaller gates. Such an implementation requires five 2-qubit gates if we assume that each gate can operate on any two qubits. However, many current quantum computers have only 2-qubit gates that operate on neighboring qubits; we call them neighbor gates. How many neighbor gates are required to implement a Toffoli gate? In this article, we show that six neighbor gates are necessary and sufficient, and we generalize to a characterization of all 3-qubit diagonal gates.
In this paper, we study the optimal simulation of the three-qubit unitary using two-qubit gates. First, we completely characterize the two-qubit gate cost of simulating the Deutsch gate (controlled-controlled gate) by generalizing our result on the two-qubit cost of the Toffoli gate. The function of any Deutsch gate is simply a three-qubit controlled-unitary gate and can be intuitively explained as follows: The gate outputs the states of the two control qubits directly, and applies the given one-qubit unitary uuu on the target qubit only if both the states of the control qubits are $|1\ensuremath{\rangle}$. Previously, it was only known that five two-qubit gates are sufficient for implementing such a gate [Sleator and Weinfurter, Phys. Rev. Lett. 74, 4087 (1995)]. We show that if the determinant of uuu is 1, four two-qubit gates are optimal. Otherwise, five two-qubit gates are required. For the Fredkin gate (the controlled-swap gate), we prove that five two-qubit gates are necessary and sufficient, which settles the open problem introduced in Smolin and DiVincenzo [Phys. Rev. A 53, 2855 (1996)].
Unitary operations are expressed in the quantum circuit model as a finite sequence of elementary gates, such as controlled-not gates and single qubit gates. We prove that the simplified Toffoli gate by Margolus, which coincides with the Toffoli gate up to a single change of sign, cannot be realized with less than three controlled-not gates. If the circuit is implemented with three controlled-not gates, then at least four additional single qubit gates are necessary. This proves that the implementation suggested by Margolus is optimal.
The simplest decomposition of a Toffoli gate acting on 3 qubits requires five 2-qubit gates. If we restrict ourselves to controlled-sign (or controlled-NOT) gates this number climbs to 6. We show that the number of controlled-sign gates required to implement a Toffoli gate can be reduced to just 3 if one of the three quantum systems has a third state that is accessible during the computation---i.e., is actually a qutrit. Such a requirement is not unreasonable or even atypical since we often artificially enforce a qubit structure on multilevel quantums systems (e.g., atoms, photonic polarization plus spatial modes). We explore the implementation of these techniques in optical quantum processing and show that linear optical circuits could operate with much higher probabilities of success.