liveBook · Manning

Golden ratio

As explained in Building Quantum Software with Python

The irrational number equal to (1 + √5) / 2, approached by ratios of consecutive Fibonacci numbers.

The golden ratio is the irrational number (1 + √5) / 2. Ratios of consecutive Fibonacci numbers approach it as the sequence grows. section 5.4

A quantum outcome-selection example uses Fibonacci structure to make binary outcomes containing consecutive 1s impossible, giving them probability 0. section 5.4

The Fibonacci connection follows from counting valid binary strings:

  • For one bit, both outcomes are valid, so |G1| = 2. section 5.4
  • For two bits, 00, 01, and 10 are valid, so |G2| = 3. section 5.4
  • Splitting by the first bit gives the recurrence |Gn| = |Gn−1| + |Gn−2|, matching Fibonacci numbers. section 5.4

Computing the approaching ratio

The recursive sequence begins [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]. Dividing neighboring Fibonacci numbers produces ratios that move toward the golden ratio.

How Building Quantum Software with Python covers it

How deep it goes
Defines the ratio, derives a Fibonacci recurrence from binary-string cases, and implements both sequence and circuit versions.
Examples
Uses valid strings for one to three qubits, recursive Fibonacci output, and a circuit tested on one and two qubits.
What it assumes
Assumes basic binary strings, qubit outcomes, probability, and recursive Python functions.
What you can do after
Evaluate/understand golden-ratio convergence and inspect a quantum circuit that produces the associated valid-outcome distribution.
How it connects
Connects Fibonacci numbers, quantum oracles, good outcomes, binary representations, and probability.

Also explained in

Compare how 2 books explain golden ratio →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building Quantum Software with Python. The section links point to the parts of the book it draws on.