Skip to main page content
Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2019 Oct 18;5(10):eaaw9918.
doi: 10.1126/sciadv.aaw9918. eCollection 2019 Oct.

Training of Quantum Circuits on a Hybrid Quantum Computer

Affiliations
Free PMC article

Training of Quantum Circuits on a Hybrid Quantum Computer

D Zhu et al. Sci Adv. .
Free PMC article

Abstract

Generative modeling is a flavor of machine learning with applications ranging from computer vision to chemical design. It is expected to be one of the techniques most suited to take advantage of the additional resources provided by near-term quantum computers. Here, we implement a data-driven quantum circuit training algorithm on the canonical Bars-and-Stripes dataset using a quantum-classical hybrid machine. The training proceeds by running parameterized circuits on a trapped ion quantum computer and feeding the results to a classical optimizer. We apply two separate strategies, Particle Swarm and Bayesian optimization to this task. We show that the convergence of the quantum circuit to the target distribution depends critically on both the quantum hardware and classical optimization strategy. Our study represents the first successful training of a high-dimensional universal quantum circuit and highlights the promise and challenges associated with hybrid learning schemes.

Figures

Fig. 1
Fig. 1. DDQCL is a hybrid quantum algorithm scheme that can be used for generative modeling, illustrated here by the example of two by two BAS data.
From top left, clockwise: A parametrized circuit is initialized at random. Then, at each iteration, the circuit is executed on a trapped ion quantum computer. The probability distribution of measurement is compared on a classical computer against the BAS target dataset. Next, the quantified difference is used to optimize the parametrized circuit. This learning process is iterated until convergence.
Fig. 2
Fig. 2. Connectivity graphs and corresponding training circuits.
Top: Fully connected training circuit layer, with layers of rotations (square boxes) and entanglement gates (rounded boxes) between any pair of the four qubits. Bottom: Star-connected training circuit layer, with restricted entangling gates. In either case, each rotation (denoted by X or Z) and each entanglement gate (denoted by XX) include a distinct control parameter, for a total of 18 parameters for the fully connected circuit layer and 15 parameters for the star-connected circuit layer. We remove the first Z rotation (dashed square boxes) acting on the initial state ∣0>, resulting in 14 and 11 parameters. The connectivity figures on the left define the mapping between the four qubits and the pixels of the BAS images (see Fig. 1).
Fig. 3
Fig. 3. Quantum circuit training results with PSO, with simulations (orange) and trapped ion quantum computer results (blue).
Column (A) corresponds to a circuit with one layer of single qubit rotations (square boxes) and one layer of entanglement gates (rounded boxes) of all-to-all connectivity. The circuit converges well to produce the BAS distribution. Columns (B) and (C) correspond to a circuit with two and four layers and star connectivity, respectively. In (B), the simulation shows imperfect convergence with two extra state components (6 and 9), due to the limited connectivity, and the experimental results follow the simulation. In (C), the simulation shows convergence to the BAS distribution, but the experiment fails to converge despite performing 1400 quantum circuits. The optimization is sensitive to the choice of initialization seeds. To illustrate the convergence behavior, the shaded regions span the 5th to 95th percentile range of random seeds [500 for (A) and (B), 1000 for (C)], and the orange curve shows the median. The two-layer circuits have 14 and 11 parameters for (A) all-to-all and (B) star connectivity, respectively while the (C) star-connectivity circuit with four layers has 26 parameters. The number of PSO particles used is twice the number of parameters, and each training sample is repeated 5000 times. Including circuit compilation, controller-upload time, and classical PSO optimization, each circuit instance takes about 1 min to be processed, in addition to periodic interruptions for the recalibration of gates.
Fig. 4
Fig. 4. Quantum circuit training results with BO, with simulations (orange) and trapped ion quantum computer results (blue).
Column (A) corresponds to a circuit with two layers of gates and all-to-all connectivity. Columns (B) and (C) correspond to a circuit with two and four layers and star connectivity, respectively. Convergence is much faster than with PSO (Fig. 3). Unlike the PSO results, the four-layer star-connected circuit in (C) is trained successfully, and no prior knowledge enters BO process. As before, the two-layer circuits have 14 and 11 parameters for (A) all-to-all and (B) star connectivity, respectively while the (C) star-connectivity circuit with four layers has 26 parameters. We used a batch of five circuits per iteration, and each training sample was repeated 5000 times. Including circuit compilation, controller-upload time, and BO classical optimization, each circuit instance takes 2 to 5 min, depending on the amount of accumulated data.

Similar articles

See all similar articles

References

    1. McClean J. R., Romero J., Babbush R., Aspuru-Guzik A., The theory of variational hybrid quantum-classical algorithms. New J. Phys. 18, 023023 (2016).
    1. Preskill J., Quantum computing in the NISQ era and beyond. Quantum 2, 79 (2018).
    1. Kandala A., Mezzacapo A., Temme K., Takita M., Brink M., Chow J. M., Gambetta J. M., Hardware-efficient variational quantum eigensolver for small molecules and quantum magnets. Nature 549, 242–246 (2017). - PubMed
    1. Peruzzo A., McClean J., Shadbolt P., Yung M.-H., Zhou X.-Q., Love P. J., Aspuru-Guzik A., O’Brien J. L., A variational eigenvalue solver on a photonic quantum processor. Nat. Commun. 5, 4213 (2014). - PMC - PubMed
    1. Hempel C., Maier C., Romero J., McClean J., Monz T., Shen H., Jurcevic P., Lanyon B. P., Love P., Babbush R., Aspuru-Guzik A., Blatt R., Roos C. F., Quantum chemistry calculations on a trapped-ion quantum simulator. Phys. Rev. X 8, 031022 (2018).

Publication types

LinkOut - more resources

Feedback