In order to realize quantum logical operations, Quantum Computation (QC) requires that its basic tools and concepts obey the laws of physics. One of the fundamental concepts in QC is the conditional quantum dynamics \cite{barenco}, some times called controlled-unitary operation \cite{kumar}, which is established by the conditional "If-Then" sentence. The best know example is the c-not gate, which operates on the computational basis as follows: \textit{If the control qubit is set to $% |1>$, then apply the single qubit quantum NOT gate on the target. Otherwise, if the control qubit is set to $|0>$, then the target qubit is unchanged}. This gate represents the paradigm for the conditional quantum dynamics, where the flipping of the target qubit is conditioned to the state of the control qubit. Other gates have been defined in a similar way of conditional evolution; for instance, the control phase gates \cite{paulo1}. However, to the best of our knowledge, such conditional quantum dynamics has not been yet used to define the SWAP gate. Here we propose a possible conditional definition, in the form of If-Then sentence, to construct a SWAP gate in the case of two qubits. This definition suggests a classification in two classes, which depends upon the number of qubits that have to undergo a conditional quantum dynamics.
In order to realize quantum logical operations, Quantum Computation (QC) requires that its basic tools and concepts obey the laws of physics. One of the fundamental concepts in QC is the conditional quantum dynamics \cite{barenco}, some times called controlled-unitary operation \cite{kumar}, which is established by the conditional "If-Then" sentence. The best know example is the c-not gate, which operates on the computational basis as follows: \textit{If the control qubit is set to , then apply the single qubit quantum NOT gate on the target. Otherwise, if the control qubit is set to ∣0>, then the target qubit is unchanged}. This gate represents the paradigm for the conditional quantum dynamics, where the flipping of the target qubit is conditioned to the state of the control qubit. Other gates have been defined in a similar way of conditional evolution; for instance, the control phase gates \cite{paulo1}. However, to the best of our knowledge, such conditional quantum dynamics has not been yet used to define the SWAP gate. Here we propose a possible conditional definition, in the form of If-Then sentence, to construct a SWAP gate in the case of two qubits. This definition suggests a classification in two classes, which depends upon the number of qubits that have to undergo a conditional quantum dynamics.
This chapter represents our first step into quantum information theory (QIT). The key to operating such a transition is to become familiar with the concept of the quantum bit, or qubit , which is a probabilistic superposition of the classical 0 and 1 bits. In the quantum world, the classical 0 and 1 bits become the pure states |0〉 and |1〉, respectively. It is as if a coin can be classically in either heads or tails states, but is now allowed to exist in a superposition of both! Then I show that qubits can be physically transformed by the action of unitary matrices , which are also called operators . I show that such qubit transformations, resulting from any qubit manipulation, can be described by rotations on a 2D surface, which is referred to as the Bloch sphere . The Pauli matrices are shown to generate all such unitary transformations. These transformations are reversible , because they are characterized by unitary matrices ; this property always makes it possible to trace the input information carried by qubits. I will then describe different types of elementary quantum computations performed by elementary quantum gates, forming a veritable “zoo” of unitary operators, called I , X , Y , Z , H , CNOT, CCNOT, CROSSOVER or SWAP, controlled- U , and controlled-controlled- U . These gates can be used to form quantum circuits , involving any number of qubits, and of which several examples and tools for analysis are provided. Finally, the concept of tensor product , as progressively introduced through the above description, is eventually formalized.
In NMR quantum computing, spin states of spin-1/2 nuclei are called qubits. Quantum logic gates are represented by unitary matrices. As a universal gate, controlled-NOT (CNOT) is a two-qubit gate. For the IS (I = 1/2 and S = 1/2) spin system, two-qubit CNOT gate is represented by a 4 × 4 matrix. SWAP logic gate, which exchanges two quantum states, is constructed by CNOT gates. In this study, first, four-qubit CNOT gates are constructed for the IS (I = 3/2, S = 3/2) spin system. Then, by using these CNOT gates, a four-qubit SWAP logic gate is found. As an application and verification, an obtained SWAP logic gate is applied to the matrix representation of product operators for the IS (I = 3/2, S = 3/2) spin system. SWAP logic gate can also be presented by an NMR pulse sequence. By using the product operator theory, the pulse sequence of the SWAP logic gate is applied to product operators of the IS (I = 3/2, S = 3/2) spin system. The expected exchange results are obtained for both the matrix representation and the pulse sequence of SWAP logic gate.
The theory of logical gates in quantum computation has suggested new forms of quantum logic, called quantum computational logics. The basic semantic idea is the following: the meaning of a sentence is identified with a quantum information quantity, represented by a quregister (a system of qudits) or, more generally, by a mixture of quregisters (called qumix), whose dimension depends on the logical complexity of the sentence. At the same time, the logical connectives are interpreted as logical operations defined in terms of quantum logical gates. Physical models of quantum computational logics can be built by means of Mach-Zehnder interferometers.
The theory of logical gates in quantum computation has suggested new forms of quantum logic, called quantum computational logics. The basic semantic idea is the following: the meaning of a sentence α is identified with a quantum information quantity, represented by a density operator of a Hilbert space, whose dimension depends on the logical complexity of α. At the same time, the logical connectives of the language are interpreted as operations defined in terms of quantum logical gates. Standard quantum computational models can be described as special cases of Fock space models, where the meaning of any sentence is localized in a precise sector of a Fock space ℱ. From an intuitive point of view, the increasing number of particles described in the different sectors of ℱ can be interpreted as increasing information.
The practical use of many types of near-term quantum computers requires accounting for their limited connectivity. One way of overcoming limited connectivity is to insert swaps in the circuit so that logical operations can be performed on physically adjacent qubits, which we refer to as solving the `routing via matchings' problem. We address the routing problem for families of quantum circuits defined by a hypergraph wherein each hyperedge corresponds to a potential gate. Our main result is that any unordered set of k-qubit gates on distinct k-qubit subsets of n logical qubits can be ordered and parallelized in O(nk−1) depth using a linear arrangement of n physical qubits; the construction is completely general and achieves optimal scaling in the case where gates acting on all (kn) sets of k qubits are desired. We highlight two classes of problems for which our method is particularly useful. First, it applies to sets of mutually commuting gates, as in the (diagonal) phase separators of Quantum Alternating Operator Ansatz (Quantum Approximate Optimization Algorithm) circuits. For example, a single level of a QAOA circuit for Maximum Cut can be implemented in linear depth, and a single level for 3-SAT in quadratic depth. Second, it applies to sets of gates that do not commute but for which compilation efficiency is the dominant criterion in their ordering. In particular, it can be adapted to Trotterized time-evolution of fermionic Hamiltonians under the Jordan-Wigner transformation, and also to non-standard mixers in QAOA. Using our method, a single Trotter step of the electronic structure Hamiltonian in an arbitrary basis of n orbitals can be done in O(n3) depth while a Trotter step of the unitary coupled cluster singles and doubles method can be implemented in O(n2η) depth, where η is the number of electrons.
While quantum algorithms are known to be very powerful, there are also people who think that “quantum computers will never be able to run the if/then/else type of logic”. On the other hand, though many experts know that such a claim is a misconception, in literature there is still lacking of a general description of the procedure for implementing the if/then/else conditional statements in the quantum way. In the current work, we present such a general method in details, explaining how the unitary transformation required for any if/then/else operation can be constructed from simpler unitary transformations and projective operators. Moreover, by using the well-known controlled-NOT gate, Fredkin gate and Toffoli gate as examples, it is elaborated that the structure of the existing conditional quantum operations agrees with our general method. An even more complicated example is also provided, showing that our method is convenient for solving real-world if/then/else problems with quantum computers. Thus the result not only refutes the above claim, but also helps to develop the skill on quantum programming.