Lila James
View the Project on GitHub LilaShiba/Quantum_Collapse_Neuron
This bespoke Python class has two aims:
A nice starting place is in the notations used in common formulas. Later in this document, Dirac Notation, sometimes called Bra-ket Notation ( | 0⟩, | 1⟩), will be introduced. It will be helpful to have worked with linear algebra, probability, and a bit of calculus. |
This example demonstrates how to visualize a single qubit on the Bloch sphere using the BlochSphere
and Qubit
classes in Python.
qubit = Qubit(a=1/np.sqrt(2), b=1/np.sqrt(2))
qubit.plot_qubit()
This code initializes a qubit in an equal superposition state and visualizes it on the Bloch sphere.
The goal is to simulate quantum holographic properties using a complex neural network.
A qubit is the basic unit of quantum information, just like a bit in classical computing. However, qubits are magical because they can be in a superposition of states! Kind of like gender 🧙♀️✨
In simple terms:
0
or 1
.Source: 1.) MIT: A Gentle Introduction to Quantum Computing
Source: 2.) MIT: Holographic Quantum Matter
In quantum mechanics, bra-ket notation is essential for representing quantum states and operations.
Example in a qubit system:
When we measure a qubit, we "collapse" its superposition to one of the basis states:
import numpy as np
class Ket:
def __init__(self, alpha, beta):
self.state_vector = np.array([alpha, beta], dtype=complex)
def measure(self):
probabilities = np.abs(self.state_vector) ** 2
return np.random.choice([0, 1], p=probabilities)
# Example usage
alpha = 1/np.sqrt(2)
beta = 1/np.sqrt(2)
ket_instance = Ket(alpha, beta)
measurement_result = ket_instance.measure()
print(f"Measurement result: {measurement_result}")