Universal quantum gates, artificial neurons and pattern recognition simulated by \textit{LC} resonators

We propose to simulate quantum gates by \textit{LC} resonators, where the amplitude and the phase of the voltage describe the quantum state. By controlling capacitance or inductance of resonators, it is possible to control the phase of the voltage arbitrarily. A set of resonators acts as the phase-shift, the Hadamard and the CNOT gates. They constitute a set of universal quantum gates. We also discuss an application to an artificial neuron. As an example, we study a pattern recognition of numbers and alphabets by evaluating the similarity between an input and the reference pattern. We also study a colored pattern recognition by using a complex neural network.


I. INTRODUCTION
Quantum computation is one of the most exciting fields of current physics [1][2][3] . It is realized in various systems including superconductors 4 , photonic systems 5 , quantum dots 6 , trapped ions 7 and nuclear magnetic resonance 8,9 . For universal quantum computation, it is well known that only three quantum gates are enough, which are the phase-shift, the Hadamard and the CNOT gates [10][11][12] .
Quantum machine learning is an emerging field of contemporary physics [31][32][33][34][35][36][37][38][39][40][41][42] . Neural networks are often used in machine learning, where artificial neurons are basic elements 43,44 . An artificial neuron has an internal degree of freedom called the weight. The output is determined from the input data by taking the inner product between the input data and the weight, and by applying an activation function to it. The inner product of two objects measures the similarity between them. For instance, using a series of numbers representing a reference pattern as the weight, we may analyze the similarity between an input pattern and the reference pattern as an output. Artificial neuron is simulated by quantum computer [45][46][47][48][49][50][51] . Taking the inner product is the heaviest process, which will be executable by a quantum computer 48,52 .
In this paper, we propose to simulate one qubit by a pair of LC resonators, where a set of voltage and current represents a wave function. First, we construct a phase-shift gate with an arbitrary phase by tuning the capacitance of an LC resonator. Next, we construct the Hadamard gate by tuning the inductance of an inductor bridging two LC resonators. We also construct the CNOT and the controlled phase-shift gate by using a voltage-controlled inductor or capacitor. Finally, we discuss applications to artificial neuron and pattern recognition. The calculation of the inner product may be executed by the operation of LC resonators for arbitrary inputs and weights. We elucidate the difference between the standard quantum-circuit implementation and the present electric-circuit implementa-tion of the inner product.
This paper is composed as follows. In Sec.II, we start with a discussion how to store the information of N qubits |j ≡ |n 1 n 2 · · · n N in a set of LC resonators, where n i = 0, 1. Then, we propose to construct various quantum gates including a set of universal quantum gates by LC resonators.
In Sec.III, we apply our formalism to study artificial neurons, where we express various data with the aid of so-called real equally weighted (REW) states [53][54][55] . They are superposition states of N -qubits with coefficients α j = ±1/ √ 2 N . In Sec.IV, we discuss a pattern recognition by calculating the inner product of an input data and the reference data. We present explicit examples of number recognition and alphabet recognition.
In Sec.V, we generalize REW states to include complex coefficients α j = e iθj / √ 2 N . We call them complex equally weighted (CEW) states. Then, we introduce complexartificial neurons to deal with the inner product of CEW states. In Sec.VI, we propose to represent a colored pattern by a CEW state, where colored pattern recognition is done by evaluating the inner product of two CEW states representing the reference and an input pattern.
In Sec.VII, we present an electric-circuit implementation of quantum gates for calculation of an inner product starting from the initial N -qubit state |00 · · · 0 .
In Sec.VIII, we explore REW states from a viewpoint of graph and hypergraph states. We also introduce weighted graph and hypergraph states to represent CEW states. Sec.IX is devoted to discussions.

II. LC RESONATORS, QUBITS AND GATES
We use a set of 2 N identical LC resonators to simulate Nqubit quantum computation. An instance of N = 2 is illustrated in Fig.1(a). The voltage of the jth LC resonator is expressed as where ω 0 = 1/ √ LC is the resonant frequency, V 0 j is the absolute value of the voltage and θ j is the phase shift.
A qubit state is defined by a superposition of the two states |0 and |1 as |ψ = α 0 |0 + α 1 |1 . Similarly, an N -qubit arXiv:2012.06124v1 [quant-ph] 11 Dec 2020 state is defined by a superposition of the 2 N states as which is expressed equivalently as where j is the decimal number corresponding to the binary nuber (n 1 n 2 · · · n N ) such as |0 = |0 · · · 00 , |1 = |0 · · · 01 , · · · , 2 N − 1 = |11 · · · 1 . It is a key observation 29 that we may set in the LC-resonator realization of quantum computation. Thus we store the information of N qubits in a set of LC resonators.
Here we propose to carry out a gate process by controlling externally the value C of a capacitance as in Fig.1(b) or the value L 1 of an inductor bridging two LC resonators as in Fig.1(c). For each gate process the initial and the final systems are the same set of 2 N identical LC resonators with the same energy, although the coefficient α j may be modified for some j. A gate process is required to be adiabatic.
The gate U is represented by a 2 N × 2 N matrix U jk such that By this operation, the initial state ψ ini is brought to the final state ψ fin = U ψ ini , where ψ ini = 2 N −1 j=0 α ini j |j and ψ fin = 2 N −1 k=0 α fin k |k . It follows that since U is a symmetric matrix in universal quantum computation.
Kirchhoff law and Schrödinger equation. We first consider a set of independent LC resonators. The Kirchhoff law of the jth LC resonator may be rewritten in the form of the Schrödinger equation 27,30 , where H (t) = −ω 0 σ y is the Hamiltonian, and is the wave function. Energy conservation and probability conservation. The total energy of the system is given by where U E and U M are the electrostatic energy and the magnetic energy, respectively.
On the other hand, by using (8), the probability of the wave function is rewritten as Hence, the conservation of the probability of the wave function is assured by the conservation of the total energy 28 . As we have stated, we arrange a gate process so that the total energy is the same before and after the gate process. It corresponds to the conservation of the probability for qubits j |α j | 2 = 1. Phase-shift gate. The phase-shift gate is defined by the matrix which acts on the one-qubit state (|0 , |1 ) t . Namely, the action is To generate the phase shift φ in the wave function, it is enough to control only the capacitance C in the LC resonator externally during the gating process as shown in Fig.1(b). We control the capacitance as with four parameters C 0 1 , t 1 , t 2 and T , as shown in Fig.2(a1), (b1) and (c1).
It is possible to determine analytically how the phase shift φ depends on these parameters by calculating the Berry phase. Since the voltage evolution V (t) is written as a Schrödinger equation, we may use an adiabatic approximation. The snap shot wave function at time t = τ is given by ψ(τ ) = 2L/CI 0ψ (τ ), whereψ(τ ) is the normalized wave function, with ω τ the snapshot frequency, The Berry phase is calculated as When the perturbation C 1 (t) is small enough with respect to C 0 , it is calculated as The horizontal axis is time t. Time span is 0 < t < 50π for (*1), (*2) and *(4). It is 46π < t < 50π for (*3), representing the final state. We set C 0 1 /C0 = 0.1 and T = 10ω0 for 0 < ω0t < 50π. We set ω0t1 = 10π for all phase-shift gate. We also set ω0t2 = 15π for the π/4 phase-shift gate, ω0t2 = 20π for the π/2 phase-shift gate and ω0t2 = 30π for the π phase-shift (i.e., Pauli Z) gate, where φ is the phase shift given by It is explicitly calculated as which yields provided T t 1 < t 2 t. Hence, we can tune the phase shift φ arbitrary by controlling the magnitude of (t 2 − t 1 ) C 0 1 . We next solve numerically the differential equation (7) to study the time evolution of the voltage V (t), and confirm the phase-shift formula (20). When we fix C 0 1 = 0.1C 0 and We present numerical results of the time evolution V (t) by choosing ω 0 t 2 = 15π, 20π and 30π in Fig.2(a2), (b2) and (c2). See Fig.2(a3), (b3) and (c3) for V (t) for t t 2 , representing the final state. The phase shift is found to occur due to the perturbation C 1 (t). The phase shift φ(t) during a gating process is shown in Fig.2(a4), (b4) and (c4). After the gating process, the resonance frequency returns to ω 0 but the phase φ becomes different from the initial value. It reads φ = π/4, π/2 and π as in Fig.2(a4), (b4) and (c4). These numerical results confirm the analytical formula (20).
Hadamard gate. The Hadamard gate is defined by the matrix which acts the one-qubit state (|0 , |1 ) t . It is known to be given by 27,28 where U π/2 is the π/2 phase-shift gate, while U mix is the mixing gate defined by We construct the mixing gate (24) in what follows.
We consider a pair of LC resonators bridged by an inductor L 1 as shown in Fig.1 where I 1 , I 2 , I 3 , V 1 and V 2 are defined in Fig.1(c). It is rewritten in the form of the Schrödinger equation as in Eq.(7) with the Hamiltonian and the wave function (27) By making a snapshot approximation, the eigenvalues are given by with at each t.
We consider a process where the inductor L 1 is bridged to the LC resonators during a time interval t 1 < t < t 2 but not for t < t 1 and t > t 2 . For example, we may take which we have illustrated in Fig.3(a).
We solve (25) numerically with the use of (30) and show how the voltage evolves in Fig.3. By tuning t 2 − t 1 and L 1 appropriately, in order to construct the mixing gate (24), we make the magnitudes of V 1 and V 2 identical in the final state, i.e., for t t 2 . We find the phase delay π/4 in V 1 and the phase advance π/4 in V 2 as in Fig.3(a4).
First, we analyze the case where only the left AC resonator is active for t ≤ 0, or At we may solve the Kirchhoff equation (25) for the voltages as where we have chosen the initial condition to meet (31), or When 1, the oscillation modes are made of the highfrequency mode +1 2 ω 0 and the low-frequency mode −1 2 ω 0 . (ii) At t = t 2 , we require the amplitudes of V 1 (t) and V 2 (t) to be identical. Since the amplitude is determined by the lowfrequency mode, the condition reads Since the connection is weak, we have L/L 1 1, which leads to 1 + L/L 1 . We use it to derive the relation which fixes t 2 to generate the mixing gate (24). The voltages read where use was made of (32), (33) and (36). There are phase shifts ± π 4 . (iii) For t > t 2 , since the perturbation is off, two LC resonators resonate independently with the initial condition (37) and (38), or It followed that from Eqs. (4), (31), (39) and (40). Next, we analyze the case where only the right AC resonator is active for t ≤ 0, or instead of (31). By making precisely the same analysis, we obtain The results (41), (42) (44) and (45) are summarized as the mixing gate (24) based on the definition (6). NOT gate. The NOT gate is defined by the matrix which acts on one qubit. We find from Eq.(24) that It is given by the sequential applications of the mixing gate. The construction is similar to that of the mixing gate provided the duration of the inductor L 1 is made twice. We present numerical results in Fig.3(b). With respect to an analytical study, the main equation is in place of Eq.(36).
One qubit universal gate. We may construct a combination of the Hadamard and phase-shift gates such as which represents any SU(2) generator. It is called the onequbit universal-quantum gate.
CNOT gate. The CNOT gate is defined by a matrix which acts the two-qubit state (|00 , |01 , |10 , |11 ) t . Twoqubit operation is constructed by using four LC resonators as in Fig.1. The CNOT gate is constructed by applying the NOT gate between the resonators representing |10 and |11 , as shown in Fig.1(d).
Controlled Z gate. The CZ gate is defined by a matrix which acts on the two-qubit state (|00 , |01 , |10 , |11 ) t . It follows from the definition that the controlled and target qubits are symmetric in the CZ gate, which leads to various equivalence quantum circuits as shown in Fig.4(a). We denote the CZ gate by the two black disks connected by a line.
CCZ gate. In a similar way to the CZ gate, we can construct the controlled-controlled Z (CCZ) gate acting on three qubits. It flips the sign x 7 of the state |111 . Namely, we flip x 7 to −x 7 . As in the case of the CZ gate, the CCZ gate is symmetric with respect to the exchange of the controlled and target qubits shown in Fig.4(b). We denote the CCZ gate by the three black disks connected by a line.
C p−1 Z gate. We further generalize the CCZ gate to the C p−1 Z gate. It is a p-qubit gate, which flips the sign x 2 p −1 of the coefficient of the state |11 · · · 1 . As in the case of the CZ and CCZ gates, the C p−1 Z gate is symmetric with respect to the controlled and target qubits.
More generally, we may take an N -qubit system with N > p. We may consider a C p−1 Z gate acting a p-qubit subspace. We denote it by p black disks connected by a line. Such C p−1 Z gates play an essential role to make a hypergraph state as we will soon see.
Controlled phase-shift gate. The controlled phase-shift gate is defined by the matrix which acts on two qubits. There is no action on the target qubit if the control qubit is |0 , while the φ phase-shift gate is applied if the control qubit is |1 . The controlled phase-shift gate is constructed by applying the phase-shift gate for the LC resonators representing |11 , as shown in Fig.1(e). Note that the CZ gate (51) is obtained by setting φ = π in the controlled phase-shift gate (52). Namely, it may be viewed as a generalization of the CZ gate, and hence we call it the CZ φ gate. C p−1 Z φ gate. In a similar way to C p−1 Z gates, we may define multi-controlled phase-shift gates, which we denote by C p−1 Z φ gates. It is a p-qubit gate, which multiplies the phase e iφ to the coefficient α 2 p −1 of the state |11 · · · 1 .

III. ARTIFICIAL NEURON
An artificial neuron is a mathematical model 43,44 to simulate a biological neuron. There are m inputs x 0 , x 1 , · · · , x m−1 and m weights w 0 , w 1 , · · · , w m−1 , where, x j and w j are real numbers. We represent the input and the weight by wave functions as 48 where |j forms the N qubit basis as in Eq.(3). Note the difference between the coefficients α j in Eq.(3) and x j , w j in Eq.(53) by the factor 1/ √ 2 N . The first step in the artificial neuron is to calculate the inner product j w j x j . The inner product of the input data and the weight data measures the similarity between them. For instance, using a series of numbers representing a set of ref- erence patterns as the weight, we may calculate the similarity between an input pattern and the reference pattern.
The inner product is outputted after applying an activation function, The activation function Φ has various forms such as the step function 56,57 , a linear function, a sigmoid function, a ramp function 58 and so on. We show a schematic of a neuron in Fig.5(a). In the process of artificial neuron, the heaviest procedure is the calculation of j w j x j , which is efficiently done by using a quantum computer 48 . We implement the wave functions (53) by unitary transformations from the initial state |0 , Then, the inner product is calculated as We explicitly construct U x and U w later in this section. On the other hand, the application of Φ is easy with the use of a classical computer since it is a one-to-one map. A simplest artificial neuron is given by the perceptron model 56,57 . Here, the input and the weight wave functions are given by Eq.(53) with x j = ±1 and w j = ±1. Such states are called real equally weighted (REW) states. Furthermore, the step function is used as the activation function, where Θ is a step function with the threshold h, Θ (x − h) = 1 for x ≥ h and Θ (x − h) = −1 for x < h. In our application of artificial neuron to pattern recognition we use REW states as in the perceptron model but without employing the activation function (57). We use the inner product itself as the output. We now discuss how to construct a REW state from the initial state |0 , or how to determine U x and U † w in Eq.(55) in the standard quantum-circuit implementation 48 and also in the electric-circuit implementation.
In the first step, we prepare the equal-coefficient state defined by This is done by way of the Walsh-Hadamard transform of the initial state |0 , where U (s) H is the Hadamard gate acting on the sth qubit. In the second step, we construct |ψ x and |ψ w from the equal-coefficient state as Here, V x is an operation by changing the coefficient x j in the state |ψ x to −x j if x j = −1 for all j. Hence, V x is given by a sequential application of C p−1 Z gates. For this purpose, we search for the qubit state |j whose coefficient is x j = −1. Then, we apply an appropriate C p−1 Z gate to the state to change its coefficient to x j = 1. An explicit example is given in Appendix A. We find from (55), (59) and (60) that and from (56) and (61) that This is the basic formula to calculate the inner product by a quantum computer starting from the initial state |0 . An explicit example of implementation is given in Sec.VII

IV. PATTERN RECOGNITION
Pattern recognition is one of the most useful applications of artificial neurons. As an example, we consider a pattern made of rectangular pixels painted in black and white. We show two patterns made of 5 × 4 pixels and 6 × 5 pixels, which are labelled by binary codes as in Fig.6(a) and (b). Next, we assign x j = 1 for white pixel and x j = −1 for black pixel. Here, j is a decimal number representing a binary code assigned to a pixel, 0 ≤ j ≤ N p − 1.
In order to represent N x × N y pixels, we prepare N qubits satisfying 2 N −1 < N x × N y ≤ 2 N . These N -qubit states are REW states, which are Eq.(53) with x j = ±1 and w j = ±1. Let there be N p patterns to be classified. It is N p = 10 for the number recognition and N p = 26 for the alphabet recognition as in Fig.7(a) and (b), respectively. We use a set of reference patterns as the weight wave function |ψ w (j) , and compare them with a set of input patterns |ψ x (j) : Examples are given in Fig.8 for N p = 10 and in Fig.9 for N p = 26. In these cases, it is enough to prepare five qubits. We estimate the similarity between an input pattern and the reference pattern by calculating the inner product ψ w |ψ x . We determine which input pattern is most similar to the reference pattern by searching the largest inner product ψ w |ψ x . This process is expressed by a single layer neural network with N x × N y inputs and N p outputs as in Fig.7. The inner product is calculated as where N error is the number of errors between the reference and the input patterns defined by We note that ψ w |ψ x can be negative for N error ≥ N p /2. We find | ψ w |ψ x | ≤ 1, where ψ w |ψ x = 1 indicates the perfect matching.
As the first example, we study a recognition of numbers. We choose a set of the reference patterns of numbers as given by Fig.8(a). We implement them into a wave function |ψ w . Explicit forms are shown in Appendix B. Then, we take a set of input patterns. See Fig.8(b) for an instance. First, we calculate the self similarity defined by ψ w (j 1 ) |ψ w (j 2 ) , which is shown in Fig.8(c). The maximum values are taken when j = j 1 = j 2 with ψ w (j) |ψ w (j) = 1. In order to well recognize different patterns as different ones, it is necessary that ψ w (j 1 ) |ψ w (j 2 ) is small for j 1 = j 2 . From Fig.8(c), we find that 1, 2, 3, 4, 5 and 7 are well distinguishable because ψ w (j 1 ) |ψ w (j 2 ) is low. On the other hand, 6, 8 and 9 are hardly distinguishable because the similarity is 0.9, where only one pixel is different.
Next, we study a cross similarity between the input and the reference patterns by calculating ψ w (j 1 ) |ψ x (j 2 ) . We fix j 2 for the input pattern and determine which reference pattern is most similar by choosing the largest inner product. We find 0, 1, 2, 3, 4, 5, 6, 7 and 9 are correctly recognized, but 8 is ill recognized to be 3. See Fig.8(d). In a similar way, we study an alphabet recognition. We choose a set of the reference patterns of alphabets as in Fig.9(a) and a set of input patterns in Fig.9(b). The selfsimilarity and the cross-similarity are shown in Fig.9(c) and (d). We find the following properties from the self similarity: Alphabets are easier to differentiate comparing to numbers. "F" is hardly differentiated from "P", where the similarity is 14/15. "C", "D", "G" and "O" are hardly differentiable among themselves, and "M" and "N" are hardly differentiated one another, where the similarity is 13/15. We find the following properties from the cross similarity: There are ill recognitions of "D" to "Q", "E" to "F", "O" to "D", "X" to "Y" and "Z" to "T". In addition, "C" has equal similarity to both "C" and "D" in the reference pattern, "G" has equal similarity to both "D" and "G". "I" has equal similarity to both "I" and "T". For other cases, the input patterns are well recognized with respect to the reference patterns.

V. COMPLEX-ARTIFICIAL NEURON
We proceed to study a complex-artificial neuron, where the input and the weight are given by CEW states. Namely, the wave functions are given by (53) with complex coefficients x j = e iθ x j and w j = e iθ w j . The inner product reads The output is given by 52 where Φ is a complex-activation function. Any CEW state is generated by a sequential application of C p−1 Z φ gates to the equal-coefficient state (58) precisely as the REW state is generated by a sequential application of C p−1 Z gates to it. Let us explain it by taking the most general CEW state |ψ in the 3-qubit system. It is given by with where we set θ 000 = 0 without loss of generality. We list up all possible C p−1 Z φ gates in Fig.10(a). Recall that all C p−1 Z φ gates are commutative. The generated CEW state is given by where the angle φ 1 is that of the Z φ1 gate, φ 12 is that of CZ φ12 and φ 123 is that of CCZ φ123 , and so on. It is easy to see that the angles associated with C p−1 Z φ gates (69) are uniquely fixed in terms of θ n1n2n3 in the given CEW state (67) because there are seven independent variables in both of these equations. Indeed, by equating (67) and (69), we obtain relations We have shown which C p−1 Z φ gates we have to prepare in order to generate the most general CEW state (67) in the 3qubit system. We also list up all possible C p−1 Z φ gates for the 4-qubit system in Fig.10(b). In general, we can always construct an arbitrary CEW state by applying C p−1 Z φ gates in N -qubit systems.

VI. COLORED PATTERN RECOGNITION
The color circle is a color pallet indexed by a number on a circle as shown in Fig.11(a). It has a one-to-one correspondence to e iθ . For example, θ = 0 indicates red and θ = π indicates cyan. Hence, a color pattern made of pixels is well represented by a CEW state. By using a complex neural network, we can estimate a similarity between two colored patterns.
For example, we show a reference colored pattern in Fig.11(b). It is enough to prepare 4 qubits for a pattern with 16 pixels. We make an input colored pattern by modifying color randomly within 20%. The inner product of two patterns is 0.993 − 0.096i. It is relatively large although the color of each pixel is modified by 20%. This is because the input pattern is created from the reference pattern by adding noise, where the noise is cancelled by adding all contributions from pixels. Hence, our scheme can evaluate similarity between two colored patterns with color noise.
The merit of our color representation scheme is that the color circle is naturally represented by a continuous circle e iθ . In the standard digital representation, we have to digitalize color. The number of classical bits increases as the increase of hue decomposition. On the other hand, all color is continuously represented by one number e iθ in our scheme.

VII. ELECTRIC-CIRCUIT IMPLEMENTATION
We implement these models by a set of LC resonators. We prepare 2 N LC resonators to represent the states |j or |n 1 n 2 · · · n s · · · n N . The main issue is the electric-circuit implementation of the inner product formula (62), or which may be used for CEW states as well as REW states. The first step is the construction of the equal-coefficient state (58)  H for the sth qubit is simulated by bridging two resonators |n 1 n 2 · · · n s · · · n N and |n 1 n 2 · · · n s · · · n N , when n s = 1 for n s = 0 and n s = 0 for n s = 1. In the case of N = 4, the Hadamard gate U  and |1000 , |0001 and |1001 , |0010 and |1010 , |0011 and |1011 , |0100 and |1100 , |0101 and |1101 , |0110 and |1110 , |0111 and |1111 .
Although there are many bridges, their assignment is systematic. Apparently we need N 2 N −1 operations. Actually, many bridges shown by unfilled disks in Fig.12(b) are not necessary since we start with |0 and end up with 0| as in Eq.(71). Then, we may delete all operations which is irrelevant to the input and the output, which greatly reduces the number of operations. The necessary operation relating to the N -qubit Hadamard gate is N s 2 s−1 = 2 N − 1.The reduction rate is The second step is the operation of C p−1 Z gates in the case of REW states. In construct to the application of C p−1 Z gates in the standard quantum-circuit implementation, it is enough to apply the π phase-shift only for |j with x j = −1. More explicitly, the CZ gate for two qubits is simulated by the π phase-shift gate applied to the resonator representing |11 , while the CCZ gate for three qubits is simulated by the π phase-shift gate applied to the resonator representing |111 . In general, the C p−1 Z gate for p qubits is simulated by the π phase-shift gate applied only to the resonator representing |11 · · · 1 .
We consider an example of an inner product for the input and the weight states given by and where the inner product is ψ w |ψ x = 3/8. The quantum circuit and the electric circuit to calculate this inner product based on the inner product formula (62) are given in Fig.12(a). Then, we apply the π phase-shift gate for |0000 and |0001 in order to construct |ψ x , while we apply the π phase-shift gate for |0010 , |0011 and |0100 in order to construct |ψ w as in Fig.12(b). It is convenient to define the output y j for each resonator representing |j in Fig.13 by (76) The outs y j are always real. Especially, we are interested in the output for |0000 , which is y 0 = 3/8. It reproduce a correct the inner product given below Eq.(75).
The generalization to the calculation of an inner product of CEW states is straightforward. As a characteristic feature of the present electric-circuit simulation, it is possible to create a φ phase-shift gate with an arbitrary angle φ just by tuning the capacitance of the relevant LC resonator according the formula (20). Hence, any CEW state is generated by applying C p−1 Z φ gates with the use of appropriate φ phase-shift gates. FIG. 14: (*1) Quantum-circuit representation, and (*2) graph and hypergraph representation. Z gates correspond to self-loops, which are marked in orange disks in a graph or a hypergraph. CZ gates correspond to edges, which are marked in black lines in a hypergraph. C p−1 Z gates correspond to hyperedges, which are marked in colored ovals in a hypergraph. (a*) graph state, (b*) for ψx and (c*) for ψw.

VIII. GRAPH THEORY
Graph states and hypergraph states. It is intriguing to examine the REW state in the context of graph theory. Such a state is referred to as a graph state 59-61 that is constructed by a sequential application of Z gates and CZ gates to the equal-coefficient state (58). The order of a Z gate and a CZ gate is irrelevant because they are diagonal operators and commutable. Then, we may establish one-to-one correspondence between a graph and a graph state. Indeed, in order to make a graph corresponding to a graph state, we first prepare N vertices representing N qubits, as in Fig.14(a2) for an instance of N = 4. We add self-loop links to the vertices to which Z gates are applied, while we connect two vertices by an edge where CZ gates are operated. Different graphs represent different graph states due to the commutative nature of the Z and the CZ gates. See Fig.14(a2).
The set of all graph states is a subgroup of the REW states by the following reasoning. The number of the Z gates is N , while the number of the CZ gates is N C 2 . Hence, we can express 2 N + N C2 graph states. On the other hand, the number of the REW states is 2 2 N . Here, 2 2 N > 2 N + N C2 for N ≥ 3. In order to represent a complete set of the REW states, it is necessary to introduce the notion of hypergraph 55,62 , which is a generalization of graph. In a hypergraph, we have a hyperedge connecting more than three vertices. For example, a CCZ gate is represented by a hyperedge with order 3, which connects three vertices, as in Fig.14(b2). In a similar way, a C p−1 Z gate is represented by a hyperedge with order p, which connects p vertices. The number of the C p−1 Z gates is given by N C p . Then, the total number of gates is 2 N p=1 ( N Cp) = 2 2 N −1 . The overall phase is irrelevant and thus it is a complete representation. We show a hypergraph representation of |ψ x and |ψ w in Fig.14. In Fig.14(b), a hyperedge is represented by an oval containing three vertices connected by a hyperedge. In Fig.14(c), three hyperedges are represented by three ovals containing vertices connected by three hyperedge.
Weighted graph states and hypergraph states. As a generalization of graph states and hypergraph states, we may introduce the concepts of weighted graph states and weighted hypergraph states in the context of CEW states. A weighted graph state is defined by a sequential application of Z φ gates and CZ φ gates to the equal-coefficient state (58), where e iφ is a weight. Next, a weighted hypergraph state is generated by a sequential application of C p−1 Z φ gates to the equalcoefficient state (58). Here, we assign a p-hyperedge to a C p−1 Z φ gate as in the case of C p−1 Z gates, and then we assign a weight e iφ to each hyperedge.

IX. DISCUSSION
We have proposed an electric-circuit simulation of universal quantum gates on the basis of LC resonators bridged by inductors. Here, capacitance and inductance are controllable by using a variable capacitance diode and an active inductor, respectively.
An artificial neuron requires many C p−1 Z gates for various p. It is actually a hard task to realize C p−1 Z gates in the standard quantum-circuit implementation even by employing modern technology such as superconductor, ion-trap or photonic systems for p ≥ 3. This difficulty originates in the fact that a C p−1 Z gate implies a p-body interaction. Although it is possible to decompose a C p−1 Z gate into simpler gates, there emerge many gates 3 . The problem becomes worse for a complex-artificial neuron, where we use C p−1 Z φ gates instead of C p−1 Z gates. The C p−1 Z φ gate contains the phaseshift gate with angle φ. It is possible but quite tedious to construct a C p−1 Z φ gate with the use of a set of universal quantum gates. On the contrary, it is simple to construct a C p−1 Z φ gate by inserting one φ phase-shift gate in the electric-circuit implementation.
Furthermore, it is a nontrivial problem to construct a superposition state such as REW or CEW states. It is necessary to design several quantum gates in order to make such a state, for which we need to use a classical computer in general. See a typical example in Fig.12(a) and Appendix A. On the other hand, it is sufficient to insert simply some φ phase-shift gates in the electric-circuit implementation. Although the implementation of the Hadamard gates is harder, the assignment is systematic and trivial. See the corresponding example in Fig.12(b).
We have previously proposed another kind of electriccircuit simulation of universal quantum gates, where quantum gates are constructed by bridging telegrapher wires 27,28 . The number of elements of electric circuits increases as the increase of the number of quantum gates. On the other hand, the number of the elements is fixed in the present scheme irrespective to the number of quantum gates because the operation is performed in time evolution. Another merit comparing to the wire construction is that the present scheme is programmable because the gate is applied temporally, which is contrasted to the wire construction where the gates are constructed by setting wires.
The author is very much grateful to E. Saito and N. Nagaosa for helpful discussions on the subject. This work is supported by the Grants-in-Aid for Scientific Research from MEXT KAKENHI (Grants No. JP17K05490 and No. JP18H03676). This work is also supported by CREST, JST (JPMJCR16F1 and JPMJCR20T2).
First, we rewrite it so that the coefficient of |0000 is 1, We note that overall phase − is irrelevant in quantum computation.
Hence, it follows from (60) that Consequently, |ψ x is obtained by the inverse process as because all C p−1 Z gates are commutative and one C p−1 Z gate U satisfies U 2 = 1.