semvec/pypi-packages huggingface dataset:
quirkvis 0.1.1
Highly Customizable Quantum Circuit SVG Visualizer
Requires Python: >=3.8

# Quantum QuirkVis 🙃

A python package that draws quantum circuits written in qasm/OpenQASM 3.0 and outputs as SVG with a strong focus on personalization.

## Features
- SVG output
- Theming engine (JSON)
- Personalization (night mode, custom colors)
- Gate symbol substitutions (emojis, icons, animations)
- Awesome "dial" for parametrized gates
- Animations and other CSS filters
- Lightweight

# Themes
### Default
![Default Theme](examples/all_gates_default.svg "Default Theme")
### Night
![Night Theme](examples/all_gates_night.svg "Night Theme")
### Matrix
![Matrix Theme](examples/all_gates_matrix.svg "Matrix Theme")
### Emoji
![Emoji Theme](examples/all_gates_emoji.svg "Emoji Theme")

## Installation
```bash
pip install quirkvis
```

## Usage
```python
from quantum_quirkvis import draw

qasm_str = """
OPENQASM 3.0;
qubit[2] q;
h q[0];
cx q[0], q[1];
"""

draw(qasm_str, theme="matrix", filename="path/to/file.svg")

# or

svg = draw(qasm_str, theme="matrix")
```

## Personalization
Check the themes json files to see how much you can customize, you can customize anything!

Then create your own theme, you don't need to overwrite all the file, you only have to change the values of interest, the rest if defaulted.

- mytheme.json
```json
{
    "name": "default",
    "styles": {
        "background": "#777777",
    }
}
```

then simply

```python
draw(qasm_str, theme="mytheme.json")
```

You can also use the cli provided which exposes the command **qasmvis** 

```bash
qasmvis ghz.qasm -t matrix -o ghz.svg
```
or
```bash
qasmvis ghz.qasm -t matrix > ghz.svg
```
or
```bash
cat ghz.qasm | qasmvis -t night > ghz.svg
```

## Libraries
The current package just requires pyqasm to parse the qasm files or string into the AST that is processed to create SVG with the selected theme.

## License
MIT

## Limitations
Currently the library "unrolls" the circuit, therefore complex or custom gates (like CY, Toffoli, CSWAP, etc) are drawn as their primitives.

U-n gates are not yet supported

## unitaryDESIGN
This repo is currently running for a bounty on [unitaryDESIGN](unitary.design) hackathon
codegrade 17.0.29
A client library for accessing CodeGrade
Requires Python: <4.0,>=3.8.0

# CodeGrade API

This library makes it easier to use the CodeGrade API. Its API allows you to
automate your usage of CodeGrade. We are currently still busy documenting the
entire API, but everything that is possible in the UI of CodeGrade is also
possible through the API.
## Installation
You can install the library through [pypi](https://pypi.org/), simply run
`python3 -m pip install codegrade`. If you want to get a dev version with support
for the latest features, simply email [support@codegrade.com](mailto:support@codegrade.com)
and we'll provide you with a dev version.
## Usage
First, create a client:

```python
import codegrade

# Don't store your password in your code!
with codegrade.login(
    username='my-username',
    password=os.getenv('CG_PASSWORD'),
    tenant='My University',
) as client:
    pass

# Or supply information interactively.
with codegrade.login_from_cli() as client:
    pass
```

Now call your endpoint and use your models:

```python
from codegrade.models import PatchCourseData

courses = client.course.get_all()
for course in courses:
    client.course.patch(
        PatchCourseData(name=course.name + ' (NEW)'),
        course_id=course.id,
    )

# Or, simply use dictionaries.
for course in courses:
    client.course.patch(
        {"name": course.name + ' (NEW)'},
        course_id=course.id,
    )
```

For the complete documentation go to
https://python.api.codegrade.com.
## Backwards compatibility
CodeGrade is constantly upgrading its API, but we try to minimize backwards
incompatible changes. We'll announce every backwards incompatible change in the
[changelog](http://codegrade.com/changelog). A new version of the API
client is released with every release of CodeGrade, which is approximately every
month. To upgrade simply run `pip install --upgrade codegrade`.
## Supported python versions
We support python 3.6 and above, `pypy` is currently not tested but should work
just fine.
## License
The library is licensed under AGPL-3.0-only or BSD-3-Clause-Clear.