Quantum Computing

by unitary

Adds quantum computing to the game

Content
a month ago
2.1
19
Logistics Circuit network Manufacturing
Owner:
unitary
Source:
https://github.com/involutive-unitary...
Homepage:
N/A
License:
MIT
Created:
a month ago
Latest Version:
1.0.4 (a month ago)
Factorio version:
2.1
Downloaded by:
19 users

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 named quantum channels implement bell-diagonal quantum channels with 67% fidelity. Two buildings operate 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 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. Since none of the machines consume qubits, so there is also no reason to trash them.

Updates

1.0.0 Initial release
1.0.1 Count products finished in quantum gates. Remove bias in selection of qubit for quantum archaeology. Compare qubits in quantum acceleration only up to global phase since global phase is physically irrelevant. Fix quantum phase gate to default to rotation by 90 degrees.
1.0.2 Fix error when quantum channel attempts to count its products finished.
1.0.3 Require control gate to be connected directly to other gates to control them instead of simply in the same network. This prevents non-local entanglement.
1.0.4 Balance change: change the fidelity from 55% to 67%.

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.