File size: 2,726 Bytes
1621ff9
7d2a23e
1621ff9
7d2a23e
 
1621ff9
 
7d2a23e
 
 
 
1ec08ab
 
 
 
 
7d2a23e
 
 
 
 
 
1ec08ab
 
 
 
 
 
 
 
7d2a23e
 
1ec08ab
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7d2a23e
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
title: SQuADDS ML Inference API
sdk: docker
app_port: 7860
license: mit
---

# SQuADDS ML Inference API

Auto-generated deployment bundle for serving ML_qubit_design models with a FastAPI app.

## Live URLs

- Space repo: https://huggingface.co/spaces/SQuADDS/squadds-ml-inference-api
- Space host: https://squadds-squadds-ml-inference-api.hf.space

## Endpoints

- `GET /health`
- `GET /models`
- `POST /predict`

## Quickstart

List models:

```bash
curl https://squadds-squadds-ml-inference-api.hf.space/models
```

## Included Models

Run a sample prediction:

```bash
curl -X POST \
  https://squadds-squadds-ml-inference-api.hf.space/predict \
  -H 'Content-Type: application/json' \
  -d '{"model_id": "transmon_cross_hamiltonian_inverse", "inputs": {"qubit_frequency_GHz": 4.85, "anharmonicity_MHz": -205.0}, "options": {"include_scaled_outputs": false}}'
```

Sample response:

```json
{
  "model_id": "transmon_cross_hamiltonian_inverse",
  "display_name": "TransmonCross Hamiltonian to Geometry",
  "predictions": [
    {
      "design_options.connection_pads.readout.claw_length": 0.00011072495544794947,
      "design_options.connection_pads.readout.ground_spacing": 4.571595582092414e-06,
      "design_options.cross_length": 0.0002005973074119538
    }
  ],
  "metadata": {
    "input_order": [
      "qubit_frequency_GHz",
      "anharmonicity_MHz"
    ],
    "output_order": [
      "design_options.connection_pads.readout.claw_length",
      "design_options.connection_pads.readout.ground_spacing",
      "design_options.cross_length"
    ],
    "input_units": {
      "qubit_frequency_GHz": "GHz",
      "anharmonicity_MHz": "MHz"
    },
    "output_units": {
      "design_options.connection_pads.readout.claw_length": "m",
      "design_options.connection_pads.readout.ground_spacing": "m",
      "design_options.cross_length": "m"
    },
    "num_predictions": 1
  }
}
```

- `transmon_cross_hamiltonian_inverse`: Inverse model that predicts TransmonCross geometry parameters from target Hamiltonian values.

## Skipped Models

- `transmon_cross_cap_matrix_inverse`: No model checkpoint found. Expected one of: model/best_keras_model_one_hot_encoding.keras, model/best_keras_model_surrogate_defined_loss.keras, model/best_keras_model_model2_surrogate.keras
- `coupler_ncap_cap_matrix_inverse`: No model checkpoint found. Expected one of: model/best_keras_model_one_hot_encoding.keras, model/best_keras_model_surrogate_defined_loss.keras, model/best_keras_model_model2_surrogate.keras
- `cavity_claw_route_meander_inverse`: No model checkpoint found. Expected one of: model/best_keras_model_one_hot_encoding.keras, model/best_keras_model_surrogate.keras, model/best_keras_model_model2_surrogate.keras