qat.qpus.Feynman

class qat.qpus.Feynman(threads=None, mode=None, sparse=False, disable_resource_management=False)

QPU class for Feynman simulator. Use like any other simulator, sending job through submit method.

Parameters
  • threads (int, optional) – number of threads used by Feynman QPU Default: 1

  • mode ("AUTO", "MAP" or "ARRAY", optional) – execution mode of this QPU. Default: “AUTO”

  • disable_resource_management (bool, optional) – since evaluating the true memory requirement of qat-feynman is a very difficult problem, our current memory model will sometimes reject a legitimte computation. Setting disable_resource_management to True allows to override the model, at the cost of losing guaantees about memory.

Mathematical formulation

Mathematically, it consists in writing the calculation of an output amplitude \(\langle a|U_{p}\dots U_{1}|0\dots 0\rangle\) of a quantum circuit as:

\[\begin{split}\langle a|U_{p}\dots U_{1}|0\dots 0\rangle &= \langle a|U_{p}IU_{p-1}\dots IU_{1}|0\dots 0\rangle \\~\\ &= \langle a|U_{p}\left(\sum_{i_{p-1}}|i_{p-1}\rangle\langle i_{p-1}|\right)U_{p-1}\left(\sum_{i_{p-2}}|i_{p-2}\rangle\langle i_{p-2}|\right)U_{p-2}\dots\left(\sum_{i_{1}}|i_{1}\rangle\langle i_{1}|\right)U_{1} |0\dots 0\rangle \\~\\ &= \sum_{i_{1}\dots i_{p-1}\in \left(\mathbb{Z}_{2}^{n}\right)^{p}} \langle a | U_{p} |i_{p-1} \rangle\langle i_{p-1} | U_{p-1} |i_{p-2}\rangle \dots \langle i_{1} | U_{1} | 0\dots 0\rangle \\\end{split}\]

The calculation of an amplitude as been expressed as an exponential (in the number of gates) sum of linearly-long products of scalars.

If a gate \(G\) is logical (i-e has exactly one 1 per line and column, like Toffoli or CNOT) or diagonal, then its matrix elements can be written has:

\[\langle i | G | j \rangle = f_{G}(i)\delta_{i,g_{G}(j)}\]

Where:

  • \(f_{G}: \mathbb{Z}_{2}^{n} \rightarrow \mathbb{C}\)

  • \(g_{G}: \mathbb{Z}_{2}^{n} \rightarrow \mathbb{Z}_{2}^{n}\) associates to a given column the line where the only non-zero element stands.

  • \(\delta_{i,j} = 1\) iif \(i=j\)

Within the previous calculation, it means that a logical or diagonal gate does not increase the number of terms in the sum, and merely adds a new factor to the products.

Gates which do not fall into this category (like Hadamard) are called dense gates. The number of terms in the sum above is exponential in their number.

Bibliography

Rudiak-Gould06
  1. Rudiak-Gould, Arxiv quant-ph:0607151