# Logical Structures Underlying Quantum Computing

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Classical Computing

#### 2.1. Deterministic Classical Computing

**Definition**

**1.**

#### 2.2. Non-Deterministic Classical Computing

- ${\mu}_{{F}_{x}}(\varnothing )=0$
- ${\mu}_{{F}_{x}}\left({A}^{c}\right)=1-{\mu}_{{F}_{x}}\left(A\right)$
- For any disjoint $X,Y\in \mathcal{P}\left({\{0,1\}}^{N}\right)$ we have$${\mu}_{{F}_{x}}(X\bigcup Y)={\mu}_{{F}_{x}}\left(X\right)+{\mu}_{{F}_{x}}\left(Y\right)$$

#### 2.3. Quantum Computing in a Schematic Way

- Step 1. Chose an initial state represented by a density operator $\rho $ for the qubits (notice that $\rho $ can be taken to be mixed [25]). This state could be just the density operator associated with the vector $|0\rangle \otimes |0\rangle \otimes \cdots \otimes |0\rangle $ or any other desired state. In most situations of practical interest, the computational basis plays a key role in defining the inputs and the outputs of the algorithm. Let us denote the computational basis by ${\mathbf{B}}_{0}$.
- Step 2. Apply a collection of gates represented by unitary operators ${\left\{{U}_{i}\right\}}_{i=1,\dots ,n}$ to reach a desired final state $\sigma ={U}_{n}\cdots {U}_{2}{U}_{1}\rho {U}_{1}^{\u2020}{U}_{2}^{\u2020}\cdots {U}_{n}^{\u2020}$.
- Step 3. Perform a measurement on the system when state $\sigma $ is reached, check the result obtained, and depending on the result, stop the process, or continue following the pertinent protocol if necessary (which will involve a similar, or, in some cases, the same- process). Notice that the measurement process involves the choice of a measurement basis. This process has associated a probability (dictated by Born’s rule). The probability of success for an algorithm is related to the probability of occurrence of a certain outcome (or collection of them). This outcome should be of interest for the successful computation involved in the protocol that one is following. Notice that a subspace containing the desired results always exists. The pertinent probability of success is related to the probability for the event of interest to happen.

- 1
- ${P}_{\sigma}\left(\mathbf{0}\right)=0$ ($\mathbf{0}$ is the null operator).
- 2
- ${P}_{\sigma}\left({P}^{\perp}\right)=\mathbf{1}-{P}_{\sigma}\left(P\right)$, for all $P\in \mathcal{P}\left(\mathcal{H}\right)$.
- 3
- For any family ${\left({P}_{j}\right)}_{j\in J}\subset \mathcal{P}\left(\mathcal{H}\right)$ consisting of orthogonal projections for which ${P}_{{j}_{1}}{P}_{{j}_{2}}=\mathbf{0}$ when ${j}_{1}\ne {j}_{2}$, the following equality holds:$${P}_{\sigma}(\bigvee {P}_{j})=\sum _{j\in J}{P}_{\sigma}\left({P}_{j}\right).$$

## 3. Logics Associated with Quantum Algorithms

#### 3.1. The Algebraic Structure of Quantum Logical Gates

#### 3.2. Probabilistic Truth Values

**Definition**

**2.**

- U is equivalent to V with respect to $\rho \in \mathcal{C}\left(\mathcal{H}\right)$ and $P\in \mathcal{P}\left(\mathcal{H}\right)$ (and we denote it by $U{\equiv}_{P}^{\rho}V$) if and only if$$Tr\left(U\rho {U}^{\u2020}P\right)=Tr\left(V\rho {V}^{\u2020}P\right)$$
- U is equivalent to V with respect to $\rho \in \mathcal{C}\left(\mathcal{H}\right)$ (and we denote it by $U{\equiv}^{\rho}V$) if and only if$$Tr\left(U\rho {U}^{\u2020}P\right)=Tr\left(V\rho {V}^{\u2020}P\right)$$
- U is equivalent to V with respect to $P\in \mathcal{P}\left(\mathcal{H}\right)$ (and we denote it by $U{\equiv}_{P}V$) if and only if$$Tr\left(U\rho {U}^{\u2020}P\right)=Tr\left(V\rho {V}^{\u2020}P\right)$$
- U is equivalent to V (and we denote it by $U\equiv V$) if and only if$$Tr\left(U\rho {U}^{\u2020}P\right)=Tr\left(V\rho {V}^{\u2020}P\right)$$

**Definition**

**3.**

- For a given quantum gate U, we call probabilistic truth value associated with U in the context P and state $\rho $ the real number $Tr\left(U\rho {U}^{\u2020}P\right)$.
- For a given quantum gate U, we call probabilistic truth values associated with U in the context P the family of real numbers $Tr\left(U\rho {U}^{\u2020}P\right)$, where $\rho \in \mathcal{C}$.
- For a given quantum gate U, we call probabilistic truth values associated with U in the state $\rho $ the family of real numbers $Tr\left(U\rho {U}^{\u2020}P\right)$, where $P\in \mathcal{P}\left(\mathcal{H}\right)$.

**Definition**

**4.**

- $U\le V$ with respect to $\rho \in \mathcal{C}\left(\mathcal{H}\right)$ and $P\in \mathcal{P}\left(\mathcal{H}\right)$ (and we denote it by $U{\le}_{P}^{\rho}V$) if and only if$$Tr\left(U\rho {U}^{\u2020}P\right)\le Tr\left(V\rho {V}^{\u2020}P\right)$$
- $U\le V$ with respect to ρ (and we denote it by $U{\le}^{\rho}V$) if and only if$$Tr\left(U\rho {U}^{\u2020}P\right)\le Tr\left(V\rho {V}^{\u2020}P\right)$$
- $U\le V$ with respect to P (and we denote it by $U{\le}_{P}V$) if and only if$$Tr\left(U\rho {U}^{\u2020}P\right)\le Tr\left(V\rho {V}^{\u2020}P\right)$$

## 4. Examples of Quantum Algorithms

#### 4.1. Deutsch-Jozsa Algorithm

- Step 1. In the first step, prepare the quantum state $|0\rangle |1\rangle $.
- Step 2. Next, the Hadamard operator is applied to both qubits yielding the state:$$\frac{1}{2}\left(\right|0\rangle +|1\rangle )\left(\right|0\rangle -|1\rangle ).$$$${(-1)}^{f\left(0\right)}\frac{1}{2}\left(\right|0\rangle +{(-1)}^{f\left(0\right)\oplus f\left(1\right)}|1\rangle )\left(\right|0\rangle -|1\rangle ).$$$$|\psi \rangle ={(-1)}^{f\left(0\right)}\frac{1}{2}\left((1+{(-1)}^{f\left(0\right)\oplus f\left(1\right)})\right|0\rangle +(1-{(-1)}^{f\left(0\right)\oplus f\left(1\right)})|1\rangle )\left(\right|0\rangle -|1\rangle ).$$
- Step 3. The next step consists in determining the projection of the above state to the subspaces represented by projection operators $|0\rangle \langle 0|\otimes \mathbf{1}$ and $|1\rangle \langle 1|\otimes \mathbf{1}$.

#### 4.2. Determination of a Function’s Period

- Step 1. Start the computer by generating -using the usual procedure- the state:$$|f\rangle =\frac{1}{\sqrt{N}}\sum _{x=0}^{N-1}|x\rangle |f\left(x\right)\rangle .$$It is not possible to extract the period yet. Even if we measure the value of the second register and obtain the value ${y}_{0}$, we will end up with the following state in the first register (with ${x}_{0}$ the smallest x such that $f\left(x\right)={y}_{0}$ and $N=Kr$):$$|\psi \rangle =\frac{1}{\sqrt{K}}\sum _{k=0}^{K-1}|{x}_{0}+kr\rangle .$$However, $|\psi \rangle $ does not give us information about r yet.
- Step 2. To obtain the period, it is necessary to apply the quantum Fourier transform (QFT), which is a unitary matrix with entries$${\mathcal{F}}_{ab}=\frac{1}{\sqrt{N}}{exp}^{2\pi i\frac{ab}{N}}.$$By applying the QFT to $|\psi \rangle $ we obtain$$\mathcal{F}|\psi \rangle =\frac{1}{\sqrt{r}}\sum _{j=0}^{r-1}{exp}^{2\pi i\frac{{x}_{0}j}{r}}|j\frac{N}{r}\rangle .$$
- Step 3. Finally, a measurement is performed in the basis $\left\{\right|j\frac{N}{r}\rangle \}$, and using the result it is possible to determine the period of the function as follows. The obtained value c will be such that $c=j\frac{N}{r}$, for some $0\le j\le r-1$. Then, $\frac{c}{j}=\frac{N}{r}$, and if j is coprime with r, it will be possible to determine r. The success of the algorithm depends on the fact that j and r will be coprimes with a large enough probability.

## 5. Axiomatization of the Quantum Computational Logic

- ∨ is the operation of disjunction in our natural language.
- ∧ is the operation of conjunction in our natural language.
- ¬ is the operation of negation in our natural language.

- ${H}_{i}$: generates a superposition in qubit i.
- $CNOT$: flips the value of the second qubit if the control qubit is 1; do nothing otherwise.
- ${R}_{\varphi}$ adds a phase of $\varphi $ in one of the terms of the superposition.

**Definition**

**5.**

- U is equivalent to V with respect to $\nu \in \mathcal{C}$ and $X\in \mathcal{L}$ (and we denote it by $U{\equiv}_{X}^{\nu}V$) if and only if$$\mu \left(X\right)={\mu}^{\prime}\left(X\right)$$
- U is equivalent to V with respect to ν (and we denote it by $U{\equiv}^{\nu}V$) if and only if$$\mu \left(X\right)={\mu}^{\prime}\left(X\right)$$
- U is equivalent to V (and we denote it by $U\equiv V$) if and only if $\mu \left(X\right)={\mu}^{\prime}\left(X\right)$ for all $\nu \in \mathcal{C}$ and $X\in \mathcal{L}$.

- Step 1. Chose an initial reference state $\nu \in \mathcal{C}$ (this state is intended to be the same for all possible algorithms, and is interpreted as the initial state of the devise).
- Step 2. Apply a collection of gates ${\left\{{U}_{i}\right\}}_{i=1,\dots ,n}$ to reach a desired final state $\mu (-)=({U}_{n}\cdots {U}_{2}{U}_{1})\left(\nu \right)(-)$, possessing the properties needed to perform the desired computation (answer the question that we need to answer).
- Step 3. Perform a measurement on the system when the state $\mu $ is reached, check the result obtained, and depending on the result, stop the process, or continue the protocol if necessary (which will involve a similar -in some cases, the same- process).

**Definition**

**6.**

- For a given generalized gate U, we call probabilistic truth value associated with U in the event $X\in \mathcal{L}$ and initial state $\nu $the real number $U\left(\nu \right)\left(X\right)$.
- For a given generalized gate U, we call probabilistic truth values associated with U in the event $X\in \mathcal{L}$the family of real numbers $U\left(\nu \right)\left(X\right)$, where $\nu \in \mathcal{C}$.
- For a given generalized gate U, we call probabilistic truth values associated with U in the state $\nu $ the family of real numbers $U\left(\nu \right)\left(X\right)$, where $X\in \mathcal{L}$.

**Definition**

**7.**

- $U\le V$ with respect to $\nu \in \mathcal{C}$ and $X\in \mathcal{L}$ (and we denote it by $U{\le}_{X}^{\nu}V$) if and only if$$U\left(\nu \right)\left(X\right)\le V\left(\nu \right)\left(X\right)$$
- $U\le V$ with respect to ν (and we denote it by $U{\le}^{\nu}V$) if and only if$$U\left(\nu \right)\left(X\right)\le V\left(\nu \right)\left(X\right)$$
- $U\le V$ with respect to $X\in \mathcal{L}$ (and w denote it by $U{\le}_{X}V$) if and only if$$U\left(\nu \right)\left(X\right)\le V\left(\nu \right)\left(X\right)$$

## 6. Conclusions

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## References

- Nielsen, M.A.; Chuang, I.L. Quantum Computation and Quantum Information; Cambridge University Press: Cambridge, UK, 2010. [Google Scholar]
- Gambetta, J.M.; Chow, J.M.; Steffen, M. Building logical qubits in a superconducting quantum computing system. NPJ Quant. Inf.
**2017**, 3, 2. [Google Scholar] [CrossRef] - Freytes, H.; Domenech, G. Quantum computational logic with mixed states. Math. Logic Q.
**2013**, 59, 27–50. [Google Scholar] [CrossRef] [Green Version] - Chiara, M.L.D.; Giuntini, R.; Sergioli, G. Probability in quantum computation and quantum computational logics: A survey. Math. Struct. Comp. Sci.
**2013**, 24, 1–14. [Google Scholar] - Chiara, M.L.D.; Giuntini, R.; Sergioli, G.; Leporini, R. Abstract quantum computing machines and quantum computational logics. Int. J. Quant. Inf.
**2016**, 14, 1640019. [Google Scholar] [CrossRef] - Freytes, H.; Sergioli, G. Fuzzy approach for Toffoli gate in quantum computation with mixed states. Rep. Math. Phys.
**2014**, 74, 154–180. [Google Scholar] [CrossRef] - Chiara, M.L.D.; Giuntini, R.; Sergioli, G.; Leporini, R. A many-valued approach to quantum computational logics. Fuzzy Sets Syst.
**2016**, 335, 94–111. [Google Scholar] [CrossRef] - Chiara, M.L.D.; Giuntini, R.; Leporini, R.; Freytes, H.; Sergioli, G. Probabilities and epistemic operations in the logics of quantum computation. Entropy
**2018**, 20, 837. [Google Scholar] [CrossRef] - Chiara, M.L.D.; Giuntini, R.; Leporini, R.; Sergioli, G. A first-order epistemic quantum computational semantics with relativistic-like epistemic effects. Fuzzy Sets Syst.
**2016**, 298, 69–90. [Google Scholar] [CrossRef] [Green Version] - Holik, F.; Bosyk, G.M.; Bellomo, G. Quantum Information as a Non-Kolmogorovian Generalization of Shannon’s Theory. Entropy
**2015**, 17, 7349–7373. [Google Scholar] [CrossRef] [Green Version] - Birkhoff, G.; von Neumann, J. The logic of quantum mechanics. Ann. Math.
**1936**, 37, 823–843. [Google Scholar] [CrossRef] - Holik, F.; Sáenz, M.; Plastino, A. A discussion on the origin of quantum probabilities. Ann. Phys.
**2014**, 340, 293–310. [Google Scholar] [CrossRef] [Green Version] - Domenech, G.; Holik, F.; Massri, C. A quantum logical and geometrical approach to the study of improper mixtures. J. Math. Phys.
**2010**, 51, 052108. [Google Scholar] [CrossRef] [Green Version] - Holik, F.; Massri, C.; Ciancaglini, N. Convex quantum logic. Int. J. Theor. Phys.
**2012**, 51, 1600–1620. [Google Scholar] [CrossRef] - Holik, F.; Massri, C.; Plastino, A.; Zuberman, L. On the lattice structure of probability space in quantum mechanics. Int. J. Theor. Phys.
**2013**, 51, 1836–1876. [Google Scholar] [CrossRef] - Anders, J.; Browne, D.E. Computational Power of Correlations. Phys. Rev. Lett.
**2009**, 102, 050502. [Google Scholar] [CrossRef] [PubMed] - Delfosse, N.; Allard-Guerin, P.; Bian, J.; Raussendorf, R. Wigner Function Negativity and Contextuality in Quantum Computation on Rebits. Phys. Rev. X
**2015**, 5, 021003. [Google Scholar] [CrossRef] - Howard, M.; Wallman, J.J.; Veitch, V.; Emerson, J. Contextuality supplies the ’magic’ for Quantum Computation. Nature
**2014**, 510, 351. [Google Scholar] [CrossRef] - Raussendorf, R.; Browne, D.E.; Delfosse, N.; Okay, C.; Bermejo-Vega, J. Contextuality and Wigner function negativity in qubit quantum computation. arXiv, 2017; arXiv:1511.08506. [Google Scholar] [CrossRef]
- Raussendorf, R. Contextuality in measurement-based quantum computation. Phys. Rev. A
**2013**, 88, 022322. [Google Scholar] [CrossRef] - Döring, A. Kochen-Specker Theorem for von Neumann Algebras. Int. J. Theor. Phys.
**2005**, 44, 139–160. [Google Scholar] [CrossRef] - Bub, J. Quantum computaton from a quantum logical perspective. Quant. Inf. Comput.
**2007**, 7, 281–296. [Google Scholar] - Rédei, M.; Summers, S. Quantum probability theory. Stud. Hist. Philos. Sci. Part B Stud. Hist. Philos. Modern Phys.
**2007**, 38, 390–417. [Google Scholar] [CrossRef] [Green Version] - Kitaev, A.Y.; Shen, A.H.; Vyalyi, M.N. Classical and Quantum Computation; Graduate Studies in Mathematics Volume 47; American Mathematical Society Providence: Rhode Island, RI, USA, 2002. [Google Scholar]
- Aharanov, D.; Kitaev, A.; Nisan, N. Quantum circuits with mixed states. In Proceedings of the Thirtieth Annual ACM Symposium on Theory of Computing, Dallas, TX, USA, 24–26 May 1998; pp. 20–30. [Google Scholar]
- Kalmbach, G. Ortomodular Lattices; Academic Press: London, UK, 1983. [Google Scholar]
- Gudder, S.P. Stochastic Methods in Quantum Mechanics; Dover Publications: North Holland, The Netherland; New York, NY, USA; Oxford, UK, 1979. [Google Scholar]
- Khrennikov, A. Ubiquitous Quantum Structure-From Psychology to Finance; Springer: Berlin/Heidelberg, Germany, 2010. [Google Scholar]
- Khrennikov, A. Social Laser: Action amplifcation by stimulated emission of social energy. Philos. Trans. R. Soc. A
**2016**, 374, 20150094. [Google Scholar] [CrossRef] [PubMed] - Aerts, D.; Gabora, L.; Sozzo, S. Concepts and Their Dynamics: A Quantum-Theoretic Modeling of Human Thought. Top. Cognit. Sci.
**2013**, 5, 737–772. [Google Scholar] [CrossRef] [PubMed] - Aharonov, D. A Simple Proof that Toffoli and Hadamard are Quantum Universal. arXiv, 2003; arXiv:quant-ph/0301040v1. [Google Scholar]
- Varadarajan, V. Geometry of Quantum Theory I; van Nostrand: Princeton, NJ, USA, 1968. [Google Scholar]
- Clifton, R.; Halvorson, H. Entanglement and Open Systems in Algebraic Quantum Field Theory. Stud. Hist. Philos. Sci. Part B Stud. Hist. Philos. Modern Phys.
**2001**, 32, 1–31. [Google Scholar] [CrossRef] [Green Version]

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Holik, F.; Sergioli, G.; Freytes, H.; Plastino, A.
Logical Structures Underlying Quantum Computing. *Entropy* **2019**, *21*, 77.
https://doi.org/10.3390/e21010077

**AMA Style**

Holik F, Sergioli G, Freytes H, Plastino A.
Logical Structures Underlying Quantum Computing. *Entropy*. 2019; 21(1):77.
https://doi.org/10.3390/e21010077

**Chicago/Turabian Style**

Holik, Federico, Giuseppe Sergioli, Hector Freytes, and Angel Plastino.
2019. "Logical Structures Underlying Quantum Computing" *Entropy* 21, no. 1: 77.
https://doi.org/10.3390/e21010077