
This reproducible starter demonstrates quantum signal sonification using a synthetic, quantum-inspired measurement trace. It maps a simulated expectation-value time series to audio so the processing can be tested end to end. The data are generated classically; this example does not run a quantum computer, establish entanglement, or provide evidence of a biological or physical quantum signal.
What this demonstration does
- Creates a deterministic simulated trace bounded between -1 and +1.
- Maps the trace to pitch and amplitude using explicit, documented rules.
- Writes a WAV audio file that can be replayed and compared across runs.
- Provides simple checks for finite values, range, sample rate, and output duration.
Install requirements
python -m pip install numpy scipy
Runnable Python example
Save this as quantum_signal_sonification_demo.py and run it with Python 3.10 or newer. It creates simulated_quantum_signal.wav in the current directory.
import numpy as npfrom scipy.io.wavfile import write# Reproducible synthetic trace, not a real quantum measurement.sample_rate = 44_100duration_seconds = 8.0n_points = 400t = np.linspace(0.0, duration_seconds, n_points, endpoint=False)# Illustrative bounded signal with a slow trend and oscillation.signal = 0.65 * np.sin(2 * np.pi * 0.35 * t) + 0.25 * np.cos(2 * np.pi * 0.12 * t)signal = np.clip(signal, -1.0, 1.0)# Validation: finite data, expected range, and valid audio settings.assert np.isfinite(signal).all(), "Signal contains NaN or infinity"assert signal.min() >= -1.0 and signal.max() <= 1.0assert sample_rate > 0 and duration_seconds > 0# Piecewise-linear interpolation from the slow data trace to audio samples.audio_t = np.arange(int(sample_rate * duration_seconds)) / sample_ratetrace_t = np.linspace(0.0, duration_seconds, n_points, endpoint=False)mapped = np.interp(audio_t, trace_t, signal)# Mapping rules:# signal -1..+1 -> tone frequency 220..880 Hz# absolute signal -> amplitude envelope 0.15..0.80frequency = 220.0 + (mapped + 1.0) * 0.5 * (880.0 - 220.0)amplitude = 0.15 + np.abs(mapped) * 0.65# Integrate instantaneous frequency to create a continuous-phase tone.phase = 2.0 * np.pi * np.cumsum(frequency) / sample_rateaudio = amplitude * np.sin(phase)# Fade in/out to reduce clicks at the file boundaries.fade_samples = int(0.02 * sample_rate)fade = np.linspace(0.0, 1.0, fade_samples)audio[:fade_samples] *= fadeaudio[-fade_samples:] *= fade[::-1]# Convert safely to signed 16-bit PCM and write a mono WAV file.pcm = np.int16(np.clip(audio, -1.0, 1.0) * 32767)write("simulated_quantum_signal.wav", sample_rate, pcm)print(f"Wrote simulated_quantum_signal.wav ({duration_seconds:.1f} seconds)")print(f"Input range: {signal.min():.3f} to {signal.max():.3f}")
Audio-mapping rules
| Input feature | Mapping | Purpose |
|---|---|---|
| Signal value (-1 to +1) | Pitch from 220 to 880 Hz | Make signed changes audible as pitch movement |
| Absolute signal value (0 to 1) | Amplitude from 0.15 to 0.80 | Represent magnitude without silence at zero |
| Time | Linear interpolation to 44.1 kHz | Produce continuous audio samples |
Validation and reproducibility checklist
- Input integrity: verify all values are finite and within the documented range.
- Repeatability: the same script and library versions should produce the same synthetic input trace and mapping.
- Audio integrity: confirm the WAV sample rate, duration, channel count, and PCM range.
- Perceptual evaluation: compare multiple mappings and test whether listeners can reliably identify the changes being encoded.
- Controls: compare against shuffled, constant, and noise-only traces to detect patterns created by the mapping itself.
- Documentation: record code version, parameters, dependencies, input provenance, and any preprocessing.
Scientific limitations
This is a sonification software demonstration using simulated data. It is not a quantum simulator, does not calculate a quantum state, and cannot support conclusions about entanglement, quantum advantage, pineal activity, or biological quantum effects. For real research, replace the synthetic trace with documented measurement results or output from a validated quantum simulation, retain provenance and calibration details, and define controls and statistical tests before interpreting the sound. Sonification is a representation of data, not independent proof of the phenomenon represented.
Continue the 4realsy® research pathway
Read the Quantum Signal Sonification flagship research page, the Quantum Signal Translation, Validation, and Sonification Architecture, Quantum Data to Sound, What Is Quantum Sonification?, and Quantum Sonification Research & Applications.
Reproduce the example
Save the code above as quantum_signal_sonification_demo.py. With Python 3.10 or newer and NumPy and SciPy installed, run:
python -m pip install numpy scipy
python quantum_signal_sonification_demo.py
Expected output: simulated_quantum_signal.wav in the current directory, with a reported duration of 8.0 seconds and the generated input range. The WAV is mono, 44,100 samples per second, signed 16-bit PCM. The script checks that the input values are finite, remain between -1 and +1, and use positive audio settings before writing the file.
For a reproducibility record, note the Python, NumPy, and SciPy versions actually installed (for example, using python --version and python -m pip show numpy scipy), the script revision, and any changed parameters. The page does not pin dependency versions, so record rather than assume the environment. The input trace is deterministic synthetic data; this is a classical Python audio-generation example, not a quantum circuit, quantum-hardware measurement, or evidence of entanglement.
Compare the sound with the source trace and use constant, shuffled, and noise-only controls before making claims about pattern detection. Continue to the flagship research methodology and signal-processing pipeline.
Explore the 4realsy® Quantum Signal Sonification Research Cluster
Start with the Quantum Signal Sonification research hub for the central research question, evidence standards, and reproducible methods. Explore its connected topics:
- Python Quantum Signal Sonification Demo — runnable synthetic-data workflow, validation checks, and WAV output.
- Quantum Signal Architecture — proposed translation, measurement, provenance, and validation layers.
- Quantum Data to Sound — data processing and documented audio-mapping methods.
- Biological Signal Processing — measured biosignals, preprocessing, and careful research boundaries.
- IBM Assembler and AI Engineering — systems engineering, debugging, and reliability.
- Mainframe Engineering and AI Reliability — operational discipline, validation, and controlled change.