# Quantum vs. Classical Logical Operations Nowadays, there are a large number of various computers. Despite the differences in physical implementations and the purposes of these devices, from the point of view on the computation theory, the operation principle of any of them can be described by Turing “machine”, which is formally called Church-Turing thesis. The main feature and advantage of Turing machine is its comparative simplicity.

In practice a equivalent circuit model, i.e. switching circuits, is often used as equivalent to the Turing machine. The circuit model is no longer infinite. This model is especially good and clear when we want to compare classical and quantum logical operations.

## Landauer Principle

Rolf Landauer showed when deleting or losing a bit of information, thermal energy is realized equal to `ln2` times the product of the Boltzmann constant `kb` and temperature `T` of the physical system:

``W = kb T ln2``

Moreover, such losses do not depend on the type of physical implementation. For classical computers, the Landauer Principle plays an important but not critical role. The heat emitted by a computer can be predicted by the Landauer Principle. However in quantum computing, the deterioration is somewhat different. Due to the smallness of the size of the elements themselves, any heating can lead to their deterioration. Qubit transformation must be unitary and reversible.

### Irreversible Elements

For the AND, OR, XOR gates, there are situations when several different combinations of bits `a` and `b` can correspond to a value of bit `c`. All of them, as well as many others, are called irreversible. In addition, switching circuits (e.g.: full adders and half adders) complied using irreversible elements are also irreversible.

The fact is that, when performing logical operations using XOR, AND, OR, and other irreversible logical elements, we irrevocably loose some information about the state of the input bits `a` and `b`. This is the reason why we can not reverse the action. In physics, the destruction / demolition of information is a dissipative process. In such a process, some of the energy is converted into heat, thermal energy, or energy at controlled movement of the atoms and molecules that make up their physical system. This process is irreversible.

### Reversible Elements

However NOT (negation), CNOT (controllable negation), CCNOT (Toffoli) operations are examples of reversible logical gate in classical computation. The truth table of CNOT element is the same to the truth table for XOR element. CNOT element can also be used to create copies as the FANOUT element. By using CCNOT element, you can get the elements AND, FANOUT, XOR and NOT. The effect of any reversible elements can be easily reversed if the same element is reapplied to the results obtained.

We could redesign the switching circuits for Half Adders and Full Adders using reversible elements CCNOT and CNOT.

## Pauli Matrices

The Pauli matrices are three 2×2 matrices that form the basis for all 2×2 Hermitian matrices with zero trace. Together with the unit matrix, they form a basis for all Hermitian 2×2 matrices that are not only with zero trace. The Pauli matrices are widely used in physics to describe the spin 1/2, as well as in the quantum computation theory to describe single-qubit logical operations.

### Properties

The Pauli matrices are Hermitian, when taking Hermitian conjugation from any of the Pauli matrix, we gat the same Pauli matrix. They can be used to describe physical observables such as projectiles of the spin of an electron, proton, and other elementary particles.

### Commutation

In the production of Pauli matrices, we get either identity matrix (when i = j) or another Pauli matrix (when i ≠ j). The last property ensures that any Hermitian matrix `A^` can be represented as a linear combination of Pauli matrices and the identity matrix.

``A^ = c0 I + ∑3i=1 ci σi``

In addition , any operator function of Pauli matrices can be represented as a linear combination of the Pauli matrices.

``f({σi}3i=1) = a0 I + ∑3i=1 ai σi``

## The Circuit Model of Quantum Computing

As in the case of classical computation, a circuit model is used when developing practical applications and algorithms in quantum computing theory. The circuit model is also not infinite. A circuit is a network structure consisting of wires, through which qubits are transmitted to quantum logic elements (gates) that perform elementary operations on incoming qubits.

In accordance with the Landauer Principle, quantum logic elements (whose action can be described using a certain unitary quantum transformation) are initially made reversible. Otherwise the excess heat during the destruction of information could purely physically spoil them. So, if we have a set of qubits in the pure state at the inputs of quantum computer, then at the output of quantum computer, we also get a set of qubits in a pure state. Each quantum logical operation has its own unitary operator.

The choice of the basis is very important, because that will always associate the basis of some measuring device. Consider the qubit as a superposition of the eigenvectors of the Pauli matrix `σ3`, i.e.: `|0⟩` and `|1⟩`, which is also called the computational basis. In some cases, we use eigenvectors of Pauli matrix `σ1`, which is `|+⟩` and `|-⟩`, which is called Hadamard basis.

## Single-Qubit Logic Elements

The logical operator X, Y, Z, acting on the state ψ are represented as rotations around the corresponding axes of the Bloch sphere. The logical element X rotate around the x-axis counterclockwise, with the angle φ = π. We will get similar situations for Y and Z.

A set of unitary elements is called universal for single-qubit elements, if any other single-qubit unitary element can be obtained through a quantum circuit build only on elements from this set. The sets of elements {H, T} and {I, X, Y, Z} are universal sets for single-qubit elements.

## Controlled Logic Elements

In contrast to single-qubit logic elements acting on one qubit, now several qubits are entered on the inputs of controlled logic elements at the same time. As in the case of classical calculations, qubits are divided into two types: control qubit and target qubit. A logical operation on target quibits is determined by the state of the control qubits. If the control qubit is a superposition of states, then each term of the superposition must be considered separately.

The set of elements {H, T, CX} is a universal set for any unitary elements, i.e.: a quantum computation circuit of arbitrary complexity can be constructed from these and only these elements.

## My Certificate

For more on Quantum vs. Classical Logical Operations, please refer to the wonderful course here https://www.coursera.org/learn/physical-basis-quantum-computing

I am Kesler Zhu, thank you for visiting my website. Check out more course reviews at https://KZHU.ai

All of your support will be used for maintenance of this site and more great content. I am humbled and grateful for your generosity. Thank you!

 Your generosity and kindness is overwhelming!Donate \$1.99 - Good job!Donate \$4.99 - Keep it up!Donate \$14.99 - Very helpful!Donate \$29.99 - Looking forward to more! 