Abstract
A medium-scale quantum computer with full universal quantum computing capability is necessary for various practical aims and testing applications. Here we report a 34-qubit quantum virtual machine (QtVM) based on a medium server. Our QtVM can run quantum assembly language with graphic interfaces. The QtVM is implemented with single qubit rotation gate, single to multiple controlled NOT gates to realize the universal quantum computation. Remarkably, it can realize a series of basic functions, such as, the "if" conditional programming language based on single-shot projective measurement results, "for" iteration programming language, build in arithmetic calculation. The measurement can be single-shot and arbitrary number of multi-shot types. In addition, there is in principle no limitation on number of logic gates implemented for quantum computation. By using QtVM, we demonstrate the simulation of dynamical quantum phase transition of transverse field Ising model by quantum circuits, where 34 qubits with one million gates are realized. We also show the realization of programmable Shor algorithm for factoring 15 and 35.
Introduction
The development of quantum algorithms is currently hindered by the limitations of Noisy Intermediate-Scale Quantum (NISQ) hardware, which suffers from low qubit counts, high error rates, and short coherence times. Quantum simulators on classical hardware provide a vital alternative for algorithm verification. However, classical simulation faces a "memory wall": the state vector size grows exponentially with the number of qubits. A 34-qubit simulation requires storing over 17 billion complex numbers, pushing the limits of standard high-performance servers. Furthermore, many simulators lack the "classical control" features—like changing an operation based on a mid-circuit measurement—that are essential for protocols like quantum error correction and teleportation.
The QtVM Architecture
To overcome these hurdles, we developed the Quantum Virtual Machine (QtVM), a software-based universal quantum computing platform. The architecture is split into two primary layers to handle the massive computational load:
- QtVM Sector: This is the low-level memory manager. It splits the state vector into chunks and stores real and imaginary parts separately. This layout allows the simulator to take full advantage of "superscalar" instructions (SIMD) on modern CPUs, performing multiple calculations in a single clock cycle.
- QtVM Pagetable: This higher-level layer manages the sectors and implements "lazy evaluation." Instead of executing every gate immediately, it queues them up to optimize the instruction sequence and manage I/O efficiently, even swapping data to disk if physical RAM is exceeded.
The machine is programmed using QtASM (Quantum Assembly Language), which supports a universal gate set and, crucially, classical instructions that interact with quantum registers.
Benchmarking and Results
The QtVM's capabilities were validated through two high-profile demonstrations that test both the width (qubit count) and depth (gate count) of the system.
Dynamical Quantum Phase Transitions (DQPT)
We simulated a 34-qubit transverse field Ising model to observe dynamical quantum phase transitions. This simulation involved one million logic gates and ran for approximately 20 days on a medium server. The results matched theoretical analytical predictions perfectly, capturing the non-analytic "kinks" in the free energy density. This proves the QtVM's stability for long-duration physical simulations.
Shor’s Factoring Algorithm
The QtVM successfully ran a programmable version of Shor’s algorithm. It factored the integer 15 using 16 qubits and 35 using 22 qubits. These tests confirm the machine's ability to handle the complex arithmetic and modular exponentiation circuits required for cryptographic analysis.
Conclusion
The QtVM provides a robust environment for testing universal quantum algorithms at a scale that pushes the limits of single-server classical hardware. By integrating classical control flow and optimizing memory management, it serves as a vital bridge between theoretical algorithm design and future large-scale quantum hardware. Future work will focus on distributed computing architectures to scale beyond the 34-qubit threshold and the incorporation of noise models to better emulate NISQ-era devices.
Summary updated