semvec/pypi-packages huggingface dataset:
qudit 0.3.2
High performance quantum sims on qudits
License: MIT
Requires Python: >=3.11

<img src="https://raw.githubusercontent.com/plutoniumm/qudit/refs/heads/main/docs/public/icons/favi.svg" alt="icon" width="125" height="125" align="right" name="icon"/>

### `qudit`

High performance simulations for qudit systems. To make qudit machine learning, qudit error correction, and qudit circuit simulation easier. Qudit is made fully around `pytorch` to make it easy to mix and match tools without worrying about type errors.

[![PyPI version](https://badge.fury.io/py/qudit.svg)](https://pypi.org/project/qudit/)

```bash
pip install qudit
```

## Quickstart

In most cases it should not matter if you mix and match `pytorch` with `qudit` since most abstractions are built on top of `pytorch` tensors. The following is two examples to do the same thing, one using the `Circuit` class and the other manually using the matrices.

**Using the `Circuit` class:**

```python
from qudit import Circuit
import torch as pt

C = Circuit(2, dim=2)  # 2 qBits with d=2
G = C.gates[2]

C.gate(G.H, dits=[0])
C.gate(G.CX, dits=[0, 1])

ket0 = pt.zeros(2**2)
ket0[0] = 1.0  # |00>

print(C(ket0))  # [1. 0. 0. 1.]/rt2
```

## Contributing
Qudit has a small shell scripts used to generate documentation and run tests. If you want to contribute, please fork the repo and make a pull request with your changes. The running script is `do`.

### `./do` helper script

The repository includes a small `./do` helper for common workflows (build, tests, docs, etc.).

```bash
./do help
```

#### Commands

- `./do build`
  - Builds `sdist` + `wheel` and runs `twine check dist/*`.
- `./do deploy`
  - Uploads `dist/*` to PyPI via `twine upload` using an API token.
  - Token is read from `FILE` (defaults to `.vscode/token.env`).
- `./do test`
  - Runs the Python test scripts in `./tests`.
- `./do prof`
  - Profiles `./tests/bench_fast.py` with `cProfile` and opens `snakeviz`.
- `./do head`
  - Runs `python ./view/headers.py` (used by the docs pipeline).
- `./do docs dev`
  - Runs the docs dev server (`npm run dev`).
- `./do docs build`
  - Builds the docs (`npm run build`).

#### Common workflows

```bash
# run test scripts
./do test

# build packages locally
./do build

# build docs
./do docs build

# docs dev server
./do docs dev
```

#### PyPI token setup (for `deploy`)

Create a file containing only your PyPI API token (no `export`, no quotes):

- default location: `.vscode/token.env`
- or specify a different file via `FILE=path/to/token.env`

Example:

```bash
FILE=.vscode/token.env ./do deploy
```

## Acknowledgements
Many many thanks to [Sai Sakunthala](https://github.com/Sai-sakunthala) and [R-Phoenix](https://github.com/R-Phoenix) for testing and fixing bugs!

This library is built on top of pytorch, and takes ideas from Qiskit, Cirq, and QuDiet.
hashcli 0.4.0
Hash - Intelligent CLI system with dual-mode functionality (LLM chat and command proxy)
License: MIT
Requires Python: >=3.10
Keywords: cli, llm, assistant, terminal, ai, hash

# Hash CLI

Hash (HAcker SHell) is an intelligent terminal assistant that combines LLM-powered conversational assistance with command-line productivity tools. Ask questions in plain English, manage your development workflow, and keep your shell flow fast without losing control or safety.

## Why Hash CLI

- **Conversational AI**: Natural language interface for coding help, debugging, and system administration.
- **Provider choice**: OpenAI, Anthropic, and Google models supported.
- **Tool calling with guardrails**: shell execution, file ops, web search, and code analysis with confirmations and policy checks.
- **Conversation history**: list, inspect, and clear past sessions.
- **Shell integration**: optional `#` prefix for a seamless inline workflow.
- **Rich output**: streaming, panels, and quiet mode when needed.

## Quickstart

Install Hashcli:
```bash
pipx install hashcli
```
or
```bash
uv tool install hashcli
```

You can also use `pip install hashcli`, but we recommend using `pipx` or `uv tool` as it makes hashcli available on all virtual environments.

Set up Shell integration:
```bash
hashcli --setup
```

Set up api key in your terminal:

    export OPENAI_API_KEY="your-key"

If you prefer a guided setup:
```bash
hashcli --config
```

## Usage

```bash
# show me the current disk usage in human readable format
# show last 5 git commit messages
# how to find all __pycache__ in current folder
```

## Features (from the current code)

- **Built-in Commands**: `/clean`, `/config`, `/fix`, `/help`, `/history`, `/model`, `/tldr`, `/exit`, `/quit`
- **LLM Tools**:
  - `execute_shell_command` (guarded shell execution with timeouts and allow/block lists)
  - `read_file`, `write_file`, `list_directory` (filesystem operations with safety checks)
  - `web_search` (DuckDuckGo via `ddgs`)
  - `analyze_code` (AST-based Python analysis and lightweight JS/Java metrics)
- **History management**: list sessions, show a session, clear old or all history
- **Streaming output**: optional streaming for responses
- **Interactive config wizard**: `hashcli --config` for provider, model, and API key setup

## Configuration

Hash CLI loads configuration in this order (highest to lowest):

1. CLI flags
2. Environment variables (`HASHCLI_` prefix)
3. User config (`~/.hashcli/config.toml`)
4. System config (`/etc/hashcli/config.toml` on Unix)
5. Defaults

Provider key fallbacks:
- `OPENAI_API_KEY`
- `ANTHROPIC_API_KEY`
- `GOOGLE_API_KEY` or `GEMINI_API_KEY`

Useful flags:

```bash
hashcli --model gpt-5-mini
hashcli --provider anthropic
hashcli --no-confirm
hashcli --quiet
hashcli --show-config
```

## Safety Notes

- Shell execution and file writes require confirmation by default.
- LLM tool calls are checked against allow/deny lists and dangerous patterns.
- Shell operators (`|` and `;`) are blocked unless explicitly enabled.