Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Thank you for your interest in contributing to SuperQuantX! We welcome contribut

### Prerequisites

- Python 3.9 or higher
- Python 3.11 or higher
- Git
- [uv](https://github.com/astral-sh/uv) (recommended) or pip
- Basic understanding of quantum computing concepts
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ SuperQuantX provides unified access to **all major quantum computing platforms**
| **TKET** | Quantinuum | ✅ H-Series | ✅ |
| **Ocean** | D-Wave | ✅ Advantage | ✅ |

> **Python**: SuperQuantX requires **Python 3.11+**. See [backend compatibility](docs/BACKENDS.md#backend-version-compatibility) for optional-extra version floors.

## 🤖 Quantum Agents

Pre-built autonomous agents for complex problem solving:
Expand Down
16 changes: 16 additions & 0 deletions docs/BACKENDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,22 @@ G = nx.complete_graph(4)
result = ocean_backend.solve_max_cut(G, num_reads=1000)
```


## Backend Version Compatibility

Declared optional-extra floors (PyPI majors verified 2026-09-04). Installs target **Python ≥3.11**.

| Extra | Packages (declared floor) | Latest verified | Notes |
|-------|---------------------------|-----------------|-------|
| `pennylane` | `pennylane>=0.45.0`, `pennylane-lightning>=0.45.0` | 0.45.1 / 0.45.0 | Requires Python ≥3.11 |
| `qiskit` | `qiskit>=2.0,<3`, `qiskit-aer>=0.17.0`, `qiskit-ibm-runtime>=0.49.0` | 2.5.2 / 0.17.2 / 0.49.0 | Explicit Qiskit **2.x** policy (not open-ended ≥1.0) |
| `cirq` | `cirq>=1.7.0` | 1.7.0 | Requires Python ≥3.11 |
| `braket` | `amazon-braket-sdk>=1.127.0` | 1.127.0 | Requires Python ≥3.11 |
| `tket` | `pytket>=2.18.0`, `pytket-qiskit>=0.78.0` | 2.18.1 / 0.78.0 | pytket 2.x |
| `ocean` | `dwave-ocean-sdk>=9.0.0`, `dimod>=0.12.22` | 9.4.0 / 0.12.22 | Ocean 9.x |

Core scientific stack floors stay **3.11-compatible** (NumPy/SciPy latest majors that need Python ≥3.12 are intentionally not forced).

## Installation Requirements

### Core Backends (Included)
Expand Down
2 changes: 1 addition & 1 deletion docs/development/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Thank you for your interest in contributing to SuperQuantX! This guide will help

### Prerequisites

- Python 3.9 or higher
- Python 3.11 or higher
- Git
- Basic understanding of quantum computing concepts
- Familiarity with Python package development
Expand Down
10 changes: 5 additions & 5 deletions docs/development/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,14 +276,14 @@ dynamic = ["version"]
description = "Experimental quantum AI research platform"
authors = [{name = "SuperXLab Research Team"}]
license = {text = "Apache-2.0"}
requires-python = ">=3.9"
requires-python = ">=3.11"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Physics",
]
```
Expand Down Expand Up @@ -316,11 +316,11 @@ build:

requirements:
host:
- python >=3.9
- python >=3.11
- pip
- setuptools
run:
- python >=3.9
- python >=3.11
- numpy >=1.21.0
- scipy >=1.7.0
- matplotlib >=3.5.0
Expand Down
4 changes: 2 additions & 2 deletions docs/development/standards.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ class TestQuantumGates:
# pyproject.toml
[tool.black]
line-length = 88
target-version = ['py39', 'py310', 'py311']
target-version = ['py311', 'py312', 'py313']
include = '\.pyi?$'
extend-exclude = '''
/(
Expand Down Expand Up @@ -520,7 +520,7 @@ per-file-ignores =
```ini
# mypy.ini
[mypy]
python_version = 3.9
python_version = 3.11
warn_return_any = True
warn_unused_configs = True
disallow_untyped_defs = True
Expand Down
2 changes: 1 addition & 1 deletion docs/development/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, 3.10, 3.11]
python-version: [3.11, 3.12, 3.13]

steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ This guide provides detailed instructions for installing SuperQuantX in various
- **Windows**: Windows 10 or Windows 11

### Python Requirements
- **Python**: 3.10, 3.11, or 3.12
- **Python**: 3.11, 3.12, or 3.13
- **pip**: 21.0 or later (for proper dependency resolution)

!!! warning "Python Version Important"
SuperQuantX requires Python 3.10+ due to dependencies in quantum frameworks. Python 3.9 and earlier are not supported.
SuperQuantX requires Python 3.11+ due to dependencies in quantum frameworks. Python 3.10 and earlier are not supported.

### Hardware Requirements
- **RAM**: Minimum 4GB, recommended 8GB+
Expand Down Expand Up @@ -301,7 +301,7 @@ print(f"Test successful! Results: {result['counts']}")

#### Python Version Issues

**Problem**: `SuperQuantX requires Python 3.10+`
**Problem**: `SuperQuantX requires Python 3.11+`

**Solutions**:
```bash
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Get up and running with SuperQuantX in just 5 minutes! This guide will take you

## 📦 Installation

SuperQuantX requires Python 3.10 or higher. Install it using pip:
SuperQuantX requires Python 3.11 or higher. Install it using pip:

=== "Basic Installation"

Expand Down
35 changes: 17 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "superquantx"
dynamic = ["version"]
description = "Quantum AI Research Platform - Unified API for QuantumAgentic AIsystems research"
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.11"
license = { text = "Apache-2.0" }
authors = [
{ name = "Shashi Jagtap", email = "shashi@super-agentic.ai" },
Expand Down Expand Up @@ -41,9 +41,9 @@ classifiers = [
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering",
Expand All @@ -58,7 +58,7 @@ dependencies = [
"scipy>=1.12.0",
"scikit-learn>=1.4.0",
"matplotlib>=3.8.0",
"networkx>=3.2.0",
"networkx>=3.3.0",

# Modern Python utilities - latest versions
"pydantic>=2.5.0",
Expand All @@ -67,34 +67,33 @@ dependencies = [
"loguru>=0.7.2",
"httpx>=0.25.0",
"click>=8.0.0",
"typing-extensions>=4.9.0; python_version<'3.11'",
"PyYAML>=6.0.0",
]

[project.optional-dependencies]
# Quantum computing backends - latest versions
pennylane = [
"pennylane>=0.35.0",
"pennylane-lightning>=0.35.0",
"pennylane>=0.45.0",
"pennylane-lightning>=0.45.0",
]
qiskit = [
"qiskit>=1.0.0",
"qiskit-aer>=0.13.0",
"qiskit-ibm-runtime>=0.20.0",
"qiskit>=2.0,<3",
"qiskit-aer>=0.17.0",
"qiskit-ibm-runtime>=0.49.0",
]
cirq = [
"cirq>=1.3.0",
"cirq>=1.7.0",
]
braket = [
"amazon-braket-sdk>=1.75.0",
"amazon-braket-sdk>=1.127.0",
]
tket = [
"pytket>=1.25.0",
"pytket-qiskit>=0.50.0",
"pytket>=2.18.0",
"pytket-qiskit>=0.78.0",
]
ocean = [
"dwave-ocean-sdk>=7.0.0",
"dimod>=0.12.14",
"dwave-ocean-sdk>=9.0.0",
"dimod>=0.12.22",
]

# Development dependencies - latest versions
Expand Down Expand Up @@ -162,7 +161,7 @@ exclude = [
# Ruff configuration (replaces flake8, isort, and some black functionality)
[tool.ruff]
line-length = 88
target-version = "py310"
target-version = "py311"
exclude = [
".bzr",
".direnv",
Expand Down Expand Up @@ -213,7 +212,7 @@ lines-after-imports = 2

[tool.black]
line-length = 88
target-version = ['py39', 'py310', 'py311', 'py312']
target-version = ['py311', 'py312', 'py313']
include = '\.pyi?$'
extend-exclude = '''
/(
Expand All @@ -231,7 +230,7 @@ extend-exclude = '''
'''

[tool.mypy]
python_version = "3.9"
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
Expand Down
38 changes: 26 additions & 12 deletions src/superquantx/backends/qiskit_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,13 @@ def _initialize_backend(self) -> None:
logger.info(f"Initialized IBM Quantum backend: {self.device}")

else:
# Try to get backend from Aer
self.backend = Aer.get_backend(self.device)
# Prefer AerSimulator; device string may be an Aer method name
try:
self.backend = AerSimulator(method=self.device) if self.device not in (
'aer_simulator', 'qasm_simulator', 'statevector_simulator'
) else AerSimulator()
except Exception:
self.backend = AerSimulator()
logger.info(f"Initialized Aer backend: {self.device}")

except Exception as e:
Expand Down Expand Up @@ -213,8 +218,12 @@ def execute_circuit(self, circuit: Any, shots: int | None = None) -> dict[str, A
)

if not has_measurements:
circuit.add_register(ClassicalRegister(circuit.num_qubits, 'c'))
circuit.measure_all()
# create_circuit already adds ClassicalRegister('c'); avoid duplicate name
if circuit.num_clbits < circuit.num_qubits:
circuit.add_register(
ClassicalRegister(circuit.num_qubits - circuit.num_clbits, 'meas')
)
circuit.measure(range(circuit.num_qubits), range(circuit.num_qubits))

# Transpile circuit
transpiled = transpile(circuit, self.backend)
Expand Down Expand Up @@ -247,13 +256,18 @@ def get_statevector(self, circuit: Any) -> np.ndarray:
circuit_copy = circuit.copy()
circuit_copy.remove_final_measurements()

# Execute
job = execute(circuit_copy, backend, shots=1)
# Execute with BackendV2.run (qiskit.execute removed in Qiskit 2.x)
job = backend.run(circuit_copy, shots=1)
result = job.result()

# Get statevector
statevector = result.get_statevector()
return np.array(statevector.data)
# Prefer quantum_info.Statevector when available
try:
statevector = Statevector.from_instruction(circuit_copy)
return np.array(statevector.data)
except Exception:
statevector = result.get_statevector()
data = getattr(statevector, 'data', statevector)
return np.array(data)

except Exception as e:
logger.error(f"Statevector computation failed: {e}")
Expand Down Expand Up @@ -329,10 +343,10 @@ def compute_kernel_matrix(self, X1: np.ndarray, X2: np.ndarray,
circuit = QuantumCircuit(feature_map.num_qubits, feature_map.num_qubits)

# Encode first data point
circuit.compose(feature_map.bind_parameters(X1[i]), inplace=True)
circuit.compose(feature_map.assign_parameters(X1[i]), inplace=True)

# Encode second data point with inverse
inverse_map = feature_map.bind_parameters(-X2[j]).inverse()
inverse_map = feature_map.assign_parameters(-X2[j]).inverse()
circuit.compose(inverse_map, inplace=True)

# Measure
Expand Down Expand Up @@ -466,7 +480,7 @@ def get_version_info(self) -> dict[str, Any]:
import qiskit
info.update({
'qiskit_version': qiskit.__version__,
'backend_name': self.backend.name() if self.backend else 'Unknown',
'backend_name': (self.backend.name if hasattr(self.backend, 'name') else str(self.backend)) if self.backend else 'Unknown',
'backend_version': getattr(self.backend, 'version', 'Unknown'),
})
except Exception as e:
Expand Down
Loading
Loading