{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# How to Continue Making a Wormhole\n", "\n", "## Part 3: A Really Existing Quantum Computer" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here's a quick example using Rigetti's quantum computer. You go on their site: [rigetti.com](https://www.rigetti.com/.com) and make an account. The idea is you have a classical virtual server sitting next to the quantum lattices. You can ssh in, put code to it. Meanwhile, you reserve a lattice at a certain time using their web interface. And when your time arrives, your classical server knows about it, and if you call \"get_qc\" in your python code with the lattice name, then your program runs on the quantum hardware. They have pretty good documentation:\n", "\n", "https://www.rigetti.com/qcs-docs\n", "\n", "http://docs.rigetti.com/en/stable/\n", "\n", "https://grove-docs.readthedocs.io/en/latest/\n", "\n", "When you run things offline, you have to first make sure you do\n", "\n", "`qvm -S`\n", "\n", "`quilc -S`\n", "\n", "which starts the quantum virtual machine and the compiler. The idea is you can specify your quantum program in terms of a circuit of unitary matrices and measurements. Then this is compiled down into local gates, etc, which are optimized for the specific lattice structure you're running on, wherein only certain qubits can interact. Moreover your python defined program is compiled into an intermediate language.\n", "\n", "So here we just do a simple wormhole. We just have to translate over our qutip operators into forest operators, which require definitions, etc. We use grove's \"create_arbitrary_state\" to get a unitary that takes us from the fixed initial state to the TFD. In the end, we just measure the output qubit, and repeat the experiment many times.\n", "\n", "Now I'm sure there are much much more elegant ways of translating the wormhole stuff into something really tuned to Rigetti's system, but that's for the future. As it is, if I do any more qubits that 5 total, the compiler/qvm system times out. You'll find a very weak effect. But that's all we can do for now!\n", "\n", "It's also recommended to use [pytket](https://github.com/CQCL/pytket) which allows your quantum programs to run on many of the currently available quantum computing platforms.\n", "\n", "