|
import numpy as np |
|
import pandas as pd |
|
|
|
|
|
|
|
|
|
|
|
states = { |
|
"Q1": [1 / np.sqrt(2), 1 / np.sqrt(2)], |
|
"Q2": [1, 0], |
|
} |
|
|
|
|
|
entanglement_operator = np.array([[1, 0, 0, 1], |
|
[0, 1, 1, 0], |
|
[0, 1, -1, 0], |
|
[1, 0, 0, -1]]) / np.sqrt(2) |
|
|
|
|
|
combined_state = np.kron(states["Q1"], states["Q2"]) |
|
|
|
|
|
connections = np.array([[0, 1], |
|
[1, 0]]) |
|
|
|
|
|
hamiltonian = np.array([[0, 1], |
|
[1, 0]]) |
|
|
|
|
|
time_step = 1 |
|
time_evolution_operator = np.linalg.matrix_power(np.eye(2) - 1j * hamiltonian * time_step, 10) |
|
|
|
|
|
dataset = { |
|
"States": states, |
|
"Entanglement Operator": entanglement_operator, |
|
"Combined State": combined_state, |
|
"Connections (Adjacency Matrix)": connections, |
|
"Hamiltonian": hamiltonian, |
|
"Time Evolution Operator": time_evolution_operator |
|
} |
|
|
|
|
|
quantum_data_df = pd.DataFrame({ |
|
"Quantum Element": ["State Q1", "State Q2", "Entanglement Operator", "Combined State", "Hamiltonian", "Time Evolution Operator"], |
|
"Representation": [ |
|
states["Q1"], |
|
states["Q2"], |
|
entanglement_operator, |
|
combined_state, |
|
hamiltonian, |
|
time_evolution_operator |
|
] |
|
}) |
|
|
|
import ace_tools as tools; tools.display_dataframe_to_user(name="Exhaustive Quantum Dataset", dataframe=quantum_data_df) |