Quantum Chemistry Part 3

What is needed now is a way to remove the parasitic resonances. Based on the observation that, generally, the more complex a conjugated molecule is, the more resonance modes it possesses, it should therefore be possible to simplify the molecule. That is to say, reduce the complexity of the bonds in order to keep only the intended resonance modes.
Introduction
Chemistry
Author

NicDeclic

Published

October 16, 2026

“Harmony is not uniformity… it is cacophony learning to dance.”
— Professor Alvin


Click to see library imports
import sys
if 'google.colab' in sys.modules:
    # 1. Download qmc.py from GitHub
    !wget -q https://raw.githubusercontent.com/nicdeclic/quantum-molecular-computing/main/qmc.py
    
    # 2. Download requirements.txt from GitHub
    !wget -q https://raw.githubusercontent.com/nicdeclic/quantum-molecular-computing/main/requirements.txt

    # 3. Install dependencies
    !pip install -q -r requirements.txt

sys.path.insert(0, "../../src") # Select root directory
from qmc import * # QMC library

%reload_ext autoreload
%autoreload 2

Solving Molecular Epilepsy

What is needed now is a way to remove the parasitic resonances.

Based on the observation that, generally, the more complex a conjugated molecule is, the more resonance modes it possesses, it should therefore be possible to simplify the molecule. That is to say, reduce the complexity of the bonds in order to keep only the intended resonance modes.


Simplifying the Molecule

If we take the “Letter Envelope” structure and connect the two outputs of the NOR gates together, we obtain the 4 intended resonances plus the 2 expected parasitic resonances.

Code
# Create a conjugated carbon molecule
mol = CarbonMolecule("Letter Envelope, NOR gates together")

# Add atoms
c2_1 = mol.add_atom(x=-0.8, y=0.5)
c2_2 = mol.add_atom(x=0.8, y=0.5)
c2_3 = mol.add_atom(x=-0.3, y=0)
c2_4 = mol.add_atom(x=0.3, y=0)
c2_5 = mol.add_atom(x=-0.8, y=-0.5)
c2_6 = mol.add_atom(x=0.8, y=-0.5)

# Add bonds
b2_1 = mol.add_bond(c2_1, c2_2, order="single")
b2_2 = mol.add_bond(c2_1, c2_6, order="single", ctrl1=[-2.0, 0.5], ctrl2=[-0.75, -2.5])
b2_3 = mol.add_bond(c2_2, c2_5, order="single", ctrl1=[2.0, 0.5], ctrl2=[0.75, -2.5])
b2_4 = mol.add_bond(c2_1, c2_3, order="single")
b2_5 = mol.add_bond(c2_2, c2_4, order="single")
b2_6 = mol.add_bond(c2_3, c2_4, order="single")
b2_7 = mol.add_bond(c2_3, c2_5, order="single")
b2_8 = mol.add_bond(c2_4, c2_6, order="single")
b2_9 = mol.add_bond(c2_5, c2_6, order="single")

all_resonances = mol.resonance()

for i, res_mol in enumerate(all_resonances):
    res_mol.draw(margin=0.8) 

However, if we remove one of the connections, the molecule settles into a new, stable state without any parasites.

Code
mol.remove_bond(b2_2)

all_resonances = mol.resonance()

for i, res_mol in enumerate(all_resonances):
    res_mol.draw(margin=0.8) 

This results in a new structure called the “Barred Eight”. It acts as the functional equivalent of an AND logic gate.

Code
#| code-fold: true
#| fig-align: center
#| layout-ncol: 2

# Create a conjugated carbon molecule
mol = CarbonMolecule("Barred Eight")

# Add atoms
c2_1 = mol.add_atom(x=-0.7, y=1.0)
c2_2 = mol.add_atom(x=0.7, y=1.0)
c2_3 = mol.add_atom(x=-0.7, y=0)
c2_4 = mol.add_atom(x=0.7, y=0)
c2_5 = mol.add_atom(x=-0.7, y=-1.0)
c2_6 = mol.add_atom(x=0.7, y=-1.0)

# Add bonds
b2_1 = mol.add_bond(c2_1, c2_2, order="single")
b2_3 = mol.add_bond(c2_2, c2_5, order="single", label="C", label_pos=[0.25, 0.4])
b2_4 = mol.add_bond(c2_1, c2_3, order="single", label="A")
b2_5 = mol.add_bond(c2_2, c2_4, order="single")
b2_6 = mol.add_bond(c2_3, c2_4, order="single")
b2_7 = mol.add_bond(c2_3, c2_5, order="single")
b2_8 = mol.add_bond(c2_4, c2_6, order="single", label="B")
b2_9 = mol.add_bond(c2_5, c2_6, order="single")

all_resonances = mol.resonance()

for i, res_mol in enumerate(all_resonances):
    res_mol.draw() 

Code
CarbonMolecule.resonance_table(all_resonances)

\[\begin{array}{|c|c|c|} \hline \mathbf{A} & \mathbf{B} & \mathbf{C} \\ \hline 1 & 0 & 0 \\ 1 & 1 & 1 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \\ \hline \end{array}\]

Yet, more complex molecules require far more advanced transformations. It is not always as simple as removing a few bonds.
Unfortunately, at present, no general algorithm exists to automate this process. It remains an active area of research.


Quantum Couplers

Another approach is to filter the connections directly, since that is where the parasitic resonances originate.

Ideally, we would insert an intermediate filter molecule along the interconnect to ensure that both branches always maintain the exact same logical state.

However, such a purely chemical filter cannot work: because it must itself be open at both ends to connect into the circuit, it will inevitably develop the exact same parasitic resonances. We would simply be reproducing the initial problem.

To break this loop, we must rely on a different physical mechanism: quantum and electrostatic induction.

When two conjugated bonds are brought physically close to one another without touching, their \(\pi\)-electron clouds interact across space. Just like electrical induction in classical physics, the alternating oscillation of electrons in one bond exerts an electrostatic and quantum exchange force on the neighbor:
* If one bond shifts into a double bond (\(\pi\)-density), its local electric field repels or aligns the electron density of the adjacent bond.
* The two lines synchronize their states through the vacuum without sharing a single physical atom.

This wireless, contact-free bridge is what we call a Quantum Coupler or Coupler in short.

The coupling strength follows a strict physical scaling:
1. Shorter distance = stronger coupling: As the spatial gap narrows, the interaction strength increases drastically.
2. More bond pairs = higher efficiency: Chaining multiple coupled pairs in parallel reinforces the coherence.

By keeping the distance short enough and using enough parallel bond pairs, the synchronization efficiency can approach virtually 100%.


Typology of Couplers

Several physical geometries can be engineered:

  • Series Coupler: The direct approach. The two branches of the dual-rail interconnect are simply brought into close physical proximity.
Code
# Create a conjugated carbon molecule
mol = CarbonMolecule("Parallel Coupler")

# Add atoms
c1 = mol.add_atom(x=-2.0, y=0.25, visible=False)
c2 = mol.add_atom(x=-1.5, y=0.0)
c3 = mol.add_atom(x=-1.0, y=0.25)
c4 = mol.add_atom(x=-0.5, y=0.0)
c5 = mol.add_atom(x=0.0, y=0.25)
c6 = mol.add_atom(x=0.5, y=0.0)
c7 = mol.add_atom(x=1.0, y=0.25)
c8 = mol.add_atom(x=1.5, y=0.0)
c9 = mol.add_atom(x=2.0, y=0.25, visible=False)

c10 = mol.add_atom(x=-2.0, y=-0.25, visible=False)
c11 = mol.add_atom(x=-1.5, y=-0.5)
c12 = mol.add_atom(x=-1.0, y=-0.25)
c13 = mol.add_atom(x=-0.5, y=-0.5)
c14 = mol.add_atom(x=0.0, y=-0.25)
c15 = mol.add_atom(x=0.5, y=-0.5)
c16 = mol.add_atom(x=1.0, y=-0.25)
c17 = mol.add_atom(x=1.5, y=-0.5)
c18 = mol.add_atom(x=2.0, y=-0.25, visible=False)

# Add bonds
b1 = mol.add_bond(c1, c2, order="single")
b2 = mol.add_bond(c2, c3, order="single")
b3 = mol.add_bond(c3, c4, order="single")
b4 = mol.add_bond(c4, c5, order="single")
b5 = mol.add_bond(c5, c6, order="single")
b6 = mol.add_bond(c6, c7, order="single")
b7 = mol.add_bond(c7, c8, order="single")
b8 = mol.add_bond(c8, c9, order="single")

b9 = mol.add_bond(c10, c11, order="single")
b10 = mol.add_bond(c11, c12, order="single")
b11 = mol.add_bond(c12, c13, order="single")
b12 = mol.add_bond(c13, c14, order="single")
b13 = mol.add_bond(c14, c15, order="single")
b14 = mol.add_bond(c15, c16, order="single")
b15 = mol.add_bond(c16, c17, order="single")
b16 = mol.add_bond(c17, c18, order="single")

coupler1 = mol.add_coupler(b4, b12)
coupler2 = mol.add_coupler(b5, b13)

mol.draw() 

The blue dashed line is here to show that there is a coupling between bonds.

  • Parallel Coupler: The molecular equivalent of the schematic of an electrical transformer. Two closed conjugated loops are placed side-by-side, transferring logic states purely through mutual resonance induction.
Code
# Create a conjugated carbon molecule
mol = CarbonMolecule("Series Coupler")

# Add atoms
c1 = mol.add_atom(x=-2.0, y=0.5)
c2 = mol.add_atom(x=-1.0, y=0.5)
c3 = mol.add_atom(x=-1.0, y=-0.5)
c4 = mol.add_atom(x=-2.0, y=-0.5)

c5 = mol.add_atom(x=-0.5, y=0.5)
c6 = mol.add_atom(x=0.5, y=0.5)
c7 = mol.add_atom(x=0.5, y=-0.5)
c8 = mol.add_atom(x=-0.5, y=-0.5)

# Add bonds
b1 = mol.add_bond(c1, c2, order="single")
b2 = mol.add_bond(c2, c3, order="single")
b3 = mol.add_bond(c3, c4, order="single")
b4 = mol.add_bond(c4, c1, order="single")

b5 = mol.add_bond(c5, c6, order="single")
b6 = mol.add_bond(c6, c7, order="single")
b7 = mol.add_bond(c7, c8, order="single")
b8 = mol.add_bond(c5, c8, order="single")

coupler = mol.add_coupler(b8, b2)

mol.draw() 

  • \(\pi\)-Stacking Coupler (Face-to-Face): Instead of lying in the same 2D plane, conjugated rings are stacked directly on top of each other (via aromatic \(\pi\)-\(\pi\) stacking). This vertical configuration is exceptionally powerful for routing signals out of the plane and designing three-dimensional (3D) molecular circuits.
Code
# Create a conjugated carbon molecule
mol = CarbonMolecule("Pi-Stacking Coupler")

# Add atoms
c1 = mol.add_atom(x=-0.25, y=1.0)
c2 = mol.add_atom(x=0.25, y=1.0)
c3 = mol.add_atom(x=-1.0, y=0.75, visible=False)
c4 = mol.add_atom(x=-0.6, y=0.75)
c5 = mol.add_atom(x=0.6, y=0.75)
c6 = mol.add_atom(x=1.0, y=0.75, visible=False)
c7 = mol.add_atom(x=-0.25, y=0.5)
c8 = mol.add_atom(x=0.25, y=0.5)

c9 = mol.add_atom(x=-0.25, y=0.0)
c10 = mol.add_atom(x=0.25, y=0.0)
c11 = mol.add_atom(x=-1.0, y=-0.25, visible=False)
c12 = mol.add_atom(x=-0.6, y=-0.25)
c13 = mol.add_atom(x=0.6, y=-0.25)
c14 = mol.add_atom(x=1.0, y=-0.25, visible=False)
c15 = mol.add_atom(x=-0.25, y=-0.5)
c16 = mol.add_atom(x=0.25, y=-0.5)

# Add bonds
b1 = mol.add_bond(c1, c2, order="single")
b2 = mol.add_bond(c3, c4, order="single")
b3 = mol.add_bond(c4, c1, order="single")
b4 = mol.add_bond(c2, c5, order="single")
b5 = mol.add_bond(c5, c6, order="single")
b6 = mol.add_bond(c4, c7, order="single")
b7 = mol.add_bond(c7, c8, order="single")
b8 = mol.add_bond(c8, c5, order="single")

b9 = mol.add_bond(c9, c10, order="single")
b10 = mol.add_bond(c11, c12, order="single")
b11 = mol.add_bond(c12, c9, order="single")
b12 = mol.add_bond(c10, c13, order="single")
b13 = mol.add_bond(c13, c14, order="single")
b14 = mol.add_bond(c12, c15, order="single")
b15 = mol.add_bond(c15, c16, order="single")
b16 = mol.add_bond(c16, c13, order="single")

coupler1 = mol.add_coupler(b1, b9, ctrl1=[-0.1, 0.85], ctrl2=[-0.1, -0.25])
coupler2 = mol.add_coupler(b7, b15, ctrl1=[0.1, 0.75], ctrl2=[0.1, -0.35])

mol.draw()

Beyond filtering parasites, couplers solve another major engineering hurdle: clean fan-out. They allow a single logic gate to cleanly broadcast its output to multiple gates without any physical wiring tangles or parasitic feedback.

Code
# Create a conjugated carbon molecule
mol = CarbonMolecule("Fan-out")

# Add atoms
c1 = mol.add_atom(x=-0.5, y=1.0)
c2 = mol.add_atom(x=0.5, y=1.0)
c3 = mol.add_atom(x=-1.0, y=0.0)
c4 = mol.add_atom(x=1.0, y=0.0)
c5 = mol.add_atom(x=-0.5, y=-1.0)
c6 = mol.add_atom(x=0.5, y=-1.0)

c7 = mol.add_atom(x=-0.5, y=1.4)
c8 = mol.add_atom(x=0.5, y=1.4)
c9 = mol.add_atom(x=-0.5, y=2.5, visible=False)
c10 = mol.add_atom(x=0.5, y=2.5, visible=False)

c11 = mol.add_atom(x=-1.3, y=-0.2)
c12 = mol.add_atom(x=-0.8, y=-1.2)
c13 = mol.add_atom(x=-2.2, y=-1.0, visible=False)
c14 = mol.add_atom(x=-1.7, y=-2.0, visible=False)

c15 = mol.add_atom(x=1.3, y=-0.2)
c16 = mol.add_atom(x=0.8, y=-1.2)
c17 = mol.add_atom(x=2.2, y=-1.0, visible=False)
c18 = mol.add_atom(x=1.7, y=-2.0, visible=False)

# Add bonds
b1 = mol.add_bond(c1, c2, order="single")
b2 = mol.add_bond(c1, c3, order="single")
b3 = mol.add_bond(c2, c4, order="single")
b4 = mol.add_bond(c4, c6, order="single")
b5 = mol.add_bond(c3, c5, order="single")
b6 = mol.add_bond(c5, c6, order="single")

b7 = mol.add_bond(c7, c8, order="single")
b8 = mol.add_bond(c7, c9, order="single")
b9 = mol.add_bond(c8, c10, order="single")

b10 = mol.add_bond(c11, c12, order="single")
b11 = mol.add_bond(c11, c13, order="single")
b12 = mol.add_bond(c12, c14, order="single")

b13 = mol.add_bond(c15, c16, order="single")
b14 = mol.add_bond(c15, c17, order="single")
b15 = mol.add_bond(c16, c18, order="single")

coupler1 = mol.add_coupler(b1, b7)
coupler2 = mol.add_coupler(b5, b10)
coupler3 = mol.add_coupler(b4, b13)

mol.draw() 


Molecular Matrix Form

Up to this point, the method for decoding a molecule’s computational behavior has relied on systematically enumerating all of its individual resonance structures one by one.

However, there is a much more direct, powerful, and scalable approach: computing the global transition matrix algebraically.

The key strategy is to treat the entire molecule as a directed mathematical graph and decompose it into elementary topological motifs.

Just as classical electronics relies on wires, transistors, and resistors, the molecular graph calculus is built from a compact alphabet of primitive transition operators :

(note: in the following primitives schematics, inputs are on the left and outputs are on the right)

Code
mol1 = CarbonMolecule("Identity")
c1_1 = mol1.add_atom(x=-0.5, y=0.0, visible=False)
c1_2 = mol1.add_atom(x=0.5, y=0.0, visible=False)
b1_1 = mol1.add_bond(c1_1, c1_2, order="single")
mol1.draw() 

display_inline("Identity", "=", identity.to_katex(show_labels=True))


mol2 = CarbonMolecule("Negate")
c2_1 = mol2.add_atom(x=-0.5, y=0.0, visible=False)
c2_2 = mol2.add_atom(x=0.0, y=0.5)
c2_3 = mol2.add_atom(x=0.5, y=0.0, visible=False)
b2_1 = mol2.add_bond(c2_1, c2_2, order="single")
b2_2 = mol2.add_bond(c2_2, c2_3, order="single")
mol2.draw() 

display_inline("Negate", "=", negate.to_katex(show_labels=True))


mol3 = CarbonMolecule("Swap")
c3_1 = mol3.add_atom(x=-0.5, y=0.25, visible=False)
c3_2 = mol3.add_atom(x=0.5, y=-0.25, visible=False)
c3_3 = mol3.add_atom(x=-0.5, y=-0.25, visible=False)
c3_4 = mol3.add_atom(x=0.5, y=0.25, visible=False)
b3_1 = mol3.add_bond(c3_1, c3_2, order="single")
b3_2 = mol3.add_bond(c3_3, c3_4, order="single")
mol3.draw() 

display_inline("Swap", "=", swap.to_katex(show_labels=True))


mol4 = CarbonMolecule("Fork")
c4_1 = mol4.add_atom(x=-0.5, y=0.0, visible=False)
c4_2 = mol4.add_atom(x=0.0, y=0.0)
c4_3 = mol4.add_atom(x=0.5, y=0.5, visible=False)
c4_4 = mol4.add_atom(x=0.5, y=-0.5, visible=False)
b4_1 = mol4.add_bond(c4_1, c4_2, order="single")
b4_2 = mol4.add_bond(c4_2, c4_3, order="single")
b4_3 = mol4.add_bond(c4_2, c4_4, order="single")
mol4.draw() 

display_inline("Fork", "=", fork.to_katex(show_labels=True))


mol5 = CarbonMolecule("Merge")
c5_1 = mol5.add_atom(x=-0.5, y=0.5, visible=False)
c5_2 = mol5.add_atom(x=-0.5, y=-0.5, visible=False)
c5_3 = mol5.add_atom(x=0.0, y=0.0)
c5_4 = mol5.add_atom(x=0.5, y=0.0, visible=False)
b5_1 = mol5.add_bond(c5_1, c5_3, order="single")
b5_2 = mol5.add_bond(c5_2, c5_3, order="single")
b5_3 = mol5.add_bond(c5_3, c5_4, order="single")
mol5.draw() 

display_inline("Merge", "=", merge.to_katex(show_labels=True))


mol6 = CarbonMolecule("Open")
c6_1 = mol6.add_atom(x=0.0, y=0.35, visible=False)
c6_2 = mol6.add_atom(x=0.0, y=-0.35, visible=False)
b6_1 = mol6.add_bond(c6_1, c6_2, order="single", ctrl1=[-0.5, 0.5], ctrl2=[-0.5, -0.5])
mol6.draw(margin=0.5)

display_inline("Open", "=", open.to_katex(show_labels=True))


mol7 = CarbonMolecule("Close")
c7_1 = mol7.add_atom(x=0.0, y=0.35, visible=False)
c7_2 = mol7.add_atom(x=0.0, y=-0.35, visible=False)
b7_1 = mol7.add_bond(c7_1, c7_2, order="single", ctrl1=[0.5, 0.5], ctrl2=[0.5, -0.5])
mol7.draw(margin=0.5)

display_inline("Close", "=", close.to_katex(show_labels=True))


mol8 = CarbonMolecule("Split")
c8_1 = mol8.add_atom(x=0.0, y=0.35, visible=False)
c8_2 = mol8.add_atom(x=0.0, y=-0.35, visible=False)
c8_3 = mol8.add_atom(x=-0.6, y=0.0, visible=False)
c8_4 = mol8.add_atom(x=-0.4, y=0.0, visible=False)
b8_1 = mol8.add_bond(c8_1, c8_2, order="single", ctrl1=[-0.5, 0.5], ctrl2=[-0.5, -0.5])
b8_2 = mol8.add_bond(c8_3, c8_4, order="single")
mol8.draw(margin=0.5)

display_inline("Split", "=", split.to_katex(show_labels=True))


mol9 = CarbonMolecule("Join")
c9_1 = mol9.add_atom(x=0.0, y=0.35, visible=False)
c9_2 = mol9.add_atom(x=0.0, y=-0.35, visible=False)
c9_3 = mol9.add_atom(x=0.6, y=0.0, visible=False)
c9_4 = mol9.add_atom(x=0.4, y=0.0, visible=False)
b9_1 = mol9.add_bond(c9_1, c9_2, order="single", ctrl1=[0.5, 0.5], ctrl2=[0.5, -0.5])
b9_2 = mol9.add_bond(c9_3, c9_4, order="single")
mol9.draw(margin=0.5)

display_inline("Join", "=", join.to_katex(show_labels=True))

\[ Identity = \begin{array}{r|cc|} \text{} & \text{``0''} & \text{``1''} \\ \hline \text{``0''} & 1 & 0 \\ \text{``1''} & 0 & 1 \\ \hline \end{array} \]

\[ Negate = \begin{array}{r|cc|} \text{} & \text{``0''} & \text{``1''} \\ \hline \text{``0''} & 0 & 1 \\ \text{``1''} & 1 & 0 \\ \hline \end{array} \]

\[ Swap = \begin{array}{r|cccc|} \text{} & \text{``00''} & \text{``01''} & \text{``10''} & \text{``11''} \\ \hline \text{``00''} & 1 & 0 & 0 & 0 \\ \text{``01''} & 0 & 0 & 1 & 0 \\ \text{``10''} & 0 & 1 & 0 & 0 \\ \text{``11''} & 0 & 0 & 0 & 1 \\ \hline \end{array} \]

\[ Fork = \begin{array}{r|cccc|} \text{} & \text{``00''} & \text{``01''} & \text{``10''} & \text{``11''} \\ \hline \text{``0''} & 0 & 0.5 & 0.5 & 0 \\ \text{``1''} & 1 & 0 & 0 & 0 \\ \hline \end{array} \]

\[ Merge = \begin{array}{r|cc|} \text{} & \text{``0''} & \text{``1''} \\ \hline \text{``00''} & 0 & 1 \\ \text{``01''} & 1 & 0 \\ \text{``10''} & 1 & 0 \\ \text{``11''} & 0 & 0 \\ \hline \end{array} \]

\[ Open = \begin{array}{r|cccc|} \text{} & \text{``00''} & \text{``01''} & \text{``10''} & \text{``11''} \\ \hline ~ & 0.5 & 0 & 0 & 0.5 \\ \hline \end{array} \]

\[ Close = \begin{array}{r|c|} \text{} & ~ \\ \hline \text{``00''} & 1 \\ \text{``01''} & 0 \\ \text{``10''} & 0 \\ \text{``11''} & 1 \\ \hline \end{array} \]

\[ Split = \begin{array}{r|cccc|} \text{} & \text{``00''} & \text{``01''} & \text{``10''} & \text{``11''} \\ \hline \text{``0''} & 1 & 0 & 0 & 0 \\ \text{``1''} & 0 & 0 & 0 & 1 \\ \hline \end{array} \]

\[ Join = \begin{array}{r|cc|} \text{} & \text{``0''} & \text{``1''} \\ \hline \text{``00''} & 1 & 0 \\ \text{``01''} & 0 & 0 \\ \text{``10''} & 0 & 0 \\ \text{``11''} & 0 & 1 \\ \hline \end{array} \]

Notice the geometric symmetries embedded within these primitives:

  • Self-Dual Motifs: Identity, Negate, and Swap are their own topological duals. Reversing their operational direction leaves their matrix representations strictly invariant.
  • Dual Pairs: Fork and Merge form a complementary pair: they represent the exact same trivalent junction, simply with inputs and outputs exchanged. The same directional duality connects Open/Close and Split/Join.

Mathematically, this backward operation is achieved by transposing the matrix, followed by a row-normalization step to enforce that all accessible states sum strictly to 1, or 0 for forbidden transitions.

Using standard mathematical notation, transposition is denoted by the superscript \(\mathbf{T}\), while row-normalization is enclosed within curly braces \(\mathbf{\{ \dots \}}\):

For example: \[\text{Fork} = \{\text{Merge}^\mathbf{T}\}\]

\[\text{Merge} = \{\text{Fork}^\mathbf{T}\}\]

Whenever an operation is perfectly bijective (such as a permutation or a unitary gate), the transposed-normalized operator corresponds strictly to the true mathematical inverse:

\[\text{Fork} = \text{Merge}^{-1}, \quad \text{Merge} = \text{Fork}^{-1}\]

  • Couplers can likewise be expressed in matrix form:
Code
display_inline("Coupler", "=", coupler_q.to_katex(show_labels=True))

\[ Coupler = \begin{array}{r|cccc|} \text{} & \text{``00''} & \text{``01''} & \text{``10''} & \text{``11''} \\ \hline \text{``00''} & 1 & 0 & 0 & 0 \\ \text{``01''} & 0 & 0 & 0 & 0 \\ \text{``10''} & 0 & 0 & 0 & 0 \\ \text{``11''} & 0 & 0 & 0 & 1 \\ \hline \end{array} \]

Rather than acting as spatial routing wires, a Coupler acts as a diagonal projector / filter matrix—algebraically annihilating incompatible product states across coupled lines.

Junction decomposition

Using standard linear algebra—the Kronecker tensor product (\(\otimes\)) for parallel components, and the matrix dot product (\(\cdot\)) for sequential cascade — we can analytically synthesize complex circuits.

For example, the triangular XNOR junction can be calculated directly by assembling primitive blocks:

Code
m = ((fork ^ fork) @ (identity ^ close ^ identity) @ (merge)).normalize()

display_inline("Xnor", "=", r"\Big\{", r"M_1", r"\cdot", r"M_2", r"\cdot", r"M_3", r"\Big\}")

display_inline(r"\Rightarrow", "Xnor", "=", r"\Big\{", "(", "Fork",  r"\otimes",  "Fork", ")", r"\cdot", "(", "Identity",  r"\otimes", "Close", r"\otimes", "Identity", ")", r"\cdot", "(", "Merge", ")", r"\Big\}")

display_inline(r"\Rightarrow", "Xnor", "=", m.normalize().to_katex(show_labels=True))

\[ Xnor = \Big\{ M_1 \cdot M_2 \cdot M_3 \Big\} \]

\[ \Rightarrow Xnor = \Big\{ ( Fork \otimes Fork ) \cdot ( Identity \otimes Close \otimes Identity ) \cdot ( Merge ) \Big\} \]

\[ \Rightarrow Xnor = \begin{array}{r|cc|} \text{} & \text{``0''} & \text{``1''} \\ \hline \text{``00''} & 0 & 1 \\ \text{``01''} & 1 & 0 \\ \text{``10''} & 1 & 0 \\ \text{``11''} & 0 & 1 \\ \hline \end{array} \]

Carrying out this matrix multiplication yields the exact \(4 \times 2\) stochastic truth table we previously derived by hand!

Closed-form decomposition

This algebraic calculus generalizes seamlessly to larger, closed-form systems.

There is a crucial topological distinction to be made, however: when evaluating boundary terminals, we must employ Split and Join primitives instead of Open/Close primitives. Because a closed molecule forms a self-contained graph, failing to explicitly distinguish external ports from closed internal loops would cause the matrix contraction to collapse trivially into a scalar \(1 \times 1\) matrix.

To illustrate this method, let us algebraically decompose the “Letter Envelope” molecule configured as a NOR gate, with bonds \(A\) and \(B\) designated as inputs and bond \(C\) as the output:

Code
# Create a conjugated carbon molecule
mol = CarbonMolecule("Letter Envelope")

# Add atoms
c1 = mol.add_atom(x=-0.8, y=0.5, label="1")
c2 = mol.add_atom(x=0.8, y=0.5, label="2")
c3 = mol.add_atom(x=-0.3, y=0, label="3")
c4 = mol.add_atom(x=0.3, y=0, label="4")
c5 = mol.add_atom(x=-0.8, y=-0.5, label="5")
c6 = mol.add_atom(x=0.8, y=-0.5, label="6")

# Add bonds
b1 = mol.add_bond(c1, c2, order="single", label="A")
b2 = mol.add_bond(c1, c5, order="single", label="F")
b3 = mol.add_bond(c2, c6, order="single", label="C")
b4 = mol.add_bond(c1, c3, order="single", label="D")
b5 = mol.add_bond(c2, c4, order="single", label="E")
b6 = mol.add_bond(c3, c4, order="single", label="G")
b7 = mol.add_bond(c3, c5, order="single", label="H")
b8 = mol.add_bond(c4, c6, order="single", label="I")
b9 = mol.add_bond(c5, c6, order="single", label="B")

mol.draw(scale=2) 

All carbon atoms have been explicitly numbered and bonds annotated with alphabetical labels. This dual indexing is essential for tracking pathways as we slice the molecule into consecutive spatial slices.

In the algebraic derivation below, we adopt the standard compact notation \(A^{\otimes n}\) to denote the repeated Kronecker tensor power of an operator \(A\) acting across \(n\) parallel channels:

\[A^{\otimes n} = \underbrace{A \otimes A \otimes \dots \otimes A}_{n \text{ times}}\]

For instance, \(\text{Split}^{\otimes 2} = \text{Split} \otimes \text{Split}\) represents two independent splitters operating simultaneously in parallel.

Code
m = ((split**2) @ (fork**4) @ (identity ^ fork**2 ^ close ^ identity**3) @ (identity**2 ^ close**2 ^ identity**2) @ (identity ^ close ^ identity) @ (join)).normalize()

display_inline("Nor", "=", r"\Big\{", r"M_1", r"\cdot", r"M_2", r"\cdot", r"M_3", r"\cdot", r"M_4", r"\cdot", r"M_5", r"\cdot", r"M_6", r"\Big\}")

display_inline(
    r"\begin{aligned}",
    r"\Rightarrow \text{Nor} &= \Big\{ (\text{Split}^{\otimes 2}) \cdot (\text{Fork}^{\otimes 4})",
    r"\cdot (\text{Identity} \otimes \text{Fork}^{\otimes 2} \otimes \text{Close} \otimes \text{Identity}^{\otimes 3}) \cdot \\",
    r"&\quad (\text{Identity}^{\otimes 2} \otimes \text{Close}^{\otimes 2} \otimes \text{Identity}^{\otimes 2})",
    r"\cdot (\text{Identity} \otimes \text{Close} \otimes \text{Identity}) \cdot (\text{Join}) \Big\}",
    r"\end{aligned}"
)

display_inline(r"\Rightarrow", "Nor", "=", m.normalize().to_katex(show_labels=True))

\[ Nor = \Big\{ M_1 \cdot M_2 \cdot M_3 \cdot M_4 \cdot M_5 \cdot M_6 \Big\} \]

\[ \begin{aligned} \Rightarrow \text{Nor} &= \Big\{ (\text{Split}^{\otimes 2}) \cdot (\text{Fork}^{\otimes 4}) \cdot (\text{Identity} \otimes \text{Fork}^{\otimes 2} \otimes \text{Close} \otimes \text{Identity}^{\otimes 3}) \cdot \\ &\quad (\text{Identity}^{\otimes 2} \otimes \text{Close}^{\otimes 2} \otimes \text{Identity}^{\otimes 2}) \cdot (\text{Identity} \otimes \text{Close} \otimes \text{Identity}) \cdot (\text{Join}) \Big\} \end{aligned} \]

\[ \Rightarrow Nor = \begin{array}{r|cc|} \text{} & \text{``0''} & \text{``1''} \\ \hline \text{``00''} & 0 & 1 \\ \text{``01''} & 1 & 0 \\ \text{``10''} & 1 & 0 \\ \text{``11''} & 1 & 0 \\ \hline \end{array} \]

And the calculus converges onto the exact, canonical NOR truth table!

It is deeply revealing to witness the sheer hidden complexity operating beneath the surface of a simple molecular NOR gate: an intricate symphony of forks, parallel branches, and coherent cancellations resolving seamlessly into clean, deterministic universal logic.

Tidying the Swap Mess

Up to this point, we have deliberately avoided using the elementary Swap primitive within our algebraic decompositions.

The reason is purely practical: routing wires exclusively through 2-channel swaps becomes hopelessly cumbersome the moment a circuit interconnects more than three lines. It feels like manually synthesizing an entire bitonic sorting network each time we merely want to cross a couple of signals.

In linear algebra, a cascade of adjacent 2-wire swaps is simply a low-level decomposition of a single, global permutation matrix.

Rather than chaining dozens of tedious swap blocks, it is vastly more efficient to construct the required permutation operator directly from the desired wire mappings.

To streamline our calculus, we introduce a high-level function: \(`{Permute}_{[mapping]}`\). Where [mapping] is a list of length n and mapping[i] is the destination index for bit i.

This operator directly compiles an arbitrary wire routing layout into an exact, sparse \(2^n \times 2^n\) transition matrix in a single step.

Using this primitive, any complex routing stage between circuit blocks collapses into a clean, single-layer matrix operator.

Here is how to create and apply a permutation of 3 lines where:
* Line 0 moves to Position 2
* Line 1 moves to Position 0
* Line 2 moves to Position 1

Code
# 1. Create the permutation matrix for n=3 lines
P = permute([2, 0, 1])

# 2. Display the resulting 8x8 matrix
display_inline(r"\text{Permute}_{[2, 0, 1]}", "=", P.to_katex(show_labels=True))

\[ \text{Permute}_{[2, 0, 1]} = \begin{array}{r|cccccccc|} \text{} & \text{``000''} & \text{``001''} & \text{``010''} & \text{``011''} & \text{``100''} & \text{``101''} & \text{``110''} & \text{``111''} \\ \hline \text{``000''} & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ \text{``001''} & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ \text{``010''} & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ \text{``011''} & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ \text{``100''} & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ \text{``101''} & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\ \text{``110''} & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ \text{``111''} & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\ \hline \end{array} \]

The wiring clutter vanishes, allowing us to focus on the essential physics of gate transformations and resonant topological closures.


A Critical Warning on Reversibility: The Normalization Memory Loss

One might be tempted to assume that applying transposition and row-normalization twice will always restore the original state: \(\{\{M^\mathbf{T}\}^\mathbf{T}\} \stackrel{?}{=} M\).

This is not always true. Caution is required whenever non-uniform probabilities are involved.

To understand why, consider an open-ended molecule producing an asymmetrical probability output distribution across four states:

\[A = \begin{bmatrix} 1/3 & 0 & 2/3 & 0 \end{bmatrix}\]

Now, let us apply our backward operation \(\{A^\mathbf{T}\}\):
1. Transposition: Turns the \(1 \times 4\) row vector into a \(4 \times 1\) column vector.
2. Row Normalization: Each row now contains only a single non-zero element. Because every non-zero row must sum strictly to 1, both \(1/3\) and \(2/3\) are independently scaled up to \(1.0\):

\[\{A^\mathbf{T}\} = \begin{bmatrix} 1 \\ 0 \\ 1 \\ 0 \end{bmatrix}\]

Notice what just happened: the relative statistical weights (\(1/3\) vs \(2/3\)) were erased. The operator preserved the support (which states are physically possible), but flattened the distribution.

If we now attempt to reverse the operation a second time to recover our starting state:
1. Transposing back yields the row vector \(\begin{bmatrix} 1 & 0 & 1 & 0 \end{bmatrix}\).
2. Normalizing the row yields:

\[\{\{A^\mathbf{T}\}^\mathbf{T}\} = \begin{bmatrix} 1/2 & 0 & 1/2 & 0 \end{bmatrix} \neq A\]

The original state is not recovered!

This reveals a fundamental mathematical rule for our protobit matrices:

  • Pure Permutations and Uniform States: If a transition matrix is bijective (a permutation matrix) or if all accessible paths share identical, uniform statistical weights, the backward operation is an exact, lossless inverse:
    \[\{M^\mathbf{T}\} = M^{-1}\]

  • Asymmetric Stochastic States: Whenever a circuit produces unequal branching ratios (such as \(1/3\) and \(2/3\)), the monolithic operation \(\{M^\mathbf{T}\}\) acts as an information-lossy projection—it computes the backward possibility, but forgets the input priors.

In such cases, one cannot simply invert the output distribution globally. To compute the true backward physical probabilities, one must decompose the molecule into its elementary primitive operators (Forks, Merges, Gates) and propagate the state backward stage-by-stage.


Finally Success?

Yes! This time, the foundation holds.

Every essential building block has now been identified: from fundamental carbon junctions and resonance states to dual-rail interconnects, universal NOR logic, and parasitic-filtering couplers. The baseline theory is established, mathematically coherent, and fully functional!

“But wait…” the skeptic might object. “This is still just theory on paper, isn’t it? Some concepts seem radically counterintuitive. Where is the tangible physical prototype?”

First comes the blueprint, then comes the machine.

Historically, every monumental breakthrough in computing began as quiet derivations on a notepad. Alan Turing did not begin with silicon microchips, and quantum computing existed purely on chalkboards decades before the first qubit was frozen in a lab.

There are still vital, pioneering concepts waiting to be developed — and that is precisely what the upcoming posts will unpack.


Speculations & Wild Thoughts

  • A Grounded Bridge to ZX-Calculus

In standard ZX-calculus, the formalism relies on abstract mathematical “spiders” that can possess an arbitrary, infinite number of legs.

Our molecular model, by contrast, establishes a physically bounded, hardware-level tensor network. The entire expressive power of universal quantum computation is strictly generated by only three elemental primitives with fixed tensor ranks, dictated by the fundamental chemistry of carbon:
1. The 2-index bivalent link: The inverting bond channel.
2. The 3-index trivalent node (\(sp^2\) carbon): The physical branching tensor.
3. The 4-index projective coupler: The non-local inductive filter that suppresses parasitic modes.

In conventional ZX-calculus, running a circuit in reverse or simplifying an inverted diagram requires an external compiler executing complex graph-rewriting heuristics on an auxiliary computer.

In our molecular architecture, function inversion is a native, emergent physical property.

Because our three structural primitives are inherently time-reversal symmetric, the carbon network possesses no built-in temporal arrow.

If you clamp boundary conditions onto the output terminals, the physical tensor network contracts backwards spontaneously. The global \(\pi\)-electron resonance relaxes into the correct input configuration without requiring a single step of algorithmic uncomputation, backtracking, or ancillary qubit overhead.

We are not merely simulating diagrammatic quantum logic on a screen: the carbon molecule is a self-solving, physical tensor network.

  • The Taelon Mosaic and Quantum Linguistics

In Season 1, Episode 13 of the classic sci-fi series Earth: Final Conflict (“The Secret of Strandhill”), an ancient Taelon artifact is unearthed: a decorative stone mosaic that is revealed to be a readable language.

At first glance, reading a continuous, 2D geometric mosaic like a text sounds like pure Hollywood techno-babble. Yet, it bears a striking resemblance to our molecular calculus: representing complex physical functions as an interconnected alphabet of topological matrix tiles (Identity, Fork, Merge, Coupler).

Human spoken and written languages are strictly one-dimensional and chronological: words follow one after another in a linear sequence (\(A \to B \to C\)). This classical syntax makes it nearly impossible for our languages to naturally articulate quantum properties like simultaneous superposition, non-local entanglement, and bidirectional causality without awkward mathematical jargon.

What if a language wasn’t a 1D string of letters, but a two-dimensional resonant graph?

In such a “quantum molecular language”:
* The geometric arrangement of tiles directly dictates which resonance states are allowed or forbidden.
* Reading the language is not a sequential decoding process, but filtering the molecule through its boundary connections.
* A single statement can hold multiple valid meanings simultaneously (superposition) until constrained by adjacent tiles.

How far could such physical linguistics be pushed in the real world? Could the molecular graph notation be the first prototype of a language capable of natively “speaking” quantum mechanics?

In any case, huge kudos to the writers—George Carson and Gene Roddenberry—for intuitively envisioning a geometric language long before the rest of us started drawing logic into carbon rings!
‘“Earth: Final Conflict S01 EP13”The Secret of Strandhill”’

  • Did Dinosaurs Run on “Unoptimized Hardware”?

Designing a compact monolithic molecule (instead of chaining bulky modular gates) is an exponentially hard problem: it takes a tailor-made quantum processor to solve the molecular geometry for a larger processor, which in turn designs the next generation. This recursive bootstrapping mirrors biological evolution: proteins and enzymes are nothing less than self-assembling, monolithic quantum molecular processors sculpted over 3.5 billion years.

This invites a playful yet profound evolutionary question: could the colossal size of Mesozoic dinosaurs reflect an earlier, less optimized era of molecular hardware?

Through modern Ancestral Sequence Reconstruction (ASR), computational biologists can simulate ancient proteins. What we discover is telling: while ancient enzymes were not vastly longer, they were structurally “looser”, promiscuous, and slower to navigate their energy landscapes compared to the razor-sharp, catalytically perfected enzymes of modern birds and mammals. Furthermore, avian descendants underwent dramatic genomic streamlining, purging genetic bloat to support extreme metabolic clock speeds.

Just as early vacuum-tube computers filled entire rooms before silicon engineering miniaturized computation into our pockets, nature may have spent the last 100 million years refactoring its conjugated biological circuits—smoothing resonance bottlenecks, pruning parasitic states, and achieving the ultra-dense molecular miniaturization that powers today’s living world.


👉 Next chapter :
“Towards a Physical Implementation”