Skip to content

Add Quantum Fracture brush#55

Open
ahkatlio wants to merge 4 commits into
moth-quantum:distfrom
ahkatlio:Make-your-own-Quantum-Brush
Open

Add Quantum Fracture brush#55
ahkatlio wants to merge 4 commits into
moth-quantum:distfrom
ahkatlio:Make-your-own-Quantum-Brush

Conversation

@ahkatlio
Copy link
Copy Markdown

@ahkatlio ahkatlio commented Jun 4, 2026

Description:

I've added a new brush called Quantum Fracture - a crystalline fracture effect powered by discrete-time quantum walks.

What it does

It turns your brush stroke into glowing, jagged crystal-like fractures. The pattern comes from a real quantum simulation: a discrete-time quantum walk on a line. Depending on the "Measurement Rate" parameter, it can look like sharp quantum interference patterns (low rate) or softer, more classical diffusion (high rate). The result feels like painting with frozen quantum probability itself.

Key features

  • Radius: controls the thickness of the fracture arms
  • Branches: how many arms radiate from the stroke path
  • Measurement Rate: blends between pure quantum behaviour and classical random walk (0.0 = fully quantum, 1.0 = classical)
  • Colour: base colour of the fractures
  • Glow: adds a soft luminous aura around the arms

Each stroke is unique thanks to the quantum sampling noise from the simulator.

Quantum background

The core is a discrete-time quantum walk (DTQW) using Qiskit. A Hadamard coin creates superposition, and the walker interferes with itself, producing those characteristic sharp twin peaks instead of a boring Gaussian blob. Mid-circuit measurements simulate the measurement-induced phase transition, which is an active research topic in quantum information. I thought it would be cool to make that visible and artistic.

Files added

  • qfracture/qfracture.py - main brush implementation
  • qfracture/qfracture_requirements.json - parameters and metadata
  • qfracture/README.md - detailed explanation and usage guide
  • qfracture/screenshot_demo.png - example output
screenshot_demo

I followed the template and tutorial from the repo. Tested locally, and it runs smoothly (kept circuit size small so it stays responsive).

Would love any feedback on the visual feel or code cleanliness. This was a really fun one to build - trying to turn actual quantum interference into something you can paint with.

Sloves #50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant