I finally managed to publish this Mathematica notebook: a work

CCNOT is a pretty important gate: it is universal for quantum computation (i.e., you can express all the other quantum gates and thus quantum circuits using only CCNOT gates). The "common shape" for a CCNOT matrix should be this:

$$M= \begin{bmatrix}

1,0,0,0,0,0,0,0 \\

0,1,0,0,0,0,0,0 \\

0,0,1,0,0,0,0,0 \\

0,0,0,1,0,0,0,0 \\

0,0,0,0,1,0,0,0 \\

0,0,0,0,0,1,0,0 \\

0,0,0,0,0,0,0,1 \\

0,0,0,0,0,0,1,0 \\

\end{bmatrix} $$

The matrix above corresponds to a CCNOT the

For this work I spent plenty of times on the much quoted paper Quantum Mechanical Computer. Reading this and similar articles you might realize that the Feynman's model was studied to:

- understand how small can we get with computers
- understand the minimum cost for performing a computation
- have intellectual exploration / fun (see bottom of the page)
- ultimately, simulate quantum mechanics efficiently with a computer.

In the further pages he show how to build the Hamiltonian $H$ from scratch for a quantum mechanical system which can represent a logical (hermitian) operator $M$ defined as the sequential combination of the logical gates $A_n..A_2A_1$. Setting $\phi_0$ as initial state, you have that the state of the system at time $t$ is:

$$\phi_t = e^{-iHt}\phi_0$$.

or, at a "higher level"

$$\phi_{out} = M\phi_{in}$$.

Where $\phi_{in}$ is the input of our computation and $\phi_{out}$ is the output.

He show how to rewrite the Hamiltonian of the whole system using only those $A_i$ matrices, and an additional chain of $k$ atoms/qubits/spin $1/2$ systems, which act as a sort of

The article continue taking into consideration physical imperfection of the system and further optimization, but we got the gist.

Unfortunately, the notebook I made is in Italian, but if you read it, you might recognize the the following steps:

*In principio era l'algebra di Spin $1/2$*I need space. I start by defining the "home" for the most basic bricks of our system: the qubit (a unitary vector in $\mathbb{C}^2$), and the space of all the unitary operation that we can do on on such vector: a space spanned by the Pauli's matrices with the identity. Commutation laws between these operators are tested.*La base computazionale*. We know that a qubit is a vector in $\mathbb{C}^2$. By which base is the space spanned? Our computational base of choice is the $z$ axes of the Bloch Sphere: the eigenvector of the $\sigma_z$ matrix.*Un paio di osservazioni.*We test some basic rules of quantum mechanics (i.e. observable are selfadjoint matrices, vectors are unitary, and so on..)*Passiamo a k-spin*: I use the previous single qubit operators, tensored with the identity to create the operator to move the excitation over the chain of spin. Practically, there's a function $\Sigma$ which has this parameters:- length of the chain
- matrices $k$ to apply
- position in the the matrix
*Una parentesi: costruzione della base computazionale*: Many complex thing to have a (messy, not canonical) base. It is obtained by the lexicographic order of the possible combination of $\left\{ -1, +1\right\}^s$ where $s$ is the dimension of our system. We then verify the operation of the previous matrix on the basis vectors.*Operazioni $\Sigma_{+}$ e $\Sigma_{-}$:*we create (and test) the operators for tuning on and off the qubits of our chain. Composing two of those matrices, we can "move" an excitation along the spin. w00t w00t!*Riduzione dimensionale del clock*: This was subtle (for me). Since we know that each physical entity that commutes with the Hamiltonian is a conserved quantity, we can consider only operations under a proper subspace of the original space. This space is made by the spin-up qubit of the chain, and has dimension 1 ( there's is only one spin-up qubit at a time).*Diagonalizzazione della matrice.*Exploiting spectral theorem for fun and profit. I diagonalize my matrix to improve the efficiency of the calculation of the matrix exponentiation. (i.e. it's easier to exponentiate diagonal matrices)*La matrice C$^n$NOT*: CNOT and C$^n$NOT's matrix's "logical form".*Creazione del CNOT:*Here we build the CNOT's Hamiltonian according to the scheme on the paper: [Fig 8].*Creazione degli stati iniziali e finali.*Creation of the initial and final state of the computation (that is: the initial qubit given as input, the initial configuration of the spin's chain as $|1>$, and the final configuration for the spin chain, with only the qubit, the last one, in a spin up position.*Esempio di esecuzione del CNOT*: Execution of the CNOT through the evolution of it's Hemiltonian (diagonalized and non-diagonalized)*Verifico graficamente che i due risultati siano uguali, ...*Here we can see that the evolution of the CNOT and the diagonalized version of the CNOT is the same.Creation of CCNOT's Hamiltonian. I found helpful the paper "Grover's algorithm on a Feynman computer. ", made by - what a coincidence - by Diego and Dario. :D*Creazione del CCNOT**Creazione degli stati iniziali e finali.*As before*.*- Execution of the CCNOT trhought the evolutions of it's Hemiltonian with the diagonalized and non-diagonalized matrix.

Whoops! I forgot:

Feynman writes - regarding the idea of using atoms to store information - "Such nonsense is very entertaining for professors like me". When I hear questions like: "

P.S.

Thanks Antonio Miti for the review! (and Happy Birthday to him!)

[1] Time files!!!.

[2] It happened that recently I heard an important and respected scientist/mathematician doing this question to a quantum colleagues of her. I am no-one to judge what happened, but I was pretty puzzled by the sole fact that a mathematician could ask a question as such. Mathematicians questioning the utility of other sciences, lol...