semvec/pypi-packages huggingface dataset:
pygmlib 1.0.0
python bind of GMLib
Requires Python: >=3.7

# pygmlib

[GMLib](https://github.com/oldprincess/gmlib)项目的python绑定，利用pybind11进行绑定

已经通过测试的环境

|操作系统|CPU|python版本|
|:-:|:-:|:-:|
|Windows11|i5-12500H|3.9|
|Windows11|i5-12500H|3.10|

## 1 快速开始

### 1.1 通过pypi安装（推荐）

```python
pip install pygmlib
```

### 1.2 通过源码包安装（推荐）

在pypi主页下载pygmlib项目的源码包并解压

* 运行

```
pip install ./pygmlib
```

### 1.3 通过github项目安装

* 克隆仓库

```
git clone https://github.com/oldprincess/py-gmlib.git
```

* 获取子模块

```
cd py-gmlib
git submodule update --init --recursive
cd ..
```

* pip安装pygmlib

```
pip install ./pygmlib
```

## 2 支持的密码算法

* SM3
* SM4: ECB, CBC, CFB, OFB, CTR, GCM
* AES: ECB, CBC, CFB, OFB, CTR, GCM


## 3 使用样例

下面的样例实现SM4算法ECB模式的加密和解密功能，并校验正确性

```python
import pygmlib

sm4_key = bytes(16)  # 16 bytes ZERO
sm4_pt = bytes(16)  # 16 bytes ZERO
# sm4 ecb encrypt
sm4e = pygmlib.cipher.Sm4EcbEncryptor(sm4_key)
ct = sm4e.update(sm4_pt)
ct += sm4e.final()
# sm4 ecb decrypt
sm4d = pygmlib.cipher.Sm4EcbDecryptor(sm4_key)
pt = sm4d.update(ct)
pt += sm4d.final()

assert pt == sm4_pt
# key: 00000000000000000000000000000000
# pt : 00000000000000000000000000000000
# ct : 9f1f7bff6f5511384d9430531e538fd3
print("key:", sm4_key.hex())
print("pt :", sm4_pt.hex())
print("ct :", ct.hex())
```
qiskit-classroom 0.3.0
the Qiskit classroom GUI applications.
Requires Python: >=3.9

# Qiskit-Classroom

Qiskit-classroom is a toolkit that helps implement quantum algorithms by converting and visualizing different expressions used in the Qiskit ecosystem using Qiskit-classroom-converter. The following three transformations are supported

* Quantum Circuit to Dirac notation

* Quantum Circuit to Matrix

* Matrix to Quantum Circuit

## Getting Started

### Prerequisites

* LaTeX's distribution(or program) must be installed

  * On GNU/Linux recommend TeX Live

  * On Windows recommend MiKTeX

* git should be installed

* python must be installed (3.9 <= X <= 3.11)

* Qt6(>= 6.0.x) must be installed

### Install with Flatpak (GNU/Linux)

We're currently packaging flatpak package. please wait for a couple of days

### Install with PyPi (Windows, macOS)

```
pip install qiskit-classroom
```

> warning
>
> Apple Silicon Processor not supported read this article

you must install latex distribution(program).

## How to debug

```bash
# download package
git https://github.com/KMU-quantum-classrooom/qiksit-classroom.git

# install python packages
cd qiskit-classroom
pip install -r requirements.txt

# run scripts
python -m main.py
```

## ScreenShots

* main window

![main-window](./screenshot//qiskit-classroom-main-window.png)

* Quantum Circuit

![quantum circuit](./screenshot/qiskit-classroom-main-window-drag&drop.gif)

It takes in the Python code and the names of the variables in the circuit you want to convert.
The Python code can be imported by dragging and dropping or by importing a file.

* Matrix

![matrix](./screenshot/qiskit-classroom-main-window-matrix.png)

Takes in a matrix written in Python syntax, the number of qubits, and whether the circuit is observed or not.

## Acknowledgement

* 국문 : "본 연구는 2022년 과학기술정보통신부 및 정보통신기획평가원의 SW중심대학사업의 연구결과로 수행되었음"(2022-0-00964)

* English : "This research was supported by the MIST(Ministry of Science, ICT), Korea, under the National Program for Excellence in SW), supervised by the IITP(Institute of Information & communications Technology Planning & Evaluation) in 2022"(2022-0-00964)

## License

Qiskit-Classroom is licensed under the Apache License, Version 2.0