# Entanglement in Quantum Mechanics and human behaviour

## Description

These graphs that the Python code has generated simulates the creation and visualisation of an entangled quantum state representing the personality traits of two individuals, Alice and Bob. Here's a breakdown of the code and its purpose: 1. Importing Libraries: • numpy is used for scientific computing and array operations. • matplotlib.pyplot is used for creating visualisations. 2. Defining Quantum States: • I and E are defined as NumPy arrays representing the two possible states for each individual's personality trait: Introverted (I) and Extroverted (E). 3. Generating Random States: • np.random.randint(2, size=2) generates two random numbers between 0 and 1 for both Alice and Bob. • These numbers are used to choose between the two personality states for each individual. 4. Setting Individual States: • Based on the random choices, alice_state and bob_state are assigned the respective personalities (Introverted or Extroverted). 5. Adding Variations: • The code allows for variations within each personality state by adding another random choice to the second element of each state array. 6. Entanglement: • np.kron performs the tensor product operation, creating an entangled state representing the combined states of Alice and Bob. 7. Visualization: • The code utilizes matplotlib to create a bar graph for each individual's state and the entangled state. • The graph displays the probability amplitudes for each personality trait. • The y-axis limits are adjusted slightly to accommodate the potential variations introduced earlier. Purpose of the Code: This code demonstrates a simplified simulation of entanglement in quantum mechanics. It aims to illustrate how quantum states can be combined to create correlated states, where individual measurements become dependent on each other. In this case, it represents how Alice and Bob's personalities, even though separate, become intertwined through their connection. The code also serves as a visual tool for understanding the concept of entanglement, making it easier to visualize the probability amplitudes associated with different states and the interconnectedness of quantum systems. It is important to note that this is a simplified representation and does not capture the full complexity of real-world quantum phenomena. However, it provides a valuable starting point for exploring and understanding the fundamental concepts of quantum mechanics.

## Files

## Steps to reproduce

import numpy as np import matplotlib.pyplot as plt # Define the quantum states representing personality traits: Introverted (I) and Extroverted (E) I = np.array([1, 0]) # Representing Introverted state: |I⟩ E = np.array([0, 1]) # Representing Extroverted state: |E⟩ # Generate random personality states for Alice and Bob with variations # Randomly choose between introverted and extroverted for Alice and Bob separately alice_choice = np.random.randint(2, size=2) # 0 for introverted, 1 for extroverted for Alice bob_choice = np.random.randint(2, size=2) # 0 for introverted, 1 for extroverted for Bob # Set Alice's and Bob's states based on the random choices alice_state = I if alice_choice[0] == 0 else E bob_state = I if bob_choice[0] == 0 else E # Vary the second trait for Alice and Bob alice_state[1] = alice_choice[1] bob_state[1] = bob_choice[1] # Compute the tensor product for the entangled state entangled_state = np.kron(alice_state, bob_state) # Visual representation of the entangled state plt.figure(figsize=(10, 4)) # Plot Alice's state plt.subplot(1, 4, 1) plt.title("Alice's State") plt.bar(range(len(I)), alice_state) plt.xticks([], []) plt.ylim(0, 1.5) # Adjust the y-axis limit for variations # Plot Bob's state plt.subplot(1, 4, 2) plt.title("Bob's State") plt.bar(range(len(I)), bob_state) plt.xticks([], []) plt.ylim(0, 1.5) # Adjust the y-axis limit for variations # Plot Entangled State plt.subplot(1, 4, 3) plt.title("Entangled State") plt.bar(range(len(entangled_state)), entangled_state) plt.ylim(0, 1.5) # Adjust the y-axis limit for variations plt.tight_layout() plt.show()