# Qudit basics

## Introduction to Qudits in EQC

Entropy quantum computing (EQC) is a unique paradigm for optimization using quantum optics and nanophotonics. Most quantum and quantum-inspired programming models use qubits, even quantum annealing models are restricted to qubits. EQC has the ability to use qudits, which are units of quantum information taking more than 2 possible states. The property of quantum mechanics known as superposition is what makes qubits powerful. Combining superposition and the ability to represent more than 2 levels makes computing with qudits so powerful. Qudits can be used in digital quantum computing or analog computing. Without getting into the details of EQC in this document, we will discuss what a qudit is with respect to its implementation in feedback-based EQC (an analog paradigm, rather than digital quantum gates), which manipulates qudit states to minimize an objective function.

## Doing What Qubits Can Do Plus More

The key advantage of qudits is that they are versatile. We first note that mathematically a qudit can be constrained to behave like a qubit. This can be done by exploiting the fact that for a variable `$X$`

, then `$X^2=X$`

is only satisfied if `$X=0$`

or `$X=1$`

, but not for `$X>1$`

. Therefore by adding a term `$\lambda (X^2-X)^2$`

where `$\lambda$`

is large and positive, we can force a qudit system to behave like a perhaps more familiar binary model, the familiar (and NP-hard) quadratic unconstrained binary optimisation (QUBO) setting. We find that in practice a slightly different approach works better for our hardware, but the key point is that anything which can be expressed in terms of qubits can also be expressed in terms of qudits.

However, qudits have usage beyond just being constrained to act as qubits, many real-world problems are naturally integer rather than binary. Binary representations are natural for decisions, but integer problems arise in production planning where products can only be made in integer quantities (for example making half of an injected moulded plastic component doesn't make sense), but more than one can be created so the problem is not naturally binary. Integer problems can similarly arise in finance, if only an integer number of shares can be purchased. Moreover, qudits which can take many values can be used to approximate continuous variables opening up yet another type of problem which can be explored in this setting. A continuous problem variable could represent for example how full to fill a fuel tank on a machine to balance loss of efficiency due to weight against having to stop more frequently to refill. Our qudit-based paradigm allows the flexibility to both work in a traditional binary setting or to explore what can be done with integer (and too some extent continuous) models, and develop innovative solutions in a novel setting.

## Superposition

Unlike information encoded using bits in a conventional computer, qubits and qudits take on multiple values at the same time. This is called superpostion. While computation is being performed using qudits, each qudit will take on multiple values at the same time, enabling greater exploration of a problem search space. While a qubit in superposition can be relatable to a quantum coin as described in this book, think of a quantum die. Six sides, for common dice the superposition of states would be described by:

`$|D⟩=\alpha_1|1⟩+\alpha_2|2⟩+⋯+\alpha_6|6⟩$`

If Dirac notation is not familiar, make sure to pick up the source of the quantum coin reference, [5]. ,

"In practice, it may become clearer. Take a system described by this simple polynomial. The quadratic function,

`$f(x)=-2x_1^2-2x_2^2+x_1x_2$`

,

over a domain `$x_i\in [0, 99]$`

has two solutions at the same minimum value under the constraint `$x_1+x_2=99$`

. These solutions `[99, 0]` and `[0,99]` result in `$f(x)=-19602$`

. Superposition means that the states `$x_1=99,x_2=0$`

and `$x_1=0,x_2=99$`

are potentially evaluated at the same time, so when a state is read multiple times from the system, both solutions should appear with the same frequency. Not only do these states exist in superposition, but also `[1, 98]`, `[98, 1]`, `[49, 50]`, `[50, 49]`, and so on. By itself this superposition isn't actually useful for optimisation, if we measured it we would be equally likely to measure any of the answers it would effectively be a random number generator (another one of our products). To use a device as a quantum optimiser rather than a random number generator, we need to interfere these potential solutions in such a way that less optimal solutions cancel out, and more optimal solutions reinforce. Using interference in a clever way to get good solutions is at the heart of all quantum optimisation techniques, optical techniques have the advantage that they can also take advantage of non-linear optical effects, for example, to amplify signals. Depending on the device, sub-optimal solutions may appear with various frequency. This is the nature of quantum computing. A solution state is read from the device with a certain probability and crafting an objective function is about increasing the likelyhood that a desireable state is read.

Quantum superposition, explained conceptually in [6], is different from and more powerful than standard classical probability distributions (which is what we would normally get from rolling a die). An intuitive way to understand this difference is the concept that while classical probabilities can only add, quantum amplitudes can add or subtract. This ability to subtract is the interference phenomena we mentioned before as being at the heart of quantum algorithms. Quantum superpositions are fragile, and can be destroyed by measurement, which converts them into ordinary probability distributions. For this reason, quantum devices and algorithms need to be designed carefully in a way which preserves these superpositions until the result is read out.

## Analog System

Feedback-based EQC is an analog system, which defines how a qudit is leveraged to perform computation. In an analog computer, a physical model is established to represent a mathematical one through the initialization of physical states. This physical system evolves until a stopping condition is reached, then the measurements of the system are translated into values in the domain of the mathematical model. Wired produced a good narrative and current state of analog computing in [1]. One of the most attractive benefits of analog computing at nanoscale is the miserly power consumption. [7] consume power during operation on the order of the consumption of a Mac Pro at idle (~50W)[8].

Computation

A critical aspect of computing with qudits on analog devices, as mentioned before, is the translation of the measurements to the domain of the problem. This can be referred to as "decoding". An analog device may take measurements in either discrete or continuous domains. Without excluding other possibilities, discrete measurements could be counting events such as photon arrivals and continuous measurements could be recording volumes of fluid. In the first case, counts of photons in certain modes are translated to a mathematical model by relative intensity or a binary response. In either case, unless the mathematical model has a 1-to-1 mapping with the photon counts, the meaning in the solution will likely be in a continuous domain. On the other hand, a continuous measurement usually translates to a mathematical solution using a continuous function. In both cases, approximation methods can be used to convert between continuous and discrete or vice versa.

## Qudit Dimensionality

Qudits are discussed in terms of the degree of dimensionality. This can be confusing when approaching computation with qudits because the dimensionality of the qudit impacts the domain of numerical values which can be assigned to what the qudit represents in a model. The confusion arises when also discussing the size of a model. The most common measure of the size of a model is the number of variables, This variable count `$n$`

results in a solution which is an `$n$`

dimensional vector. So, `$n$`

qudits with dimensionality `$k$`

will translate to a solution vector of size `$n$`

, with each element having `$k$`

possible values. When taking `$l$`

samples to test the effect of superposition, `$m<l$`

distinct vectors will be produced and each vector will appear `$a_i<l, i\in[1,\ldots l]$`

times.

## Conclusion

This primer on qudits has described what qudits are in relation to EQC, the power made possible through superposition, their use in analog computation and translation between a physical system and a mathematical model. Make sure to read more in the linked articles