Skip to content

emarkou/QCS-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QCS-Python — Quantum Circuit Simulator

A Python/PyQt6 reimplementation of QCS 2.0, a MATLAB-based quantum circuit simulator originally developed by Dr. Ioannis G. Karafyllidis at the Democritus University of Thrace (DUTh).

This project is a clean-room rewrite in Python. All scientific concepts, gate definitions, simulation logic, and the circuit model are the intellectual work of Dr. Karafyllidis. This repository makes no claim of original scientific contribution.


Original Work

Author: Dr. Ioannis G. Karafyllidis, Dept. of Electrical & Computer Engineering, Democritus University of Thrace, Greece

Original tool: QCS 2.0 (MATLAB) — available from the author's institutional page

Reference publication:

I. G. Karafyllidis, "Quantum Computer Simulator Based on the Circuit Model of Quantum Computation," IEEE Transactions on Circuits and Systems I: Regular Papers, vol. 52, no. 8, pp. 1590–1596, Aug. 2005. DOI: 10.1109/TCSI.2005.851999


What This Repo Is

  • Python 3.10+ rewrite of the same simulator
  • GUI built with PyQt6 (replacing the original MATLAB GUI)
  • Plots rendered with matplotlib
  • Identical gate set, qubit limits (≤ 6), and step limits (≤ 12)
  • Compatible with original QCS circuit files (QuantGate.txt, QuantPhase.txt, QuantReg.txt, QuantLinstp.txt)

Gate Set

Code Gate Description
0 I Identity
1 H Hadamard
2 PHG Phase gate
3 CN CNOT target
4 CCX Toffoli target
5 F Fredkin gate
6 CPH Controlled phase gate
8 Fredkin cover
9 ctrl Control qubit marker
10 X Pauli X
11 Y Pauli Y
12 Z Pauli Z
13 M Partial measurement

Requirements

numpy>=1.26.0
PyQt6>=6.6.0
matplotlib>=3.8.0

Install:

pip install -r requirements.txt

Screenshot

QCS-Python UI


Usage

python qcs.py
  • Click any cell in the circuit grid to assign a gate
  • Set qubit initial states by clicking the toggle buttons (|0⟩ / |1⟩)
  • Press Run Simulation to compute and plot results
  • Use Load / Save to work with circuit files

License

This repository contains no code derived from the original MATLAB implementation. The Python code is released under the MIT License. The underlying scientific work remains the property of its original author — please cite the paper above if you use this tool in academic work.

About

Python implementation of QCS - Quantum Computer Simulator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages