liveBook · Manning

Geometric sequence state

As explained in Building Quantum Software with Python

A geometric sequence state is a quantum state whose amplitude phases follow a geometric progression associated with a signal frequency.

A geometric sequence state is a periodic quantum state whose amplitudes share one magnitude while their phases advance by kθ for outcome index k. The phase progression represents a signal frequency, but measurement cannot reveal it directly when all outcome probabilities are equal. section 7.2 section 8.2

Construct the state with a repeatable circuit pattern:

  • Apply a Hadamard gate to every qubit to create equal-magnitude amplitudes. section 8.2
  • Apply a phase gate to qubit j with angle 2^jθ; binary outcome digits combine these factors into the phase kθ. section 8.2
  • Use a Hadamard gate or the QFT to convert phase differences into magnitude differences that measurement can distinguish. section 7.2

Three-qubit encoding

For n = 3 and θ = π/3, encode the state by applying H to each qubit, then phase rotations π/3, 2π/3, and 4π/3. The reusable Python pattern is: geometric_sequence_circuit(n, theta) creates the register, applies both gate loops, and returns the circuit. A single-loop version interleaves the Hadamard and phase operations for each qubit. section 8.2

Listing 8.1 Creating a circuit for encoding a geometric sequence state
from sim_circuit import QuantumRegister, QuantumCircuit

def geometric_sequence_circuit(n, theta):

    N = 2**n

    q = QuantumRegister(n)
    qc = QuantumCircuit(q)

    for j in range(n):            #1
        qc.h(q[j])

    for j in range(n):           #1
        qc.p(2 ** j * theta, q[j])

    return qc

Inspect the executable circuit builder and its parameterized Hadamard and phase-gate loops. section 8.2

How Building Quantum Software with Python covers it

How deep it goes
Explains amplitude phases, binary construction, and executable circuits, then connects phase retrieval to the simplest QFT pattern.
Examples
Uses frequency 1/3 with θ = π/3, a three-qubit θ = π/3 circuit, state tables, tree diagrams, and Python builders.
What it assumes
Assumes basic quantum states and phase gates while developing the multi-qubit construction through binary outcome digits.
What you can do after
Build it from scratch with parameterized Hadamard and phase-gate loops, then infer encoded angles from measured outcome frequencies.
How it connects
Connects phase encoding, amplitude encoding, phase gates, Hadamard gates, the quantum Fourier transform, and the inverse quantum Fourier transform.

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.