Metadata-Version: 2.4
Name: qart-qiskit-provider
Version: 2.0.3
Summary: Quantum Art Qiskit Provider for the QaaS platform
Keywords: qiskit,quantum,sdk,provider,quantum-art
Author: Quantum Art Ltd.
Author-email: Quantum Art Ltd. <info@quantum-art.tech>
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software 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
Classifier: Topic :: Scientific/Engineering
Requires-Dist: qiskit>=2.2.3
Requires-Dist: httpx>=0.28.0
Requires-Python: >=3.12
Project-URL: Homepage, https://www.quantum-art.tech
Project-URL: Documentation, https://qaas.quantum-art.tech/documentation
Project-URL: Dashboard, https://qaas.quantum-art.tech
Description-Content-Type: text/markdown

# Quantum Art Qiskit Provider

Run Qiskit circuits on Quantum Art backends through the Quantum Art QaaS platform.

This package provides a Qiskit `BackendV2` provider for submitting quantum
circuits, listing available Quantum Art backends, polling jobs, retrieving
Qiskit `Result` objects, and cancelling jobs.

## Requirements

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

## Installation

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

## Quick Start

Open the Quantum Art dashboard at https://qaas.quantum-art.tech and create an
API token.

Set the token once in your shell:

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

On Windows PowerShell:

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

You can also pass the token directly when creating the provider:

```python
from qart.qiskit_provider import QartProvider

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

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

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

circuit = QuantumCircuit(2, 2)
circuit.h(0)
circuit.cx(0, 1)
circuit.measure([0, 1], [0, 1])

job = backend.run(circuit, shots=100)
result = job.result()

print(job.job_id())
print(result.get_counts())
```

## 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()` follows the Qiskit `BackendV2` form:

```python
job = backend.run(circuit, **options)
```

Supported options:

| Option | Type | Default | Description                           |
| --- | --- | --- |---------------------------------------|
| `shots` | `int` | `100` | Number of executions                  |
| `query_timeout` | number or `None` | `None` | Maximum seconds to wait for a result  |
| `label` | `str` | | Label your circuit                    |
| `ideal_simulation` | `bool` | server default: `False` | Optionally run with no noise          |
| `compile` | `bool` | server default: `True` | Optionally enable or disable compiler |
| `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.
`parameters` is reserved for future or backend-specific execution options.

Examples:

```python
job = backend.run(
    circuit,
    shots=100,
    label="my-amazing-circuit",
)
```

Run with explicit backend execution options:

```python
job = backend.run(
    circuit,
    shots=100,
    label="my-amazing-circuit",
    ideal_simulation=True,
    compile=False,
)
```

`parameters` must be JSON-serializable. `metadata` keys and values must be strings.
If a top-level alias name is also present inside `parameters` or `metadata`, the
SDK raises an error instead of choosing one value.

## 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

- Website: https://www.quantum-art.tech/
- Docs: https://qaas.quantum-art.tech/documentation
- QaaS dashboard: https://qaas.quantum-art.tech/

## 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)`.

## License

This project is licensed under the Apache License, Version 2.0. See
[`LICENSE`](LICENSE).

Quantum Art and the Quantum Art logo are trademarks or registered trademarks of
Quantum Art Ltd. The Apache License 2.0 does not grant trademark rights.
