psikit is a lightweight, beginner-friendly quantum computing framework designed for simulating quantum optics experiments—especially those involving photonic qubits. The library provides an intuitive interface for representing quantum states, applying quantum gates (such as beam splitters), and simulating projective measurements with state collapse. It is ideal for educational purposes and rapid prototyping of quantum experiments.
- Quantum State Representation: Represent quantum states as vectors.
- Quantum Gates: Define and apply quantum gates (e.g., beam splitter operations).
- Measurement Simulation: Perform projective measurements that simulate state collapse.
- Modular Design: Easily extendable framework to incorporate additional quantum operations and experiments.
In the included example, a photonic qubit is prepared in a known state (e.g., |0⟩), passed through a beam splitter (which creates a superposition of two paths: "Transmission" and "Reflection"), and then measured. The framework simulates the collapse of the photon's state onto one of these paths based on the calculated probabilities.
from psikit.experiments import simulate_photonic_qubit_experiment, plot_experiment_diagram
simulate_photonic_qubit_experiment()
plot_experiment_diagram()
Users can define custom quantum gates and integrate them into the psikit framework. Example:
from psikit.core import QuantumState, QuantumGate
class CustomGate(QuantumGate):
def __init__(self, matrix):
super().__init__(matrix)
custom_gate = CustomGate([[0, 1], [1, 0]]) # Example of a custom-defined gate
Clone the repository and install the required dependency (NumPy):
git clone https://github.com/agomlabs/psikit.git
cd psikit
python setup.py
We have a long-term vision for psikit. Here’s what we plan to achieve in upcoming releases:
- Extend support for multi-qubit simulations
- Improve visualization for quantum states and transformations
- Implement more quantum gates beyond beam splitters and polarizers
- Support integration with real quantum hardware
- Develop a plugin system for community-contributed modules
Contributions are welcome! Please fork the repository and submit pull requests with your improvements.