wings-quantum 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wings/__init__.py +251 -0
- wings/adam.py +132 -0
- wings/ansatz.py +207 -0
- wings/benchmarks.py +605 -0
- wings/campaign.py +661 -0
- wings/cli.py +377 -0
- wings/compat.py +132 -0
- wings/config.py +443 -0
- wings/convenience.py +259 -0
- wings/evaluators/__init__.py +19 -0
- wings/evaluators/cpu.py +72 -0
- wings/evaluators/custatevec.py +783 -0
- wings/evaluators/gpu.py +220 -0
- wings/export.py +243 -0
- wings/optimizer.py +1898 -0
- wings/paths.py +295 -0
- wings/py.typed +2 -0
- wings/results.py +255 -0
- wings/types.py +14 -0
- wings_quantum-0.1.0.dist-info/METADATA +491 -0
- wings_quantum-0.1.0.dist-info/RECORD +25 -0
- wings_quantum-0.1.0.dist-info/WHEEL +5 -0
- wings_quantum-0.1.0.dist-info/entry_points.txt +2 -0
- wings_quantum-0.1.0.dist-info/licenses/LICENSE.txt +21 -0
- wings_quantum-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: wings-quantum
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Wavepacket Initialization on Neighboring Grid States - GPU-accelerated variational quantum state preparation
|
|
5
|
+
Author-email: Joshua Courtney <joshuamcourtney@gmail.com>
|
|
6
|
+
Maintainer-email: Your Name <joshuamcourtney@gmail.com>
|
|
7
|
+
Project-URL: Homepage, https://github.com/jmcourtneyuga/wings
|
|
8
|
+
Project-URL: Documentation, https://github.com/jmcourtneyuga/wings
|
|
9
|
+
Project-URL: Repository, https://github.com/jmcourtneyuga/wings.git
|
|
10
|
+
Project-URL: Issues, https://github.com/jmcourtneyuga/wings/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/jmcourtneyuga/wings/blob/main/CHANGELOG.md
|
|
12
|
+
Keywords: quantum computing,variational quantum algorithms,quantum state preparation,gaussian wavefunction,wavepacket,qiskit,cuQuantum,GPU acceleration,VQA,quantum simulation
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
24
|
+
Classifier: Typing :: Typed
|
|
25
|
+
Requires-Python: >=3.9
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE.txt
|
|
28
|
+
Requires-Dist: numpy>=1.20
|
|
29
|
+
Requires-Dist: scipy>=1.7
|
|
30
|
+
Requires-Dist: qiskit>=1.0
|
|
31
|
+
Requires-Dist: matplotlib>=3.5
|
|
32
|
+
Provides-Extra: gpu
|
|
33
|
+
Requires-Dist: qiskit-aer>=0.13; extra == "gpu"
|
|
34
|
+
Requires-Dist: cuquantum-python>=23.0; extra == "gpu"
|
|
35
|
+
Requires-Dist: cupy-cuda11x>=12.0; extra == "gpu"
|
|
36
|
+
Provides-Extra: dev
|
|
37
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
38
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
39
|
+
Requires-Dist: pytest-timeout>=2.0; extra == "dev"
|
|
40
|
+
Requires-Dist: pytest-xdist>=3.0; extra == "dev"
|
|
41
|
+
Requires-Dist: hypothesis>=6.0; extra == "dev"
|
|
42
|
+
Requires-Dist: ruff>=0.1; extra == "dev"
|
|
43
|
+
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
44
|
+
Requires-Dist: pre-commit>=3.0; extra == "dev"
|
|
45
|
+
Requires-Dist: pylatexenc>=2.0; extra == "dev"
|
|
46
|
+
Provides-Extra: docs
|
|
47
|
+
Requires-Dist: sphinx>=7.0; extra == "docs"
|
|
48
|
+
Requires-Dist: sphinx-rtd-theme>=1.3; extra == "docs"
|
|
49
|
+
Requires-Dist: nbsphinx>=0.9; extra == "docs"
|
|
50
|
+
Requires-Dist: myst-parser>=2.0; extra == "docs"
|
|
51
|
+
Provides-Extra: all
|
|
52
|
+
Requires-Dist: wings-quantum[dev,docs,gpu]; extra == "all"
|
|
53
|
+
Dynamic: license-file
|
|
54
|
+
|
|
55
|
+
# WINGS: Wavepacket Initialization on Neighboring Grid States
|
|
56
|
+
|
|
57
|
+
[](https://www.python.org/downloads/)
|
|
58
|
+
[](https://opensource.org/licenses/MIT)
|
|
59
|
+
[](https://developer.nvidia.com/cuda-toolkit)
|
|
60
|
+
|
|
61
|
+
**WINGS** is a high-performance, GPU-accelerated variational quantum state preparation toolkit for preparing continuous wavepacket states on discrete qubit grids.
|
|
62
|
+
It enables researchers to achieve machine-precision fidelities (>0.999999999) when
|
|
63
|
+
encoding Gaussian, Lorentzian, and other continuous wavefunctions into quantum circuits.
|
|
64
|
+
|
|
65
|
+
This degree of precision is not (!) a guarantee, seeing as the optimization landscape is full of barren plateaus and local minima.
|
|
66
|
+
This is another reason why you can perform multiple jobs and batched jobs.
|
|
67
|
+
|
|
68
|
+
## Documentation
|
|
69
|
+
|
|
70
|
+
See [DOCUMENTATION.md] for the full API reference and guides.
|
|
71
|
+
|
|
72
|
+
## Overview
|
|
73
|
+
|
|
74
|
+
Quantum algorithms for simulating continuous systems—such as molecular dynamics, quantum field theories, and wave propagation—require encoding continuous wavefunctions onto discrete qubit registers. WINGS addresses this challenge by providing:
|
|
75
|
+
|
|
76
|
+
- **Variational quantum circuits** optimized to prepare target wavepackets with ultra-high fidelity
|
|
77
|
+
- **GPU acceleration** via NVIDIA cuStateVec (cuQuantum) for 5–20x speedups over CPU
|
|
78
|
+
- **Multi-GPU support** for scaling to larger qubit counts
|
|
79
|
+
- **Production-grade tooling** for running thousands of optimization campaigns with automatic checkpointing
|
|
80
|
+
|
|
81
|
+
## Features
|
|
82
|
+
|
|
83
|
+
### Target Wavefunctions
|
|
84
|
+
|
|
85
|
+
- **Gaussian**: Standard Gaussian wavepackets with configurable width (σ) and center (x₀)
|
|
86
|
+
- **Lorentzian**: Cauchy distributions for heavy-tailed profiles
|
|
87
|
+
- **Hyperbolic Secant**: Soliton-like profiles for nonlinear dynamics
|
|
88
|
+
- **Custom Functions**: Any user-defined wavefunction via callback
|
|
89
|
+
|
|
90
|
+
### Acceleration Backends
|
|
91
|
+
|
|
92
|
+
| Backend | Description | Speedup |
|
|
93
|
+
|---------|-------------|---------|
|
|
94
|
+
| CPU | Qiskit Statevector (baseline) | 1x |
|
|
95
|
+
| GPU (Aer) | Qiskit Aer with CUDA | 2–5x |
|
|
96
|
+
| cuStateVec | NVIDIA cuQuantum direct API | 5–20x |
|
|
97
|
+
| Multi-GPU | Parallel cuStateVec across GPUs | Linear scaling |
|
|
98
|
+
|
|
99
|
+
### Optimization Methods
|
|
100
|
+
|
|
101
|
+
- **L-BFGS-B**: Quasi-Newton method for high-precision convergence
|
|
102
|
+
- **Adam**: Momentum-based optimizer for escaping local minima
|
|
103
|
+
- **Basin Hopping**: Global optimization with local refinement
|
|
104
|
+
- **Hybrid Pipelines**: Adaptive multi-stage optimization
|
|
105
|
+
|
|
106
|
+
### Production Features
|
|
107
|
+
|
|
108
|
+
- Automatic checkpointing and resume for long campaigns
|
|
109
|
+
- Parallel campaign execution with configurable strategies
|
|
110
|
+
- Comprehensive result aggregation and statistical analysis
|
|
111
|
+
- Cross-platform path management for HPC clusters
|
|
112
|
+
|
|
113
|
+
## Installation
|
|
114
|
+
|
|
115
|
+
### Prerequisites
|
|
116
|
+
|
|
117
|
+
- Python 3.9 or higher
|
|
118
|
+
- Qiskit 1.0+
|
|
119
|
+
- NumPy, SciPy
|
|
120
|
+
|
|
121
|
+
### Basic Installation
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
pip install wings-quantum
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### With GPU Support
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# Install CUDA toolkit (11.0+) first, then:
|
|
131
|
+
pip install wings-quantum[gpu]
|
|
132
|
+
|
|
133
|
+
# For cuStateVec acceleration (recommended):
|
|
134
|
+
pip install cuquantum-python cupy-cuda11x
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### From Source
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
git clone https://github.com/jmcourtneyuga/wings.git
|
|
141
|
+
cd wings
|
|
142
|
+
pip install -e ".[dev,gpu]"
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Verify Installation
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# Check available backends
|
|
149
|
+
python -c "from wings import print_backend_info; print_backend_info()"
|
|
150
|
+
|
|
151
|
+
# Or use the CLI
|
|
152
|
+
gso info
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Quick Start
|
|
156
|
+
|
|
157
|
+
### Basic Optimization
|
|
158
|
+
|
|
159
|
+
```python
|
|
160
|
+
from wings import GaussianOptimizer, OptimizerConfig
|
|
161
|
+
|
|
162
|
+
# Configure the optimization
|
|
163
|
+
config = OptimizerConfig(
|
|
164
|
+
n_qubits=8, # 2^8 = 256 grid points
|
|
165
|
+
sigma=0.5, # Gaussian width
|
|
166
|
+
use_custatevec=True, # Enable GPU acceleration
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
# Create optimizer and run
|
|
170
|
+
optimizer = GaussianOptimizer(config)
|
|
171
|
+
results = optimizer.optimize_ultra_precision(target_infidelity=1e-10)
|
|
172
|
+
|
|
173
|
+
print(f"Fidelity achieved: {results['fidelity']:.12f}")
|
|
174
|
+
print(f"Infidelity (1-F): {results['infidelity']:.3e}")
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### High-Level Convenience API
|
|
178
|
+
|
|
179
|
+
```python
|
|
180
|
+
from wings import optimize_gaussian_state
|
|
181
|
+
|
|
182
|
+
results, optimizer = optimize_gaussian_state(
|
|
183
|
+
n_qubits=10,
|
|
184
|
+
sigma=0.5,
|
|
185
|
+
target_infidelity=1e-11,
|
|
186
|
+
max_time=3600, # 1 hour
|
|
187
|
+
plot=True,
|
|
188
|
+
save=True,
|
|
189
|
+
)
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Production Campaign
|
|
193
|
+
|
|
194
|
+
```python
|
|
195
|
+
from wings import run_production_campaign
|
|
196
|
+
|
|
197
|
+
results = run_production_campaign(
|
|
198
|
+
n_qubits=8,
|
|
199
|
+
sigma=0.5,
|
|
200
|
+
total_runs=1000,
|
|
201
|
+
target_infidelity=1e-11,
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
results.print_summary()
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Custom Target Wavefunction
|
|
208
|
+
|
|
209
|
+
```python
|
|
210
|
+
import numpy as np
|
|
211
|
+
from wings import OptimizerConfig, GaussianOptimizer, TargetFunction
|
|
212
|
+
|
|
213
|
+
# Define a double-Gaussian wavepacket
|
|
214
|
+
def double_gaussian(x):
|
|
215
|
+
return np.exp(-((x - 1)**2) / 0.5) + np.exp(-((x + 1)**2) / 0.5)
|
|
216
|
+
|
|
217
|
+
config = OptimizerConfig(
|
|
218
|
+
n_qubits=10,
|
|
219
|
+
target_function=TargetFunction.CUSTOM,
|
|
220
|
+
custom_target_fn=double_gaussian,
|
|
221
|
+
box_size=5.0,
|
|
222
|
+
)
|
|
223
|
+
|
|
224
|
+
optimizer = GaussianOptimizer(config)
|
|
225
|
+
results = optimizer.optimize_ultra_precision(target_infidelity=1e-9)
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Custom Ansatz
|
|
229
|
+
|
|
230
|
+
```python
|
|
231
|
+
from wings import CustomHardwareEfficientAnsatz, OptimizerConfig, GaussianOptimizer
|
|
232
|
+
|
|
233
|
+
# Create a custom hardware-efficient ansatz
|
|
234
|
+
ansatz = CustomHardwareEfficientAnsatz(
|
|
235
|
+
n_qubits=8,
|
|
236
|
+
layers=6,
|
|
237
|
+
entanglement='circular', # 'linear', 'circular', or 'full'
|
|
238
|
+
rotation_gates=['ry', 'rz'],
|
|
239
|
+
)
|
|
240
|
+
|
|
241
|
+
config = OptimizerConfig(
|
|
242
|
+
n_qubits=8,
|
|
243
|
+
sigma=0.5,
|
|
244
|
+
ansatz=ansatz,
|
|
245
|
+
use_custatevec=True,
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
optimizer = GaussianOptimizer(config)
|
|
249
|
+
results = optimizer.run_optimization()
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### Exporting Optimized Circuits:
|
|
253
|
+
|
|
254
|
+
from wings import GaussianOptimizer, OptimizerConfig
|
|
255
|
+
|
|
256
|
+
# Run optimization
|
|
257
|
+
config = OptimizerConfig(n_qubits=8, sigma=0.5)
|
|
258
|
+
optimizer = GaussianOptimizer(config)
|
|
259
|
+
results = optimizer.optimize_ultra_precision(target_infidelity=1e-10)
|
|
260
|
+
|
|
261
|
+
# Get the optimized circuit
|
|
262
|
+
circuit = optimizer.get_optimized_circuit()
|
|
263
|
+
print(circuit.draw())
|
|
264
|
+
|
|
265
|
+
# Export to OpenQASM 2.0
|
|
266
|
+
qasm_str = optimizer.export_qasm()
|
|
267
|
+
print(qasm_str)
|
|
268
|
+
|
|
269
|
+
# Export to OpenQASM 3.0
|
|
270
|
+
qasm3_str = optimizer.export_qasm(version=3)
|
|
271
|
+
|
|
272
|
+
# Save to file (various formats)
|
|
273
|
+
optimizer.save_circuit("gaussian_prep.qasm") # OpenQASM 2.0
|
|
274
|
+
optimizer.save_circuit("gaussian_prep.qasm3", format='qasm3') # OpenQASM 3.0
|
|
275
|
+
optimizer.save_circuit("gaussian_prep.qpy", format='qpy') # Qiskit QPY
|
|
276
|
+
optimizer.save_circuit("gaussian_prep.png", format='png') # Circuit diagram
|
|
277
|
+
|
|
278
|
+
## Command-Line Interface
|
|
279
|
+
|
|
280
|
+
WINGS includes a full CLI for common tasks:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
# Run optimization
|
|
284
|
+
gso optimize --qubits 8 --sigma 0.5 --target-infidelity 1e-10
|
|
285
|
+
|
|
286
|
+
# Run production campaign
|
|
287
|
+
gso campaign --qubits 8 --sigma 0.5 --runs 1000 --resume
|
|
288
|
+
|
|
289
|
+
# Benchmark GPU performance
|
|
290
|
+
gso benchmark --qubits 12
|
|
291
|
+
|
|
292
|
+
# Find GPU crossover point
|
|
293
|
+
gso crossover --min-qubits 6 --max-qubits 18
|
|
294
|
+
|
|
295
|
+
# Show backend information
|
|
296
|
+
gso info
|
|
297
|
+
|
|
298
|
+
# List/load campaigns
|
|
299
|
+
gso campaigns list
|
|
300
|
+
gso campaigns load campaign_q8_s0.50_20250203_120000
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
## Configuration
|
|
304
|
+
|
|
305
|
+
### Environment Variables
|
|
306
|
+
|
|
307
|
+
| Variable | Description | Default |
|
|
308
|
+
|----------|-------------|---------|
|
|
309
|
+
| `GSO_BASE_DIR` | Base directory for all data | `~/.wings` |
|
|
310
|
+
| `GSO_CACHE_DIR` | Coefficient cache directory | `$GSO_BASE_DIR/cache` |
|
|
311
|
+
| `GSO_OUTPUT_DIR` | Simulation outputs | `$GSO_BASE_DIR/output` |
|
|
312
|
+
| `GSO_CHECKPOINT_DIR` | Optimization checkpoints | `$GSO_BASE_DIR/checkpoints` |
|
|
313
|
+
| `GSO_CAMPAIGN_DIR` | Campaign results | `$GSO_BASE_DIR/campaigns` |
|
|
314
|
+
|
|
315
|
+
### HPC Cluster Support
|
|
316
|
+
|
|
317
|
+
WINGS automatically detects common HPC scratch directories:
|
|
318
|
+
|
|
319
|
+
- `/scratch/$USER` (SLURM)
|
|
320
|
+
- `/work/$USER` (PBS/Torque)
|
|
321
|
+
- `/gpfs/scratch/$USER` (GPFS)
|
|
322
|
+
- `/lustre/scratch/$USER` (Lustre)
|
|
323
|
+
- `$SCRATCH` and `$WORK` environment variables
|
|
324
|
+
|
|
325
|
+
## Project Structure
|
|
326
|
+
|
|
327
|
+
```
|
|
328
|
+
wings/
|
|
329
|
+
├── src/
|
|
330
|
+
│ └── wings/
|
|
331
|
+
│ ├── __init__.py # Public API and lazy imports
|
|
332
|
+
│ ├── py.typed # PEP 561 marker
|
|
333
|
+
│ ├── optimizer.py # Core GaussianOptimizer class
|
|
334
|
+
│ ├── config.py # Configuration dataclasses
|
|
335
|
+
│ ├── ansatz.py # Quantum circuit ansatz implementations
|
|
336
|
+
│ ├── campaign.py # Large-scale campaign management
|
|
337
|
+
│ ├── results.py # Result tracking and analysis
|
|
338
|
+
│ ├── adam.py # Adam optimizer implementation
|
|
339
|
+
│ ├── convenience.py # High-level convenience functions
|
|
340
|
+
│ ├── cli.py # Command-line interface
|
|
341
|
+
│ ├── benchmarks.py # Performance benchmarking
|
|
342
|
+
│ ├── paths.py # Cross-platform path management
|
|
343
|
+
│ ├── compat.py # cuQuantum compatibility layer
|
|
344
|
+
│ ├── types.py # Type aliases
|
|
345
|
+
│ └── evaluators/
|
|
346
|
+
│ ├── __init__.py
|
|
347
|
+
│ ├── cpu.py # Thread-safe CPU evaluator
|
|
348
|
+
│ ├── gpu.py # Qiskit Aer GPU evaluator
|
|
349
|
+
│ └── custatevec.py # NVIDIA cuStateVec evaluator
|
|
350
|
+
├── tests/
|
|
351
|
+
│ ├── conftest.py # Shared fixtures
|
|
352
|
+
│ ├── unit/ # Unit tests
|
|
353
|
+
│ └── integration/ # Integration tests
|
|
354
|
+
├── docs/ # Sphinx documentation
|
|
355
|
+
├── examples/ # Example notebooks and scripts
|
|
356
|
+
├── pyproject.toml
|
|
357
|
+
├── Makefile
|
|
358
|
+
├── README.md
|
|
359
|
+
├── DOCUMENTATION.md
|
|
360
|
+
├── CHANGELOG.md
|
|
361
|
+
└── LICENSE
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
## Performance
|
|
365
|
+
|
|
366
|
+
### Typical Results
|
|
367
|
+
|
|
368
|
+
| Qubits | Grid Points | Parameters | GPU Time | Best Infidelity |
|
|
369
|
+
|--------|-------------|------------|----------|-----------------|
|
|
370
|
+
| 4 | 16 | 16 | ~1000s | 1e-10
|
|
371
|
+
| 5 | 32 | 25 | ~1500s | 1e-8 |
|
|
372
|
+
| 8 | 256 | 64 | ~3000s | 1e-6 |
|
|
373
|
+
|
|
374
|
+
### Benchmarking
|
|
375
|
+
|
|
376
|
+
```python
|
|
377
|
+
from wings import benchmark_gpu, find_gpu_crossover
|
|
378
|
+
|
|
379
|
+
# Benchmark specific configuration
|
|
380
|
+
result = benchmark_gpu(n_qubits=12, sigma=0.5)
|
|
381
|
+
print(f"GPU speedup: {result.results['custatevec']['speedup_vs_cpu']:.1f}x")
|
|
382
|
+
|
|
383
|
+
# Find crossover point where GPU becomes faster
|
|
384
|
+
crossover = find_gpu_crossover(qubit_range=range(6, 18, 2))
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
## API Reference
|
|
388
|
+
|
|
389
|
+
### Core Classes
|
|
390
|
+
|
|
391
|
+
- **`GaussianOptimizer`**: Main optimizer class with all optimization methods
|
|
392
|
+
- **`OptimizerConfig`**: Configuration for single optimizations
|
|
393
|
+
- **`CampaignConfig`**: Configuration for large-scale campaigns
|
|
394
|
+
- **`CampaignResults`**: Aggregated results from campaigns
|
|
395
|
+
- **`OptimizationPipeline`**: Multi-stage optimization configuration
|
|
396
|
+
|
|
397
|
+
### Ansatz Classes
|
|
398
|
+
|
|
399
|
+
- **`DefaultAnsatz`**: Standard hardware-efficient ansatz with RY rotations and linear CNOT entanglement
|
|
400
|
+
- **`CustomHardwareEfficientAnsatz`**: Configurable ansatz with multiple entanglement patterns
|
|
401
|
+
- **`AnsatzProtocol`**: Protocol for implementing custom ansatze
|
|
402
|
+
|
|
403
|
+
### Evaluators
|
|
404
|
+
|
|
405
|
+
- **`ThreadSafeCircuitEvaluator`**: CPU-based thread-safe evaluator
|
|
406
|
+
- **`GPUCircuitEvaluator`**: Qiskit Aer GPU evaluator
|
|
407
|
+
- **`CuStateVecEvaluator`**: Single-GPU cuStateVec evaluator
|
|
408
|
+
- **`BatchedCuStateVecEvaluator`**: Batched GPU evaluation
|
|
409
|
+
- **`MultiGPUBatchEvaluator`**: Multi-GPU parallel evaluator
|
|
410
|
+
|
|
411
|
+
### Convenience Functions
|
|
412
|
+
|
|
413
|
+
- **`optimize_gaussian_state()`**: High-level optimization with sensible defaults
|
|
414
|
+
- **`quick_optimize()`**: Fast optimization for testing
|
|
415
|
+
- **`run_production_campaign()`**: Launch large-scale campaigns
|
|
416
|
+
- **`load_campaign_results()`**: Load saved campaign results
|
|
417
|
+
- **`list_campaigns()`**: List available campaigns
|
|
418
|
+
|
|
419
|
+
### Exporting
|
|
420
|
+
|
|
421
|
+
- **`build_optimized_circuit()`**: Build a QuantumCircuit with bound parameters
|
|
422
|
+
- **`export_to_qasm()`**: Export to OpenQASM 2.0 string
|
|
423
|
+
- **`export_to_qasm3()`**: Export to OpenQASM 3.0 string
|
|
424
|
+
- **`save_circuit()`**: Save circuit to file (QASM, QPY, PNG, SVG, PDF)
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
## Development
|
|
428
|
+
|
|
429
|
+
### Setup
|
|
430
|
+
|
|
431
|
+
```bash
|
|
432
|
+
git clone https://github.com/jmcourtneyuga/wings.git
|
|
433
|
+
cd wings
|
|
434
|
+
pip install -e ".[dev]"
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
### Running Tests
|
|
438
|
+
|
|
439
|
+
```bash
|
|
440
|
+
# Fast unit tests
|
|
441
|
+
make test
|
|
442
|
+
|
|
443
|
+
# All tests including integration
|
|
444
|
+
make test-all
|
|
445
|
+
|
|
446
|
+
# With coverage
|
|
447
|
+
make coverage
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
### Code Quality
|
|
451
|
+
|
|
452
|
+
```bash
|
|
453
|
+
# Format and lint
|
|
454
|
+
make format
|
|
455
|
+
make lint
|
|
456
|
+
|
|
457
|
+
# Full check (format + lint + test)
|
|
458
|
+
make check
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
## Contributing
|
|
462
|
+
|
|
463
|
+
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
464
|
+
|
|
465
|
+
## Citation
|
|
466
|
+
|
|
467
|
+
If you use WINGS in your research, please cite:
|
|
468
|
+
|
|
469
|
+
```bibtex
|
|
470
|
+
@software{wings2026,
|
|
471
|
+
title={WINGS: Wavepacket Initialization on Neighboring Grid States},
|
|
472
|
+
author={Joshua Courtney},
|
|
473
|
+
year={2026},
|
|
474
|
+
url={https://github.com/jmcourtneyuga/wings}
|
|
475
|
+
}
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
## License
|
|
479
|
+
|
|
480
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
481
|
+
|
|
482
|
+
## Acknowledgments
|
|
483
|
+
|
|
484
|
+
- [Qiskit](https://qiskit.org/) for the quantum circuit framework
|
|
485
|
+
- [NVIDIA cuQuantum](https://developer.nvidia.com/cuquantum-sdk) for GPU acceleration
|
|
486
|
+
- [CuPy](https://cupy.dev/) for GPU array operations
|
|
487
|
+
|
|
488
|
+
## See Also
|
|
489
|
+
|
|
490
|
+
- [Full Documentation](DOCUMENTATION.md) - Detailed API documentation and guides
|
|
491
|
+
- [Examples](examples/) - Jupyter notebooks and scripts
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
wings/__init__.py,sha256=pLICaGXkT5YrxfYcZs2dQE4BtScJtbI1a4PmKSdHulk,7191
|
|
2
|
+
wings/adam.py,sha256=Yru4S66l6uCoWBiQh2GjHLW7eDrV4HMgOqVBo-9X0GA,4128
|
|
3
|
+
wings/ansatz.py,sha256=292RM_vkt28SZvqXHRAwANZgd8URroSPtK7eGQUsXhY,6705
|
|
4
|
+
wings/benchmarks.py,sha256=DdKYiK17xFBRPu98sDuPztoe3NREUP2Qo9P9sWmEzrI,17506
|
|
5
|
+
wings/campaign.py,sha256=J6EJ2UDq42bmzAhrhKPw9d9dozL8-HizCIjBHJawYS0,24018
|
|
6
|
+
wings/cli.py,sha256=mQBlvXSZkNTHHcaFuquLtsZqqyswxJjKPbvHvpV4o3Y,10393
|
|
7
|
+
wings/compat.py,sha256=WGNiSDNjSBoKQ1FSfVEyTEfF43z3_g43zhRhjTN7tTs,3882
|
|
8
|
+
wings/config.py,sha256=-LQbNcNHncubgp5AGfi750IPI6x5linGCqt1wZjNjUc,14523
|
|
9
|
+
wings/convenience.py,sha256=vxRATMv9yIN9rsvQIw2vNY31rrlAEtDAk1UxLbUWTMU,8150
|
|
10
|
+
wings/export.py,sha256=lihJ6lS9zKBUj9jwCXPnUXyQmAI8FUkpVaDqCWKDilA,6579
|
|
11
|
+
wings/optimizer.py,sha256=mDdmVPlerIS4BAPPWvF4O6s68RF-6hk-u_hm3tuhc1Q,76698
|
|
12
|
+
wings/paths.py,sha256=Pu2SSuWjiZwE09wFPSx0WMMnwToS5JqK3JWgqaLLUvk,10032
|
|
13
|
+
wings/py.typed,sha256=Y3QpSe9qtWcL1vKplcWdRY0cn5071TLJQWBO0QbxTm8,84
|
|
14
|
+
wings/results.py,sha256=pvfQw7WVSTXTuPQ_Ne9ktpg8XLcmvYM8to9yTR7gdq8,9524
|
|
15
|
+
wings/types.py,sha256=T57MVbbA_0k1bKSNS6dMu8CnrIvweLBf22lUQux7Oa0,292
|
|
16
|
+
wings/evaluators/__init__.py,sha256=kQYb2GE0CCFxk00Rl5eqE6IUHwkT4oKpyK4W35Kpdh0,482
|
|
17
|
+
wings/evaluators/cpu.py,sha256=zOIhpTyeVl3l3GO-812spPrC9Iab5y8dnLOIvlrNCPg,2707
|
|
18
|
+
wings/evaluators/custatevec.py,sha256=lL_OwZN6jdKx_9UkcCW86ux_Z1Pl8Hpw5VwfpXihlgg,27425
|
|
19
|
+
wings/evaluators/gpu.py,sha256=AzaA5dVJVkLum4LCHH_15yhYNYjXvDiF_dfbYqe-ql8,7527
|
|
20
|
+
wings_quantum-0.1.0.dist-info/licenses/LICENSE.txt,sha256=omczQTVMzXdIpw4Zqea8K6lKnZGV0sKOUiv0goFaxGk,1075
|
|
21
|
+
wings_quantum-0.1.0.dist-info/METADATA,sha256=0LmAgCvJ0lAZJd9h5v-2wqQwtDxyzGZ40bbA3tkOLuU,15369
|
|
22
|
+
wings_quantum-0.1.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
23
|
+
wings_quantum-0.1.0.dist-info/entry_points.txt,sha256=EyDWtAiTb_FrlYRjg7iVofIJDBjKxQ1yC8-DDrrlP-Q,41
|
|
24
|
+
wings_quantum-0.1.0.dist-info/top_level.txt,sha256=BL_U5mIGslHqe_fn24qeBxF-Y5PoirlCh49eOhd6Joo,6
|
|
25
|
+
wings_quantum-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 WINGS Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wings
|