Quantum circuit design for AI

A quantum circuit is one of the models of quantum computing serving as a representation of a quantum program. The circuit serves as a component of the AI system architecture, performing a specific task. For instance, it can play the role of an inference engine. Here, we briefly outline the most common examples of quantum circuit designs that may arise as a result of the quantum software design process for AI systems.

(a)

(b)

(c)

(d)

(e)

Figure 1. Quantum circuits used in quantum machine learning applications: a) variational quantum circuit, b) variational quantum circuit implementing data re-uploading c) quantum kernel of the support vector machine, d) quantum convolutional neural network, and e) deep quantum neural network.  

Figure 1a represents a common and general design for variational quantum circuits. At the beginning of the program, all qubit states are typically initialised to a ket vector |0⟩. A ket vector is a notation introduced by Paul Dirac to represent a quantum state as an element of a complex Hilbert space (Nielsen and Chuang 2010). This Hilbert space contains all possible states of the quantum system.

Next, the input data, represented by the vector x, is encoded into a quantum state via the parameterised unitary operator Uϕ. Notably, there are a variety of possible designs for this unitary operation and corresponding circuitry. Each design involves a different trade-off between time complexity and robustness. Among them are basis encoding, amplitude encoding, angle encoding, and IQP-style encoding (Weigold et al. 2021; LaRose and Coyle 2020; Rath and Date 2023).

Subsequently, the prepared quantum state is then modified by a circuit implementing another unitary operation V(θ), which contains learnable parameters θ. Specifically, the unitary operations Uϕ and V(θ) consist of rotational single qubit gates and multiqubit controlled gates that introduce quantum entanglement. Typically, the learnable parameters θ are rotation angles in the single-qubit rotational gates. Finally, the output is obtained by measuring the quantum states, which converts the quantum states back into classical data.

Data encoding may be implemented multiple times within the circuit. In particular, one of the design solutions employed alongside the variational quantum circuit is a so-called data re-uploading (Schetakis et al. 2022). Data re-uploading is a subclass of quantum embedding implemented repeatedly in several quantum layers, as is illustrated in Figure 1b. Ultimately, this approach aims to enhance both the expressivity and trainability of the model.

The circuit in Figure 1c presents another quantum circuit that computes the kernel function for the implementation of a quantum-kernel support vector machine (Liu et al. 2021). It computes a feature map based on the distance between two data points, x1 and x2.

The circuit in Figure 1d illustrates the design of a quantum convolutional neural network as proposed in (Cong et al. 2019). This neural network includes analogs of classical pooling layers, implemented via the unitary gates V1. These gates have parameters that are determined by measurements from other qubits.

Additionally, the circuit in Figure 1e represents the design of a quantum deep neural network (Beer et al. 2020, Beer et al. 2021). Here, each layer of the quantum neural network, depicted from left to right in the inset in Figure 1e, corresponds to a multi-qubit channel arranged from top to bottom in the circuit diagram.