VM6502Q and Qrack¶
Qrack is a C++ quantum bit and gate simulator, with the ability to support arbitrary numbers of entangled qubits - up to system limitations. Suitable for embedding in other projects, the
Qrack::QInterface contains a full and performant collection of standard quantum gates, as well as variations suitable for register operations and arbitrary rotations.
The developers of Qrack maintain a fork of the ProjectQ quantum computer compiler which can use Qrack as the simulator, generally. This stack is also compatible with the SimulaQron quantum network simulator. (Qrack’s developers are not directly affiliated with either of those projects, but we thank them for their contribution to the open source quantum computing community!)
As a demonstration of the
Qrack::QInterface implementation, a MOS-6502 microprocessor [MOS-6502] virtual machine has been modified with a set of new opcodes (MOS-6502Q Opcodes) supporting quantum operations. The vm6502q virtual machine exposes new integrated quantum opcodes such as Hadamard transforms and an X-indexed LDA, with the X register in superposition, across a page of memory. An assembly example of a Grover’s search with a simple oracle function is demonstrated in the examples repository.
Finally, a 6502 toolchain - based on CC65 - has been modified and enhanced to support the new opcodes for the assembler. We have discussed potential C Syntax Enhancements. This is performed primarily as sandbox/exploratory work to help clarify what quantum computational software engineering might look like as the hardware reaches commoditization.
Copyright (c) Daniel Strano 2017-2019 and the Qrack contributors. All rights reserved.
Daniel Strano would like to specifically note that Benn Bollay is almost entirely responsible for the implementation of QUnit and tooling, including unit tests, in addition to large amounts of work on the documentation and many other various contributions in intensive reviews. Also, thank you to Marek Karcz for supplying an awesome base classical 6502 emulator for proof-of-concept.