Metadata-Version: 2.4
Name: qart-qiskit-provider
Version: 2.0.1
Summary: Quantum Art Qiskit Provider for the QaaS platform
Author: Quantum Art Ltd.
Author-email: Quantum Art Ltd. <info@quantum-art.tech>
License-Expression: LicenseRef-Quantum-Art-Proprietary
License-File: LICENSE
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: qiskit>=2.2.3
Requires-Dist: httpx>=0.28.0
Requires-Python: >=3.12
Project-URL: Homepage, https://quantum-art.tech
Description-Content-Type: text/markdown

# Quantum Art Qiskit Provider

Run Qiskit circuits on Quantum Art backends.

## Requirements

- Python 3.12 or newer
- Qiskit 2.2.3 or newer
- A Quantum Art API token

## Installation

```bash
pip install qart-qiskit-provider
```

## Quick Start

Open the Quantum Art dashboard at https://qaas.quantum-art.tech.

Set your API token once:

```bash
export QART_API_KEY=your-token
```

On Windows PowerShell:

```powershell
$env:QART_API_KEY = "your-token"
```

Then submit a circuit:

```python
from qiskit import QuantumCircuit
from qart.qiskit_provider import QartProvider

provider = QartProvider()
backend = provider.get_backend("Montage-E")

# Some example Circuit (Bell state).
circuit = QuantumCircuit(2, 2)
circuit.h(0)
circuit.cx(0, 1)
circuit.measure([0, 1], [0, 1])

# Execute the circuit asynchronously
job = backend.run(circuit, shots=100)

# Poll for job results
result = job.result()

print(result.get_counts())
```

You can also pass the token directly when needed:

```python
provider = QartProvider(access_token="your-token")
```

## Backends

List the backends available to your account:

```python
print([backend.name for backend in provider.backends()])
```

Select a backend by name:

```python
backend = provider.get_backend("Montage-E")
```

## Job Options

`backend.run()` accepts these options:

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `shots` | `int` | `100` | Number of executions |
| `query_timeout` | number or `None` | `None` | Maximum seconds to wait for a result |
| `parameters` | `dict` | `{}` | Backend execution options |
| `metadata` | `dict[str, str]` | `{}` | Job labels or other annotations |

When `query_timeout` is `None`, `job.result()` waits until the job finishes.

Example:

```python
job = backend.run(
    circuit,
    shots=100,
    parameters={"ideal_simulation": True},
    metadata={"label": "calibration-run"},
)
```

`parameters` must be JSON-serializable. `metadata` keys and values must be strings.

## Jobs

```python
job = backend.run(circuit, shots=100)

print(job.job_id())
print(job.status())

result = job.result(timeout=120)
print(result.get_counts())

job.cancel()
```

You can also manage a job by ID:

```python
job_id = job.job_id()

status = backend.status(job_id)
result = backend.result(job_id, query_timeout=120)
backend.cancel(job_id)
```

## Logging

The SDK is quiet by default. To enable diagnostic logs:

```python
import logging
from qart.qiskit_provider import configure_diagnostic_logging

configure_diagnostic_logging(logging.DEBUG)
```

## Documentation

For more product guidance, see the Quantum Art documentation:

- https://qaas.quantum-art.tech/user/docs
- https://qaas.quantum-art.tech/user/docs/quick-start

## Troubleshooting

**Authentication error**: Check that `QART_API_KEY` is set correctly, or pass `access_token` directly to `QartProvider`.

**Backend not found**: Use `provider.backends()` to list the backend names available to your account.

**Circuit too large**: Reduce the number of qubits or reduce the number of shots.

**Timeout**: Increase `query_timeout` or check the job status later with `backend.status(job_id)`.
