Metadata-Version: 2.4
Name: qubecli
Version: 1.0.0
Summary: QubeCore CLI — Command Line Interface for QubeCore
License: MIT License
        
        Copyright (c) 2026 QubeCore Project
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Requires-Python: >=3.11
Requires-Dist: qubecore-client>=1.0.10
Requires-Dist: typer>=0.12.0
Provides-Extra: dev
Requires-Dist: mypy>=1.8.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Description-Content-Type: text/markdown

# QubeCli

Command Line Interface for QubeCore — Quantum Computing Operating System.

## Overview

QubeCli provides a terminal-based interface for submitting and managing
quantum jobs on QubeCore. Built on [qubecore-client](https://github.com/sdt-quantum/qubecore-client).

## Requirements

- Python 3.11+
- QubeCore Server running and accessible

## Installation

```bash
pip install qubecli
```

## Quick Start

```bash
# Set server address
qubecore config set host 192.168.1.100:50051

# Submit a job (use single quotes to avoid shell interpretation of \n)
qubecore submit --backend backend1 --circuit 'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q[2];\ncreg c[2];\nh q[0];\ncx q[0],q[1];\nmeasure q -> c;' --shots 100

# Check status
qubecore status --job-id <job_id>

# Fetch result
qubecore result --job-id <job_id>

# Cancel job
qubecore cancel --job-id <job_id>
```

## Commands

### Version

```bash
qubecore -v
qubecore --version
```

### Server Configuration

```bash
qubecore config set host 192.168.1.100:50051
qubecore config get
qubecore config get host
qubecore config unset host
```

### Job Commands

```bash
# Submit
qubecore submit --backend <backend> --circuit <circuit_string> --shots <n>
qubecore submit --backend backend1 --circuit '...' --shots 100 --priority 2 --optimization-level 1

# Status
qubecore status --job-id <job_id>

# Result
qubecore result --job-id <job_id>

# Cancel (PENDING 상태일 때만 가능)
qubecore cancel --job-id <job_id>
```

One-time server override:

```bash
qubecore --host 10.0.0.1:50051 submit --backend backend1 --circuit "..." --shots 100
```

## Options

### `submit`

| Option | Required | Description |
|--------|----------|-------------|
| `--backend` | Yes | 백엔드 이름 (`backend1`, `kreo.sc-20` 등) |
| `--circuit` | Yes | 회로 문자열 (QASM2/QASM3/JSON) |
| `--shots` | Yes | 실행 횟수 |
| `--priority` | No | 우선순위 1~4 (1=CRITICAL, 2=HIGH, 3=NORMAL, 4=LOW) |
| `--optimization-level` | No | 최적화 레벨 0~3 |

## Compatibility

| qubecli | qubecore-client | qubecore |
|---------|----------------|----------|
| 1.x | 1.x | 1.x |

## License

MIT
