Trading quantum resources on Holochain

Jon Paprocki
The Advancedness Project
15 min readApr 25, 2018

In this essay we shall explore one way in which biomimicry-based distributed computing architectures such as Holochain may interact with the quantum computers of tomorrow. Today’s essay is sponsored by slime molds, absolute masters of biological distributed computing.

A slime mold is a colony of independent eukaryotes that utilizes the exchange of communication molecules to behave as a singular entity that can efficiently solve certain puzzles, retains memory after being cut in two, etc. Here’s one vote for slime molds being the unofficial mascot of Holochain.

Besides thinking that this particular application may be rather useful, there are a few good reasons to write this article and subsequent “quantum Holochain” articles.

  1. Create mutual interest in the quantum computing and Holochain communities. The more Holochainers that have an interest in quantum computing, the more they will be able to adapt to and integrate the massive and unpredictable changes that quantum computing is poised to bring to the computing landscape. In addition, the more people in the quantum computing community that become Holochainers, the more Holochainers there will be that know how to assist in integrating quantum computing with Holochain. It is my intention for this article to be a seed that will someday grow into a bridge between these two communities. Thus, it cannot be too early to begin forming a quantum Holochain community!
  2. Create a picture of one moment in time of how one person thought quantum computing and Holochain or similar systems may interact. Any predictions I make in this post could one day be found to be foolishly naive, spot on, or completely missing something that became the most important thing. It is always very eye-opening to read historical accounts of nobody predicting a development that seems like it would be obvious in retrospect.
  3. Understanding how the biomimicry-based computing model of Holochain couples with quantum computers may give hints to how what aspects, if any, of biological organisms may be understood as large scale distributed biological quantum computers (the motivating idea behind this blog, see Introduction for a better idea of what I mean by this). In the future, it will be possible in principle to simulate a “quantum life form” as an ecosystem of hybrid digital/analog/quantum distributed computing nodes. We will not go far into this idea today, but will lay groundwork in that direction.

Any large scale interlinking of Holochain and quantum computing will require a developed quantum internet. To keep the length reasonable, we overlook the immense challenge of this prospect, but I have written about it here, see also this recent feature in Nature.

Earlier drafts of this post consisted of several topics, but to keep the length and number of new ideas reasonable I decided that I will only talk about trading “quantum resources” via a mutual credit system built on Holochain, which can be thought of as a quantum analog of ordinary computer resources like CPU cycles and RAM. I also elaborate on the idea of a “quantum github” I began in Quantum + Decentralized. As a bonus, connections to biology and qualia are made. Other future topics include: why quantum computers will not be a threat to distributed computing systems for a long time and what to do to ensure that that is true in the mean time (I gave a partial answer to this in the Holochain Mattermost server here), how quantum computers can improve the efficiency and security of distributed computing systems and mesh networks, and speculation on the manner in which biological quantum information networks appear and what their distributed computing hybrid digital/quantum software analog would be like.

Matthew Fisher’s quantum brain is what I’m betting on when it comes to distributed biological quantum computers.

I should also reveal that I am now a biased party, as I have been actively volunteering several hours a week on Holochain related activities since soon after I published the first post on this blog in January. While I do wish to see Holochain succeed, the ideas in this article will be applicable to similar biomimicry-based distributed computing architectures and I use Holochain as a concrete example because right now it is the only one that does what it does.

If you are not yet familiar with Holochain, you could start with this 8 minute video, but further reading may be required to understand all of the ideas here. Familiarity with basics ideas of quantum computing is also required and some of that will be explained as we go, but check earlier posts for more basics and resources.

Mutual credit systems in Holochain

While you can make blockchain-like token-based cryptocurrencies on Holochain (which would not take advantage of fact that Holochains do not require global consensus to operate effectively), it is much better suited to the creation of mutual credit systems. This is essentially a system of IOUs, where the thing being owed is some agreed upon resource. Someone requests a resource from a provider, the provider delivers the resource at that time, and then the provider is credited with a positive balance of resource-tokens/IOUs and the receiver is given a corresponding negative balance of IOUs. A negative balance is a promise that it will be paid off by purchasing resource-tokens back from providers (not necessarily the original one) or becoming a provider themselves. As long as you have a reputation of “buying back” those IOUs, people will agree to give you credit. At any given time, the total amount of “currency” in the system is zero, since one person possessing a positive balance means there is another another person possessing an equal and opposite balance. The resource that can be owed in a mutual credit system could be virtually anything, but if you want it to be well-behaved you need to choose wisely. Providers need to be able to provide the resource on demand, and this is tricky with any non-renewable resource such as gold (and this was part of the reason for the end of the gold standard) but is great for things like computational power.

Besides being thousands of times more efficient computationally than blockchains (as you do not need to know where every dollar in the world is to spend one, but instead only need to know and confirm the balances of those within your gossip bubble), well-designed mutual credit systems have one important property that has thus far been impossible to achieve with cryptocurrency (though attempts are being made): value-stability. A usable currency can’t be fluctuating in value all the time, and this problem plagues every single cryptocurrency project so far. This is why Holochain goes in a different direction with mutual credit systems and abandons globally agreed-upon ledgers entirely. As Arthur Brock (long-time currency designer and cofounder of the Metacurrency Project, which Holochain is a part of) writes here, 3 things are required for a value-stable mutual credit system:

  • Dynamic supply — that can expand and contract based on real market behavior and demand
  • Sufficient supply — not too scarce, not too plenty, but just right
  • Strong internal value — a strong spending sink with clarity about the currency’s value in obtaining it

Holochain, being a pattern for building distributed apps (dApps, sometimes called hApps in the context of Holochain), is not a mutual credit system itself but its biomimicry-based distributed computing architecture is particularly well-suited for their creation. The first such mutual credit system being built upon Holochain is Holo, which acts as a bridge between the ordinary internet and the distributed apps built on Holochain. It works by creating a mutual credit system with IOUs backed by computing power used for hosting. Essentially, a host running Holo may allow a user using an ordinary web browser to access Holochain dApps by spinning up a Holochain node on their behalf and relaying the information back to the user. A dApp creator requests that a host act as a bridge for their dApp, and when the host actually does so a positive Holo fuel balance is credited to the host and a negative balance to the creator. The creator must eventually purchase Holo fuel from hosts or else they will eventually stop hosting for them. An important thing to note for later is Holo fuel is only created at the moment the actual resource of computing power is used — that is, if you trace the change of hands of every unit of Holo fuel, it originates from a host who did something useful.

If you are still confused, try watching this video explaining Holo and Holochain.

Mutual credit systems and biomimicry

How do mutual credit systems relate to the theme of biomimicry? Thinking at the biomolecular level, “cellular economies” are cousins of value-stable mutual credit systems. Value-stable mutual credit systems are an abstract form of trading the actual underlying varying, abundant, and consumable resource.

Cells require many consumable resources to function, such as energy (ATP) and various proteins. Cells use organic molecules such as glucose to produce ATP, and in animals this is provided primarily via the bloodstream via several processes taking advantage of primarily either thermodynamics or electrochemical gradients. When there is more than enough food, it is converted to fat and then stored. When there is not enough food, certain cells know to produce hormones alerting the brain to create the feeling of hunger (which is a quale, and thus this post is now related to all 3 types of computing discussed on this blog!) and also trigger the burning of fat.

Here, the underlying resources being traded are nutrients, while the “credit” (seen more generally as a mechanism of encouragement to keep resources flowing) is a complicated system of messenger molecules (among other processes) that ultimately informs the brain on whether it needs to e.g. burn fat and/or acquire more food via the quale of hunger that you experience. When a cell sends off a hormone that asks for food, one could think of it as trying to redeem nutrients in exchange for all the hard work its been doing down there in the liver. If you don’t feed them, they will complain and pay you back with hunger and eventually pain and cell death. If you do feed them, they will do their job, working harmoniously with its neighbors performing tasks that would be a waste of energy if the surrounding body didn’t respond by meeting the cell’s needs. If you don’t pay back your debts in a mutual credit system, you too will eventually be met with complaints and eventually people will stop doing business with you. I don’t wish to elaborate on this tangent further here, but I suggest this article for an entertaining read on cellular economies and how it all comes down to the original ultimate mutual credit system: electron exchange. The Metacurrency Project pushes this sort of perspective as far as it can go and gives a much broader vision of what currency is and ought to be.

We’ll link this topic up with quantum resource trading at the end.

Bacteria colonies are known to trade resources such as proteins and even genes amongst themselves. Their growth pattern can be understood as an emergent effect resulting from a distributed computing process mediated by messenger molecules to optimize the distribution of these resources.

Holo-Magic

The resource behind Holo fuel is computing power used for web hosting. Naturally, one could build mutual credit systems for computing used for other tasks as well. What sort of mutual credit systems would make sense for quantum computers?

An important research trend over the past several years in quantum computing has been quantum resource theory. Modern programs on a digital computer requires certain quantities of CPU usage, RAM usage, GPU usage, etc. We may conceive of these as being various resources that must be consumed to run the program. To some extent, these resources may be traded for one another, as a GPU is just a specialized type of CPU. Quantum resource theory has been an effort to understand quantum programs in similar terms. Various quantum resources have been defined, such as entanglement, quantum coherence, quantum key generation (for quantum cryptography), and magic states. It may be possible for all of these to be a cryptographically-traded resource over a quantum internet, but to keep things sane we will only talk about one.

Today we will discuss the feasibility and usefulness of a mutual credit system built on exchange of magic states. Read the above link for a more thorough explanation, but essentially magic states can be understood as special difficult-to-prepare qubit configurations that are particularly useful for the operation of quantum programs. In fact, it is defined in such a way that it is precisely the resource that enables quantum computers to work enormously faster on tasks suitable for them than what digital computers are capable of. A quantum computer with no magic is essentially a glorified digital computer. A quantum computer with magic can perform feats far beyond what a supercomputer could accomplish in the age of the universe. Magic singles out exactly what it is that makes quantum computers worth using, and thus is an excellent candidate resource to be traded. As a bonus, magic states are known to be particularly well-suited for lowering the error rate of quantum computers, which is the most pressing problem pushing the brakes on the development of quantum computing. It is expected that the majority of the hardware on sophisticated quantum computers of the not-so-far future will be dedicated to the production of magic states, and so it is reasonable to think that the early quantum internet will be designed specifically to accommodate the quantum teleportation (i.e. exchanging) of magic states between quantum computers. I will call this mutual credit system the uninspired name “Holo-Magic” today, but hope to come up with a better moniker later.

As was mentioned in Quantum + Decentralized, copying quantum states (and in particular, magic states) is not something that can be done due to the no-cloning theorem (though see related ideas like superbroadcasting). The best we can really do is “cut and paste”, which is the mundane way to describe the quantum teleportation protocol. The important thing to know is that anytime you want a particular quantum state, you either have to build it yourself or acquire it from someone else who will at that point no longer have it after the exchange since it cannot be copied.

Launch of the world’s very first quantum communications satellite from Jiuquan Satellite Launch Center in the Gobi desert of Mongolia in 2017. Someday you may be able to download magic from space. Some say you already can.

Imagine an example scenario in the not-so-distant future. You are a scientist developing new drugs to fight the next wave of horrible diseases to plague humanity. You have several candidate molecules and you need to know how they interact with a particular protein at the quantum level. In today’s world, this needs to be done with experiments, and simulations of such a scenario are entirely out of reach on supercomputers of any scale. In the future, you could purchase quantum computer time quantified in magic (possibly along with a few other quantum resources) to run high quality simulations of your molecule interacting with the protein and study its effects. When applying for a grant, you will actually be able to quantify how much magic your simulations will cost and have a reasonable idea of how that translates to dollars, as magic states on a quantum internet ought to eventually satisfy the rules for a value-stable mutual credit system if dreams are met (see after the divide below).

In addition to needing magic to run the simulation forward in time, it may also be required to purchase the complicated initial quantum states of the protein and drug from some grand distributed library of quantum states, or “quantum github”. If you generate the initial quantum state as part of the program, you may run into the issue of decoherence/error-accumulation, which limits the size of quantum programs that can be run since the longer a circuit is the more errors it will accumulate over time. Because of this, you may wish to generate the initial quantum state on another more capable quantum computer or a specialized “quantum simulator” (see below) with better error-correction capabilities or particular hardware suited for building those particular quantum states and then teleport those states to the quantum computer you wish to run your simulation on. This gain in efficiency will allow you to run the simulation longer before decoherence takes over.

Quantum chemistry simulations are one of the most exciting use cases for quantum computers in the near future and may someday make chemistry research enormously faster.

Quantum simulators are not full-fledged universal quantum computers, but more specialized devices somewhat analogous to e.g. GPUs in digital computers built to solve only a particular set of problems efficiently that would have to be done in a more computationally expensive way on a universal quantum computer. For instance, see this group at Harvard working on developing quantum simulators for quantum chemistry, which is precisely our context. Quantum simulators in general will not be well-suited to handle magic states built for universal quantum computers (as they typically do not employ qubits in the ordinary sense) and thus you cannot pay the operator back directly with magic states, but to participate in the quantum computing resource economy it will still make sense to pay the operator in Holo-Magic as every quantum computer operator will have reason to use universal quantum computers alongside their specialized quantum simulators, and it is the only sensible analogous exchange I can imagine in this scenario besides ordinary money (which is still valid, but will never be totally automated and is much slower). On a side note, there is a name collision here, since “quantum simulator” also frequently refers to quantum computer simulators run on digital computers.

Like Holo, it is important to note that Holo-Magic ought to only be created when magic states are actually produced and delivered. This keeps the total supply of Holo-Magic pegged to the actual amount of magic state production capacity available on the quantum internet, rather than an arbitrary quantity that doesn’t naturally respond to a change in available capacity. I think that because of this necessity for value-stability, quantum simulators shouldn’t necessarily generate Holo-Magic in exchange for building specialized quantum states since they cannot actually produce magic states — but perhaps they should, since they contribute to the need for magic states anyways. Probably there is a better system of interacting mutual credit systems here, but that is a topic better suited for a currency designer, and I am only an amateur.

Concluding this section, I must admit an oversimplification: there are a lot of different magic states and they require different amounts of quantum computing resources to generate. It may be more sensible to have several types of Holo-Magic associated to different magic states, or perhaps associate it to a more basic quantum computing routine necessary in the production of magic states. All of the ideas presented here ought to apply in this more general context, though.

Holo-Magic is value stable

Let’s review Brock’s 3 things required for a value-stable mutual credit system in the context of Holo-Magic.

The supply is dynamic — magic states can be created on demand by a quantum computer running a particular program, and they are consumed when programs are run that require them. This mirrors the Holo model. The total positive balance ought to strongly correlate with the amount of magic state production capacity of the network.

The supply is sufficient — well, this requires there to be a lot of quantum computers and a quantum internet. That’s the future context we’re imagining at all times on this blog and something we take for granted, because otherwise there would be nothing to write about. I imagine that someday most technical universities and large tech companies will either own their own quantum computer(s) or have a demand for them. There may be a “quantum Amazon Web Services” (hopefully a distributed version like Holo rather than one controlled by a few powerful entities) someday. Part of this requirement is the ability for the underlying to be redeemed quickly or on demand, which we have discussed. So supply ought to be sufficient.

There is strong internal value — hopefully I’ve already been convincing about this part. We probably wouldn’t be building quantum computers at all if there was no magic!

Conclusion

We’ve only scratched the surface on the possibilities of quantum computing and biomimicry-based distributed computing models. Having a sensible system for trading quantum resources will help bootstrap investment into quantum computing once it is understood that they can be utilized to create income when not otherwise in use via production and trade of quantum resources. This post just represents one piece of that puzzle.

There are numerous technical aspects to Holo-Magic I have not yet thought much about yet or discussed here. For instance, one potential issue is that if you cannot observe at a quantum state without destroying the information contained in it — observing the state collapses the superposition it was in. So, you cannot actually know that someone traded you the magic states you paid for directly. They might send you some quantum states — they might not be of the promised fidelity, the right type, or even magic states at all. You will quickly discover that this is the case when your algorithm doesn’t work. While it is hard to imagine malicious operators in the near future as only institutions will be purchasing quantum computers, this could also happen due to failing equipment. Since Holochain-based mutual credit systems do not have an immutable global ledger, it is easy to reverse a transaction using whatever rules are agreed upon, and so such failure is reversible due to its agent-centric nature, giving another advantage to exchanging resources using Holochain’s double entry accounting method rather than on a blockchain where nothing can ever be undone.

As the story of Fisher’s quantum brain develops over the next several years, it will interesting to keep an eye out for whether the brain does any sort quantum resource management itself, if it is indeed found to have a distributed quantum computing aspect to it. We may already be large-scale distributed quantum computers ourselves, and finally we are making the outside world resemble what is found inside. As John Wheeler (a Nobel-level theoretical physicist known for many discoveries as well as out-there ideas) wrote in World as system self-synthesized by quantum networking, perhaps the entire universe should be understood from an even broader perspective than this.

“ The quantum, strangest feature of this strange universe, cracks the armor that conceals the secret of existence. In contrast to the view that the universe is a machine governed by some magic equation, we explore here the view that the world is a self-synthesizing system of existences, built on observer-participancy via a network of elementary quantum phenomena.” -John Wheeler

--

--