Skip to content

taikiwakatsuki/Quantum-Art-Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quantum-Art-Library

Python Versions PyPI version PyPI - License

This is a creative coding library for artistic expression of quantum behavior.

Requirement

  • NumPy
  • Matplotlib
  • PyOpenGL
  • glfw
  • cv2
  • PIL
  • tqdm
  • os
  • platform
  • CuPy (optional)

Installation

pip install QuantumArtLibrary

Usage

There are two ways to use it. One is to output the quantum simulation results as an array. The other is the output of images and videos.

Quantum Simulation

simulation(image="sample.png", n=400, step=300, p=[0, -15], v=[0, 80], method="split-step", white=1, range=[0.1, 0.9])

Not all arguments are required. The above is the default value other than image. If no image is specified, it simulates a double slit experiment.

image: Image to input.
n: Number of grid points.
step: Number of frames to output.
p: Initial position of the quantum.
v: Quantum speed and direction.
method: Simulation method. When simulating on a GPU using CuPy, you can use the following methods: split-step-cupy
white: Set 1 for images based on white and 0 for images based on black.
range: Set the range to convert to grayscale.

Output of images and videos

drawing(simulation, vertex_shader="shader.vert", fragment_shader="shader.frag")

Take the output of the simulation function as an argument. Shaders are not required, but can be set.

vertet_shader: Set the vertex shader. Refer to shader.vert
fragment_shader: Set fragment shader. Refer to shader.frag