home / skills / plurigrid / asi / moth-actias

moth-actias skill

/skills/moth-actias

This skill lets you visualize qubit states on the Bloch sphere and sonify them via MIDI-controlled audio mapping.

npx playbooks add skill plurigrid/asi --skill moth-actias

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
4.5 KB
---
name: moth-actias
description: "Moth's Actias quantum synth for qubit sonification with Bloch sphere visualization and MIDI control"
trit: +1
geodesic: true
moebius: "μ(n) ≠ 0"
---

# Moth Actias Quantum Synth

**Trit**: +1 (PLUS - generative/sonic output)
**Type**: Quantum Musical Instrument
**Principle**: Sonify qubit state via Bloch sphere mapping

---

## Overview

Actias is a quantum synthesizer that:
- Visualizes qubit state on Bloch sphere
- Maps quantum state to audio parameters
- Accepts MIDI for rotation control
- Supports measurement operations

## Bloch Sphere Sonification

```
        |0⟩ (North pole)
         │
         │  θ = polar angle
         │
    ─────┼───── φ = azimuthal angle
         │
         │
        |1⟩ (South pole)

|ψ⟩ = cos(θ/2)|0⟩ + e^{iφ}sin(θ/2)|1⟩
```

### Audio Mapping

| Parameter | Bloch Coordinate | Sound Effect |
|-----------|------------------|--------------|
| θ (theta) | Polar angle | Timbre blend |0⟩↔|1⟩ |
| φ (phi) | Azimuthal angle | Phase/detune |
| r | Radius (purity) | Amplitude/reverb |

## MIDI Control

### CC Mappings

| CC | Controller | Rotation |
|----|------------|----------|
| 1 | Expression 1 | X-axis (orange) |
| 2 | Expression 2 | Z-axis (blue) |
| 3 | Expression 3 | Y-axis (green) |
| 64 | Sustain/Switch | Measurement |

### Note Input

```python
# MIDI note → qubit initialization
def note_to_qubit(note, velocity):
    """
    Map MIDI note to initial qubit state.
    
    note: 0-127 → θ = note * π / 127
    velocity: 0-127 → φ = velocity * 2π / 127
    """
    theta = note * np.pi / 127
    phi = velocity * 2 * np.pi / 127
    return cos(theta/2), exp(1j * phi) * sin(theta/2)
```

## Integration with Quantum Guitar

```
┌─────────────┐     MIDI      ┌─────────────┐
│   Fishman   │──────────────▶│   Actias    │
│  MIDI Pickup│               │   Synth     │
└─────────────┘               └──────┬──────┘
                                     │
┌─────────────┐     MIDI             │ Audio
│ Boss EV-1-WL│──────────────────────┤
│ Foot Pedals │                      │
└─────────────┘                      ▼
                              ┌─────────────┐
┌─────────────┐               │    Mix      │
│  Boss FS-6  │───Measure────▶│   Output    │
│ Foot Switch │               └─────────────┘
└─────────────┘
```

## Web Interface

Actias runs as web application with:
- Real-time Bloch sphere visualization
- MIDI device selection
- Audio output configuration
- Preset management

**Note**: Web MIDI requires secure context (HTTPS/localhost)

## Known Issues & Workarounds

From Coecke's tech notes:

| Issue | Workaround |
|-------|------------|
| Preset loss on MIDI reconnect | Re-add device in settings |
| Tablet web MIDI | Use desktop only |
| Two laptops needed | Separate Actias + DAW hosts |
| Only Z-measurement | Rotate before measure for X |

## SuperCollider Alternative

```supercollider
// Actias-like qubit sonification
SynthDef(\actias, { |theta=0, phi=0, gate=1|
    var sig, prob0, prob1, env;
    
    prob0 = cos(theta/2).squared;
    prob1 = sin(theta/2).squared;
    
    // Blend two timbres based on |0⟩/|1⟩ probability
    sig = (SinOsc.ar(440) * prob0) + 
          (Saw.ar(440 * 1.5) * prob1);
    
    // Phase modulation from φ
    sig = sig * (1 + (0.5 * cos(phi)));
    
    env = EnvGen.kr(Env.asr(0.01, 1, 0.1), gate);
    
    Out.ar(0, sig * env ! 2);
}).add;
```

## GF(3) Triad

| Component | Trit | Role |
|-----------|------|------|
| zx-calculus | -1 | Notation |
| quantum-guitar | 0 | Interface |
| **moth-actias** | **+1** | **Sonification** |

**Conservation**: (-1) + (0) + (+1) = 0 ✓

## References

1. Miranda, Thomas & Itaboraí (2023). Q1Synth. Applied Sciences
2. Coecke (2025). A Quantum Guitar. arXiv:2509.04526
3. Moth. Actias documentation (web)

---

**Skill Name**: moth-actias
**Type**: Quantum Synthesizer / MIDI
**Trit**: +1 (PLUS)

## Non-Backtracking Geodesic Qualification

**Condition**: μ(n) ≠ 0 (Möbius squarefree)

This skill is qualified for non-backtracking geodesic traversal.

Overview

This skill implements Actias, a web-based quantum synthesizer that sonifies a single qubit via Bloch sphere mapping and offers real-time visualization and MIDI control. It translates qubit coordinates (θ, φ, purity) into audio parameters for timbre, phase/detune, and amplitude/reverb. The interface supports MIDI CC and note mappings, measurement operations, and preset management.

How this skill works

Actias represents a qubit on a live Bloch sphere and derives audio parameters from the polar angle θ (timbre blend), azimuthal angle φ (phase/detune), and radius/purity (amplitude/reverb). MIDI notes initialize the qubit state (note→θ, velocity→φ) and CC messages rotate the qubit on X/Y/Z axes in real time. Measurement can be triggered by a sustain/switch CC or foot switch, collapsing the state and updating both visualization and sonic output.

When to use it

  • Perform live sets where evolving quantum states drive synth textures.
  • Explore hybrid setups that map guitar MIDI pickups into quantum sonification.
  • Prototype sonification ideas linking state purity to spatial reverb or amplitude.
  • Teach quantum state concepts with interactive audio-visual feedback.
  • Integrate into a DAW when you need expressive, MIDI-controllable modulation tied to a Bloch sphere model.

Best practices

  • Use HTTPS or localhost for reliable Web MIDI access and device selection.
  • Map one MIDI CC per rotation axis to avoid conflicting transforms during performance.
  • Keep a dedicated sustain/switch CC for measurement to avoid accidental collapses.
  • Save presets before reconnecting MIDI devices to prevent loss of settings.
  • Pre-rotate the qubit into desired measurement basis if you need deterministic readout (e.g., X measurement via Z after rotation).

Example use cases

  • Live looping: route guitar MIDI pickup into Actias to create evolving quantum-driven textures while foot pedals control measurement.
  • Sound design: export Actias output as distinct timbres by sweeping θ for timbre morphs and φ for phase modulation.
  • Interactive teaching demo: show Bloch sphere rotations and let students hear how θ and φ affect timbre and phase.
  • DAW integration: host Actias in one laptop and route audio to a second DAW host for mixing and effects.
  • SuperCollider sketching: reproduce Actias mappings in SuperCollider for offline rendering or algorithmic composition.

FAQ

What MIDI messages control rotations and measurement?

Three expression CCs control rotations on X, Z, and Y axes (default CC1, CC2, CC3). CC64 is used as a sustain/switch to trigger measurement by default.

How are MIDI notes mapped to qubit states?

Notes map to θ via note*π/127 and velocity maps to φ via velocity*2π/127, producing the initial |ψ⟩ = cos(θ/2)|0⟩ + e^{iφ}sin(θ/2)|1⟩.