Skip to content

High-Level Quantum Computing Simulation in Python

Notifications You must be signed in to change notification settings

cykim8811/pyqsim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyqsim: High-Level Quantum Computing Simulation in Python

pyqsim is a Python library designed to simplify quantum computing simulation through high-level abstractions. It aims to make quantum programming more accessible and intuitive, bridging the gap between classical and quantum computing paradigms.

Features

  • High-Level Abstraction: Move beyond low-level circuit and qubit manipulations to a more intuitive programming model.
  • Automatic Inverse Operations: Objects automatically perform inverse operations upon deletion, maintaining quantum state consistency.
  • Familiar Programming Model: Use quantum data types similarly to classical types like int, making the transition to quantum computing smoother for classical programmers.
  • Eager Execution: Computations are performed immediately as Python functions are called, allowing for real-time interaction and debugging.
  • Quantum-Classical Hybrid Programming: Seamlessly mix quantum operations with classical programming constructs.

Installation

pip install pyqsim

Quick Start

Here's a simple example implementing Deutsch's algorithm:

import pyqsim
from pyqsim.types import qint
from pyqsim.gates import h, z

def oracle(x): return x & ~x  # Constant function

a = qint(0, size=1)
z(oracle(h(a)))
print("Constant" if int(a) == 0 else "Balanced")

Advanced Usage

Check out the examples/ directory for more complex quantum algorithms implementations, including Grover's search algorithm.

Contributing

We welcome contributions! Please contact me through email.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

For any queries or support, please open an issue on our GitHub repository or contact me at [email protected].

About

High-Level Quantum Computing Simulation in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages