Quantum Computing in Factorio
This mod adds quantum computing — with all of its non-local behavior — to factorio. In the gallery, you can see implementations of common quantum information theory protocols.
How to use
- Qubits
- Qubits have two states, 0 and 1, but are isolated enough to be under the effects of quantum mechanics. This means they may be in a superposition of the states 0 and 1, or they may be entangled with other qubits.
- Quantum Gates
- Quantum gates are implemented as special assembling machines. Select the recipe corresponding to the desired gate, and insert the qubit to apply the gate. Most gates can be controlled by linking with a red or green wire to a control gate.
- The phase gate defaults to angle pi/2. The angle can be specified in degrees using circuit signal P, or can be specified as 2pi/k using circuit signal K.
- The measurement gate measures the qubit. If it measures 1, it enables the circuit condition to read the output of the gate to the circuit network. Otherwise, the gate disables reading its contents to the circuit network. Thus, the result of the measurement is passed to the circuit network by connecting the circuit network to the measurement gate.
- Quantum Channels
- The buildings called quantum channels implement bell-diagonal quantum channels with 55% fidelity. Two buildings operating on the same channel link.
- Use circuit signal C to select the channel. The channel defaults to channel 0.
- To use the quantum channel, insert qubits in both linked buildings. Each qubit is passed through the quantum channel to the other building.
Quantum Archaeology
If space-age and quality are installed, this mod adds the quantum accelerator, which uses quantum archaeology to accelerate research output.
On Fulgora, the quantum accelerator is used extract ancient Fulgorian quantum states. Insert a qubit, and it will output a qubit containing the quantum state. Transfer this state to Nauvis to increase the quality of your science packs! Unfortunately, qubits are too fragile to be launched on a rocket, and measuring the state destroys the superposition. I will leave it to you to figure out how to figure out how to transfer the state of the qubit.
On Nauvis, the quantum accelerator accepts a qubit and upgrades science packs if the qubit is in the same state produced by the quantum archaeology on Fulgora. But be careful; if the states do not match, the science will be deleted!
If you would like to perform multiple instances of quantum archaeology in parallel, link distinct pairs of quantum accelerators on Nauvis and Fulgora using circuit signal N.
NOTE
Do not trash qubits using recyclers or any method other than the trash quantum gate recipe. The mod has no way of knowing when a qubit is trashed in such a way, so if you do so, the mod will leak memory.
TODO
The mod currently reuses graphics from the base game and space-age. I would like to add graphics to this mod.
To distribute updates of the buildings between different ticks, each quantum gate takes a random amount of time between 0 and 1 seconds to update. This makes certain aspects such as measurement inconvenient, but I would like to fix this. Please let me know if you have any ideas about how I should fix it.
Eventually I would like to create custom gui's for the buildings instead of relying on circuit signals to select channels.