https://news.mit.edu/2025/making-ai-generated-code-more-accurate-0418
A site devoted mostly to everything related to Information Technology under the sun - among other things.
Saturday, April 19, 2025
Sunday, June 23, 2024
Gleam
Saturday, June 22, 2024
Thursday, May 2, 2024
Tuesday, April 9, 2024
Plotting Quantum Potential with Python - ChatGPT 3.5
To simulate the interference pattern produced by a double-slit experiment with a double Gaussian wave function and compute the quantum potential, we can follow these steps:
- Define the double Gaussian wave function.
- Simulate the double-slit experiment by allowing the wave function to pass through two slits.
- Compute the interference pattern resulting from the superposition of the waves passing through the two slits.
- Compute the quantum potential based on the resulting wave function.
- Plot the interference pattern and the quantum potential.
"""
This code defines a double Gaussian wave function, computes its quantum potential,
and then plots both the wave function and the quantum potential. Adjust the parameters
as needed to observe different behaviors.
"""
import numpy as np
import matplotlib.pyplot as plt
def compute_quantum_potential(psi, h_bar=1, m=1):
"""
Computes the quantum potential for a given wave function.
Arguments:
psi : array_like
1-D array representing the wave function.
h_bar : float, optional
Value of the reduced Planck constant (default is 1).
m : float, optional
Mass of the particle (default is 1).
Returns:
quantum_potential : array_like
1-D array representing the quantum potential.
"""
# Compute the magnitude of the wave function
psi_magnitude = np.abs(psi)
# Compute the second derivative of the wave function
second_derivative = np.gradient(np.gradient(psi_magnitude))
# Compute the quantum potential
quantum_potential = - (h_bar**2 / (2 * m)) * (second_derivative / psi_magnitude)
return quantum_potential
def double_gaussian_wavefunction(x, x0, sigma, A):
"""
Computes the double Gaussian wave function.
Arguments:
x : array_like
1-D array representing the position.
x0 : float
Position of the center of the Gaussians.
sigma : float
Width of the Gaussians.
A : float
Amplitude of the Gaussians.
Returns:
psi : array_like
1-D array representing the wave function.
"""
psi = A * (np.exp(-((x - x0 - 1) / sigma)**2) + np.exp(-((x - x0 + 1) / sigma)**2))
return psi
# Example usage
if __name__ == "__main__":
# Define parameters
x = np.linspace(-5, 5, 1000) # Position range
x0 = 0 # Center of the Gaussians
sigma = 0.5 # Width of the Gaussians
A = 1 # Amplitude of the Gaussians
# Compute the double Gaussian wave function
psi = double_gaussian_wavefunction(x, x0, sigma, A)
# Compute the quantum potential
Q = compute_quantum_potential(psi)
# Plot the wave function and the quantum potential
plt.figure(figsize=(12, 6))
plt.subplot(1, 2, 1)
plt.plot(x, psi, label='Wave function')
plt.title('Double Gaussian Wave Function')
plt.xlabel('Position')
plt.ylabel('Amplitude')
plt.legend()
plt.subplot(1, 2, 2)
plt.plot(x, Q, label='Quantum Potential', color='red')
plt.title('Quantum Potential')
plt.xlabel('Position')
plt.ylabel('Value')
plt.legend()
plt.tight_layout()
plt.show()
Wednesday, August 10, 2022
Programming Epson Robots
How to program Epson Robots:
Epson RC+ Express Development Software Trial Download | Epson US
Monday, March 7, 2022
Processing Sketchbook & Language
Please take a look at Welcome to Processing! / Processing.org - a flexible software sketchbook and an object-oriented language (with support for inheritance) for learning how to code within the context of the visual arts.
A useful book with step-by-step tutorials from elementary operations to genetic algorithms and neural nets is this: The Nature of Code
The significance of this environment is that it is for artists - it is geared towards the development of visual images. It is not a general purpose environment for solving generic dry and constipating problems.
Saturday, January 11, 2020
Wednesday, December 11, 2019
Monday, October 14, 2019
Salesfroce.com Goes Go
https://www.zdnet.com/article/salesforce-why-we-ditched-python-for-googles-go-language-in-einstein-analytics/
Monday, August 5, 2019
Julia
Julia: come for the syntax, stay for the speed
https://www.nature.com/articles/d41586-019-02310-3
Monday, January 28, 2019
Bayesian Synthesis of Probabilistic Programs for Automatic Data Modeling
These techniques work with probabilistic domain-specific data modeling languages that capture key properties of a broad class of data generating processes, using Bayesian inference to synthesize probabilistic programs in these modeling languages given observed data.
It uses generative programming techniques to produce domain specific code - see below:
https://dl.acm.org/ft_gateway.cfm?id=3290350&ftid=2027616&dwn=1&CFID=46105614&CFTOKEN=bd554558d8f7ab57-41952796-0E75-1855-A8EFED89006D428F
Monday, February 19, 2018
Xianos Compiler
http://www.doc.ic.ac.uk/teaching/distinguished-projects/2009/m.tait.pdf
Thursday, July 13, 2017
Spark
Learn more about it @ http://www.spark-2014.org/
Rust
Rust supports functional and imperative-procedural paradigms.
Rust is syntactically similar to C++, but is designed for better memory safety while maintaining performance.
Learn more about it
Wednesday, July 12, 2017
Solidity
Thursday, January 12, 2017
Make with Ada: Redux
Thursday, August 11, 2016
JS++
https://www.onux.com/jspp/tutorials/hello-world/introduction
Friday, July 22, 2016
The K Programming Language
https://en.wikipedia.org/wiki/K_(programming_language)
http://vrabi.web.elte.hu/k/
Open-source implementation of the K programming language:
https://github.com/kevinlawler/kona
Sample:
http://kparc.com/
Monday, June 20, 2016
Teach Yourself Java
http://how-to-program-in-java.com/
Useful Links
- .Net Code Samples
- AJAX for MS Developers
- C# Tutorials
- Channel9
- Code Search Engine
- Douglas Crockford's JavaScript Site
- DZONE
- Google Code
- IBM Developer Works
- IBM Public Skunkworks
- Is This Thing On?
- Java tutorials, hints, tips
- Jon Udell Weblog
- Knowing .Net
- Massive List of Information for Programmers
- MIT Courses
- MSDN
- Simple-Talk
- SUN Java
- That Indigo Girl
- UC Berkeley Lectures
- Yahoo UI Library
Topics
- 3-D Printing (14)
- AI (329)
- Art (109)
- Article (147)
- book (14)
- books (84)
- Business Intelligence (18)
- Careers (94)
- Cloud Computing (21)
- Cognition (13)
- Complexity (8)
- Computer Science (22)
- COVID-19 (1)
- Cyber-security (83)
- Data Analysis (41)
- Data Management (21)
- Data Visualization (31)
- Design Thinking (1)
- Embedded Tools (34)
- Gadgets (76)
- Games (33)
- Google (9)
- Hardware (44)
- High Performance Computing (33)
- History of Mathematics (1)
- Humor (77)
- Inetrview (7)
- Intelligent Transportation (17)
- IoT (15)
- IT as Metaphor (2)
- Magazine Subscription (8)
- Mathematics Tools (4)
- Microsoft Platforms (24)
- Microsoft Tools (65)
- Mobile Computing (3)
- Motto (3)
- Network Tools (12)
- News (166)
- Offshoring (6)
- Open-Source Sofware (9)
- Outsourcing (1)
- Philosophy (7)
- picture (1)
- Pictures (149)
- PLM (5)
- Programming Languages (75)
- Quantum Computing (5)
- Reports (55)
- RFID (3)
- Robo (2)
- Robots (111)
- Science (65)
- Scientific Computing (18)
- Search Tools (7)
- Semantic Networks (11)
- Simulations (34)
- Social Computing (27)
- Software Architecture (28)
- Software Development (161)
- Software Testing (5)
- Software Tools (272)
- Some Thoughts (66)
- Speech (6)
- Standards - Telematics (9)
- Transportation (14)
- Video (11)
- Visualization (10)
- Web Site (233)
- Web Site for Science (51)
About Me

- Babak Makkinejad
- I had been a senior software developer working for HP and GM. I am interested in intelligent and scientific computing. I am passionate about computers as enablers for human imagination. The contents of this site are not in any way, shape, or form endorsed, approved, or otherwise authorized by HP, its subsidiaries, or its officers and shareholders.
Blog Archive
- September (2)
- August (10)
- July (8)
- June (15)
- May (15)
- April (9)
- March (17)
- February (22)
- January (45)
- December (19)
- November (11)
- October (10)
- September (7)
- August (11)
- July (6)
- June (11)
- May (12)
- April (7)
- March (5)
- February (1)
- January (3)
- December (1)
- October (2)
- September (4)
- August (1)
- July (3)
- June (2)
- April (2)
- March (2)
- February (2)
- January (10)
- December (1)
- October (1)
- September (1)
- August (4)
- June (1)
- April (6)
- March (2)
- February (4)
- January (3)
- December (1)
- October (1)
- June (3)
- April (1)
- March (1)
- February (1)
- January (6)
- December (8)
- November (3)
- October (5)
- September (2)
- August (3)
- July (6)
- June (2)
- May (7)
- April (19)
- March (22)
- February (6)
- January (5)
- December (4)
- November (4)
- October (9)
- September (3)
- August (7)
- July (3)
- June (2)
- May (6)
- April (4)
- March (8)
- February (5)
- January (18)
- December (6)
- November (10)
- October (6)
- September (7)
- August (2)
- July (4)
- June (5)
- May (8)
- April (5)
- March (9)
- February (3)
- January (7)
- December (2)
- November (1)
- October (3)
- September (5)
- August (10)
- July (8)
- May (5)
- April (8)
- March (9)
- February (6)
- January (11)
- November (6)
- October (9)
- September (5)
- August (13)
- July (9)
- June (9)
- May (8)
- April (4)
- March (2)
- February (8)
- January (9)
- December (3)
- November (7)
- October (9)
- September (7)
- August (4)
- July (2)
- June (4)
- May (7)
- March (4)
- February (2)
- January (1)
- December (2)
- November (1)
- October (6)
- September (1)
- August (1)
- July (4)
- June (1)
- April (1)
- March (1)
- February (1)
- January (2)
- December (5)
- October (4)
- August (2)
- July (3)
- June (8)
- May (7)
- April (5)
- March (9)
- February (3)
- January (7)
- December (4)
- October (7)
- September (5)
- August (5)
- July (8)
- June (6)
- May (9)
- April (5)
- March (4)
- February (5)
- January (6)
- December (12)
- November (7)
- October (5)
- September (4)
- August (19)
- July (12)
- June (4)
- May (8)
- April (5)
- March (15)
- February (5)
- January (9)
- December (14)
- November (6)
- October (12)
- September (2)
- August (10)
- July (8)
- June (8)
- May (11)
- April (10)
- March (10)
- February (9)
- January (20)
- December (16)
- November (9)
- October (25)
- September (24)
- August (12)
- July (18)
- June (20)
- May (13)
- April (29)
- March (26)
- February (14)
- January (17)
- December (17)
- November (9)
- October (32)
- September (27)
- August (27)
- July (11)
- June (22)
- May (25)
- April (33)
- March (33)
- February (28)
- January (38)
- December (12)
- November (39)
- October (28)
- September (29)
- August (29)
- July (18)
- June (27)
- May (17)
- April (23)
- March (40)
- February (31)
- January (6)