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

arXiv:2305.18750

Variational Quantum Algorithm based circuit that implements the Toffoli gate with multi inputs

Yuval Idan, Mahesh N. Jayakody

Published May 30, 2023• 1 citation
arXivHTMLPDF

Abstract

The prime objective of this study is to seek a circuit diagram for a multi-inputs Toffoli gate including only single qubit gates and CNOTs. In this regard, we have developed two variational quantum algorithms that can be used to implement a multi-inputs Toffoli gate. The cost functions of these two VQAs are derived by using the Hilbert Schmidt inner product and the expected value of an observable that can capture the difference between the inputs and outputs of a Toffoli gate. We employ two ansatz circuit architectures and use the PennyLane package to execute the optimization.

DOI
10.48550/arxiv.2305.18750

Related papers

Efficient variational synthesis of quantum circuits with coherent multi-start optimization

Nikita A. Nemkov, Evgeniy O. Kiktenko, I. A. Luchnikov +1 more

We consider the problem of the variational quantum circuit synthesis into a gate set consisting of the CNOT gate and arbitrary single-qubit (1q) gates with the primary target being the minimization of the CNOT count. First we note that along with the discrete architecture search suffering from the combinatorial explosion of complexity, optimization over 1q gates can also be a crucial roadblock due to the omnipresence of local minimums (well known in the context of variational quantum algorithms but apparently underappreciated in the context of the variational compiling). Taking the issue seriously, we make an extensive search over the initial conditions an essential part of our approach. Another key idea we propose is to use parametrized two-qubit (2q) controlled phase gates, which can interpolate between the identity gate and the CNOT gate, and allow a continuous relaxation of the discrete architecture search, which can be executed jointly with the optimization over 1q gates. This coherent optimization of the architecture together with 1q gates appears to work surprisingly well in practice, sometimes even outperforming optimization over 1q gates alone (for fixed optimal architectures). As illustrative examples and applications we derive 8 CNOT and T depth 3 decomposition of the 3q Toffoli gate on the nearest-neighbor topology, rediscover known best decompositions of the 4q Toffoli gate on all 4q topologies including a 1 CNOT gate improvement on the star-shaped topology, and propose decomposition of the 5q Toffoli gate on the nearest-neighbor topology with 48 CNOT gates. We also benchmark the performance of our approach on a number of 5q quantum circuits from the ibm_qx_mapping database showing that it is highly competitive with the existing software. The algorithm developed in this work is available as a Python package CPFlow.

arXiv:2205.01121•Quantum•May 4, 2023•21 citations

Optimal Multi-Bit Toffoli Gate Synthesis

Young-Min Jun, In-Chan Choi

Multi-bit Toffoli gates form an essential quantum gate class for quantum algorithms. They should be efficiently decomposed into elementary single- or multi-qubit quantum gates, such as CNOT, T, and Hadarmard, for a scalable implementation of a quantum algorithm. We propose an engineering method for the practical synthesis of a multi-bit Toffoli gate. Two optimization models and their closed-form solutions are presented for optimal decomposition of the multi-bit Toffoli gate. These models are based on linearized multi-objective integer programming with parameters such as the number of target ancillae, ancillae states, and basis gates. The proposed method supports the systematic handling of quantum circuit constraints, including the total number of available qubits and maximum circuit depth, which depend on various quantum hardware specifications. Our approach exhibits promise in the noisy intermediate-scale quantum environment by providing a rapid and optimal method for synthesizing multi-bit Toffoli gates in diverse and unpredictable quantum hardware specifications.

IEEE Access•Jan 1, 2023•3 citations

Variational Quantum Circuits for Multi-Qubit Gate Automata

Majumder, Arunava, Lewis, Dylan, Jayashankar, Akshaya +2 more

Implementing quantum operations in the form of natural Hamiltonian dynamics is desirable, since they almost require no external control or feedback. In this work, we propose a NISQ-friendly quantum-classical hybrid approach to designing a time-independent Hamiltonian that generates a given multi-qubit unitary. In particular, we execute a Variational Quantum Algorithm, whose ansatz is carefully chosen to be a sequence of appropriately parametrized unitaries describing at most two-qubit nearest neighbour interactions, dictating the target unitary. Subsequently, we apply our approach to simulate multi-qubit target gates, with and without stochastic noise. We demonstrate that our strategy allows us to implement a Toffoli gate with sufficiently high fidelity, as compared to the other similar techniques. Our approach is an example of the usage of quantum computing for the design of quantum computers.

arXiv:2209.00139•Aug 31, 2022•0 citations

Layout Synthesis for Quantum Circuits Considering Toffoli Gate Decomposition

Po-Wei Chen, Sheng-Tan Huang, Shao‐Yun Fang

State-of-the-art studies on quantum layout synthesis have proposed various approaches based on the assumption that the input circuit is only composed of single-qubit and two-qubit gates. This assumption greatly simplifies the layout synthesis problem, and thus they only require ensuring that all controlled-NOT (CNOT) gates satisfy the hardware constraints imposed by a given coupling graph. However, during the design of quantum circuits, multi-controlled Toffoli (MCT) gates are usually used to better characterize the function of the circuits. Directly decomposing them into single and two-qubit gates with a fixed routine ignores the flexibility and optimization opportunity provided by various decomposition (i.e., logic synthesis) possibilities and thus suffers from sub-optimal results. This article proposes a co-optimization approach for quantum logic and layout synthesis. The MCT gates are first decomposed into Toffoli gates, and an efficient qubit mapping checking process is proposed to optimally solve the SWAP-free layout synthesis problem by automatically determining the decomposition result of each Toffoli gate. If a SWAP-free result cannot be found, the proposed algorithm flow is then used to obtain a solution that minimizes the total cost that simultaneously counts the cost caused by the different decomposition methods for Toffoli gates and the cost induced by SWAP gates. Compared with a state-of-the-art method, the proposed approach reduces the number of additional CNOT gates by 16% with around 25X runtime speedup for the cases with SWAP-free solutions, which cannot be obtained without the co-optimization approach.

ACM Transactions on Design Automation of Electronic Systems•Jun 16, 2025•1 citation

Design and optimization of the multi-valued quantum adder

Jing-wen Ai, Ting-yan Zhang, Shih-Wen Lu +2 more

Abstract Multi-valued quantum logic circuits possess the ability to store and process more intricate information than binary quantum logic circuits. A key component within numerous intricate computational circuits is the multi-valued quantum adder circuit. The primary objective of this paper is to propose a multi-valued quantum full adder and an optimal replacement of two multi-valued Toffoli gate cascades which can effectively reduce the quantum cost of the circuit. Constructed from multi-valued 1-qudit and 2-qudit M-S gates, this adder circuit is designed by effectively setting the control conditions of multi-valued quantum Toffoli gates. For a quaternary quantum adder based on this M-S gate architecture, the number of QC, 1-qudit gates, and 2-qudit gates are 48.6%, 46.2%, and 54.2%, respectively, of the previous design. Additionally, NCI and NGO are consistent with prior adder. It shows the potential applications of complex quantum reversible logic circuits.

Physica Scripta•Mar 19, 2025•4 citations

On the CNOT-cost of TOFFOLI gates

Vivek Shende, Igor L. Markov

The three-input TOFFOLI gate is the workhorse of circuit synthesis for classical logic oper-ations on quantum data, e.g., reversible arithmetic circuits. In physical implementations,however, TOFFOLI gates are decomposed into six CNOT gates and several one-qubit gates.Though this decomposition has been known for at least 10 years, we provide here thefirst demonstration of its CNOT-optimality. We study three-qubit circuits which containless than six CNOT gates and implement a block-diagonal operator, then show that theyimplicitly describe the cosine-sine decomposition of a related operator. Leveraging thecanonical nature of such decompositions to limit one-qubit gates appearing in respectivecircuits, we prove that the n-qubit analogue of the TOFFOLI requires at least 2n CNOTgates. Additionally, our results offer a complete classification of three-qubit diagonaloperators by their CNOT-cost, which holds even if ancilla qubits are available.

Quantum Information and Computation•May 1, 2009•127 citations
The prime objective of this study is to seek a circuit diagram for a multi-inputs Toffoli gate including only single qubit gates and CNOTs. In this regard, we have developed two variational quantum algorithms that can be used to implement a multi-inputs Toffoli gate. The cost functions of these two VQAs are derived by using the Hilbert Schmidt inner product and the expected value of an observable that can capture the difference between the inputs and outputs of a Toffoli gate. We employ two ansatz circuit architectures and use the PennyLane package to execute the optimization.
We consider the problem of the variational quantum circuit synthesis into a gate set consisting of the CNOT gate and arbitrary single-qubit (1q) gates with the primary target being the minimization of the CNOT count. First we note that along with the discrete architecture search suffering from the combinatorial explosion of complexity, optimization over 1q gates can also be a crucial roadblock due to the omnipresence of local minimums (well known in the context of variational quantum algorithms but apparently underappreciated in the context of the variational compiling). Taking the issue seriously, we make an extensive search over the initial conditions an essential part of our approach. Another key idea we propose is to use parametrized two-qubit (2q) controlled phase gates, which can interpolate between the identity gate and the CNOT gate, and allow a continuous relaxation of the discrete architecture search, which can be executed jointly with the optimization over 1q gates. This coherent optimization of the architecture together with 1q gates appears to work surprisingly well in practice, sometimes even outperforming optimization over 1q gates alone (for fixed optimal architectures). As illustrative examples and applications we derive 8 CNOT and T depth 3 decomposition of the 3q Toffoli gate on the nearest-neighbor topology, rediscover known best decompositions of the 4q Toffoli gate on all 4q topologies including a 1 CNOT gate improvement on the star-shaped topology, and propose decomposition of the 5q Toffoli gate on the nearest-neighbor topology with 48 CNOT gates. We also benchmark the performance of our approach on a number of 5q quantum circuits from the ibm_qx_mapping database showing that it is highly competitive with the existing software. The algorithm developed in this work is available as a Python package CPFlow.
Multi-bit Toffoli gates form an essential quantum gate class for quantum algorithms. They should be efficiently decomposed into elementary single- or multi-qubit quantum gates, such as CNOT, T, and Hadarmard, for a scalable implementation of a quantum algorithm. We propose an engineering method for the practical synthesis of a multi-bit Toffoli gate. Two optimization models and their closed-form solutions are presented for optimal decomposition of the multi-bit Toffoli gate. These models are based on linearized multi-objective integer programming with parameters such as the number of target ancillae, ancillae states, and basis gates. The proposed method supports the systematic handling of quantum circuit constraints, including the total number of available qubits and maximum circuit depth, which depend on various quantum hardware specifications. Our approach exhibits promise in the noisy intermediate-scale quantum environment by providing a rapid and optimal method for synthesizing multi-bit Toffoli gates in diverse and unpredictable quantum hardware specifications.
Implementing quantum operations in the form of natural Hamiltonian dynamics is desirable, since they almost require no external control or feedback. In this work, we propose a NISQ-friendly quantum-classical hybrid approach to designing a time-independent Hamiltonian that generates a given multi-qubit unitary. In particular, we execute a Variational Quantum Algorithm, whose ansatz is carefully chosen to be a sequence of appropriately parametrized unitaries describing at most two-qubit nearest neighbour interactions, dictating the target unitary. Subsequently, we apply our approach to simulate multi-qubit target gates, with and without stochastic noise. We demonstrate that our strategy allows us to implement a Toffoli gate with sufficiently high fidelity, as compared to the other similar techniques. Our approach is an example of the usage of quantum computing for the design of quantum computers.
State-of-the-art studies on quantum layout synthesis have proposed various approaches based on the assumption that the input circuit is only composed of single-qubit and two-qubit gates. This assumption greatly simplifies the layout synthesis problem, and thus they only require ensuring that all controlled-NOT (CNOT) gates satisfy the hardware constraints imposed by a given coupling graph. However, during the design of quantum circuits, multi-controlled Toffoli (MCT) gates are usually used to better characterize the function of the circuits. Directly decomposing them into single and two-qubit gates with a fixed routine ignores the flexibility and optimization opportunity provided by various decomposition (i.e., logic synthesis) possibilities and thus suffers from sub-optimal results. This article proposes a co-optimization approach for quantum logic and layout synthesis. The MCT gates are first decomposed into Toffoli gates, and an efficient qubit mapping checking process is proposed to optimally solve the SWAP-free layout synthesis problem by automatically determining the decomposition result of each Toffoli gate. If a SWAP-free result cannot be found, the proposed algorithm flow is then used to obtain a solution that minimizes the total cost that simultaneously counts the cost caused by the different decomposition methods for Toffoli gates and the cost induced by SWAP gates. Compared with a state-of-the-art method, the proposed approach reduces the number of additional CNOT gates by 16% with around 25X runtime speedup for the cases with SWAP-free solutions, which cannot be obtained without the co-optimization approach.
Abstract Multi-valued quantum logic circuits possess the ability to store and process more intricate information than binary quantum logic circuits. A key component within numerous intricate computational circuits is the multi-valued quantum adder circuit. The primary objective of this paper is to propose a multi-valued quantum full adder and an optimal replacement of two multi-valued Toffoli gate cascades which can effectively reduce the quantum cost of the circuit. Constructed from multi-valued 1-qudit and 2-qudit M-S gates, this adder circuit is designed by effectively setting the control conditions of multi-valued quantum Toffoli gates. For a quaternary quantum adder based on this M-S gate architecture, the number of QC, 1-qudit gates, and 2-qudit gates are 48.6%, 46.2%, and 54.2%, respectively, of the previous design. Additionally, NCI and NGO are consistent with prior adder. It shows the potential applications of complex quantum reversible logic circuits.
The three-input TOFFOLI gate is the workhorse of circuit synthesis for classical logic oper-ations on quantum data, e.g., reversible arithmetic circuits. In physical implementations,however, TOFFOLI gates are decomposed into six CNOT gates and several one-qubit gates.Though this decomposition has been known for at least 10 years, we provide here thefirst demonstration of its CNOT-optimality. We study three-qubit circuits which containless than six CNOT gates and implement a block-diagonal operator, then show that theyimplicitly describe the cosine-sine decomposition of a related operator. Leveraging thecanonical nature of such decompositions to limit one-qubit gates appearing in respectivecircuits, we prove that the n-qubit analogue of the TOFFOLI requires at least 2n CNOTgates. Additionally, our results offer a complete classification of three-qubit diagonaloperators by their CNOT-cost, which holds even if ancilla qubits are available.