Codex commited on
Commit ·
1ec08ab
1
Parent(s): 3cbb16e
Deploy SQuADDS ML inference API
Browse files- README.md +59 -0
- deployment_manifest.json +52 -2
- examples/predict_transmon_hamiltonian_response.json +32 -0
README.md
CHANGED
|
@@ -9,14 +9,73 @@ license: mit
|
|
| 9 |
|
| 10 |
Auto-generated deployment bundle for serving ML_qubit_design models with a FastAPI app.
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
## Endpoints
|
| 13 |
|
| 14 |
- `GET /health`
|
| 15 |
- `GET /models`
|
| 16 |
- `POST /predict`
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
## Included Models
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
- `transmon_cross_hamiltonian_inverse`: Inverse model that predicts TransmonCross geometry parameters from target Hamiltonian values.
|
| 21 |
|
| 22 |
## Skipped Models
|
|
|
|
| 9 |
|
| 10 |
Auto-generated deployment bundle for serving ML_qubit_design models with a FastAPI app.
|
| 11 |
|
| 12 |
+
## Live URLs
|
| 13 |
+
|
| 14 |
+
- Space repo: https://huggingface.co/spaces/SQuADDS/squadds-ml-inference-api
|
| 15 |
+
- Space host: https://squadds-squadds-ml-inference-api.hf.space
|
| 16 |
+
|
| 17 |
## Endpoints
|
| 18 |
|
| 19 |
- `GET /health`
|
| 20 |
- `GET /models`
|
| 21 |
- `POST /predict`
|
| 22 |
|
| 23 |
+
## Quickstart
|
| 24 |
+
|
| 25 |
+
List models:
|
| 26 |
+
|
| 27 |
+
```bash
|
| 28 |
+
curl https://squadds-squadds-ml-inference-api.hf.space/models
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
## Included Models
|
| 32 |
|
| 33 |
+
Run a sample prediction:
|
| 34 |
+
|
| 35 |
+
```bash
|
| 36 |
+
curl -X POST \
|
| 37 |
+
https://squadds-squadds-ml-inference-api.hf.space/predict \
|
| 38 |
+
-H 'Content-Type: application/json' \
|
| 39 |
+
-d '{"model_id": "transmon_cross_hamiltonian_inverse", "inputs": {"qubit_frequency_GHz": 4.85, "anharmonicity_MHz": -205.0}, "options": {"include_scaled_outputs": false}}'
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
Sample response:
|
| 43 |
+
|
| 44 |
+
```json
|
| 45 |
+
{
|
| 46 |
+
"model_id": "transmon_cross_hamiltonian_inverse",
|
| 47 |
+
"display_name": "TransmonCross Hamiltonian to Geometry",
|
| 48 |
+
"predictions": [
|
| 49 |
+
{
|
| 50 |
+
"design_options.connection_pads.readout.claw_length": 0.00011072495544794947,
|
| 51 |
+
"design_options.connection_pads.readout.ground_spacing": 4.571595582092414e-06,
|
| 52 |
+
"design_options.cross_length": 0.0002005973074119538
|
| 53 |
+
}
|
| 54 |
+
],
|
| 55 |
+
"metadata": {
|
| 56 |
+
"input_order": [
|
| 57 |
+
"qubit_frequency_GHz",
|
| 58 |
+
"anharmonicity_MHz"
|
| 59 |
+
],
|
| 60 |
+
"output_order": [
|
| 61 |
+
"design_options.connection_pads.readout.claw_length",
|
| 62 |
+
"design_options.connection_pads.readout.ground_spacing",
|
| 63 |
+
"design_options.cross_length"
|
| 64 |
+
],
|
| 65 |
+
"input_units": {
|
| 66 |
+
"qubit_frequency_GHz": "GHz",
|
| 67 |
+
"anharmonicity_MHz": "MHz"
|
| 68 |
+
},
|
| 69 |
+
"output_units": {
|
| 70 |
+
"design_options.connection_pads.readout.claw_length": "m",
|
| 71 |
+
"design_options.connection_pads.readout.ground_spacing": "m",
|
| 72 |
+
"design_options.cross_length": "m"
|
| 73 |
+
},
|
| 74 |
+
"num_predictions": 1
|
| 75 |
+
}
|
| 76 |
+
}
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
- `transmon_cross_hamiltonian_inverse`: Inverse model that predicts TransmonCross geometry parameters from target Hamiltonian values.
|
| 80 |
|
| 81 |
## Skipped Models
|
deployment_manifest.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
| 1 |
{
|
| 2 |
-
"generated_at": "2026-04-10T23:
|
| 3 |
"space": {
|
| 4 |
"repo_id": "SQuADDS/squadds-ml-inference-api",
|
| 5 |
"title": "SQuADDS ML Inference API",
|
| 6 |
"sdk": "docker",
|
| 7 |
"app_port": 7860,
|
| 8 |
-
"license": "mit"
|
|
|
|
|
|
|
| 9 |
},
|
| 10 |
"models": [
|
| 11 |
{
|
|
@@ -29,6 +31,48 @@
|
|
| 29 |
"design_options.connection_pads.readout.ground_spacing": "m",
|
| 30 |
"design_options.cross_length": "m"
|
| 31 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
"status": "ready",
|
| 33 |
"status_detail": "",
|
| 34 |
"tags": [
|
|
@@ -52,6 +96,8 @@
|
|
| 52 |
"y_scaler_pattern": "scalers/scaler_y_{name}_one_hot_encoding.save",
|
| 53 |
"input_units": {},
|
| 54 |
"output_units": {},
|
|
|
|
|
|
|
| 55 |
"status": "missing_model_artifact",
|
| 56 |
"status_detail": "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",
|
| 57 |
"tags": [
|
|
@@ -75,6 +121,8 @@
|
|
| 75 |
"y_scaler_pattern": "scalers/scaler_y_{name}_one_hot_encoding.save",
|
| 76 |
"input_units": {},
|
| 77 |
"output_units": {},
|
|
|
|
|
|
|
| 78 |
"status": "missing_model_artifact",
|
| 79 |
"status_detail": "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",
|
| 80 |
"tags": [
|
|
@@ -98,6 +146,8 @@
|
|
| 98 |
"y_scaler_pattern": "scalers/scaler_y_{name}_one_hot_encoding.save",
|
| 99 |
"input_units": {},
|
| 100 |
"output_units": {},
|
|
|
|
|
|
|
| 101 |
"status": "missing_model_artifact",
|
| 102 |
"status_detail": "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",
|
| 103 |
"tags": [
|
|
|
|
| 1 |
{
|
| 2 |
+
"generated_at": "2026-04-10T23:45:49.011908+00:00",
|
| 3 |
"space": {
|
| 4 |
"repo_id": "SQuADDS/squadds-ml-inference-api",
|
| 5 |
"title": "SQuADDS ML Inference API",
|
| 6 |
"sdk": "docker",
|
| 7 |
"app_port": 7860,
|
| 8 |
+
"license": "mit",
|
| 9 |
+
"host": "https://squadds-squadds-ml-inference-api.hf.space",
|
| 10 |
+
"repo_url": "https://huggingface.co/spaces/SQuADDS/squadds-ml-inference-api"
|
| 11 |
},
|
| 12 |
"models": [
|
| 13 |
{
|
|
|
|
| 31 |
"design_options.connection_pads.readout.ground_spacing": "m",
|
| 32 |
"design_options.cross_length": "m"
|
| 33 |
},
|
| 34 |
+
"sample_request": {
|
| 35 |
+
"model_id": "transmon_cross_hamiltonian_inverse",
|
| 36 |
+
"inputs": {
|
| 37 |
+
"qubit_frequency_GHz": 4.85,
|
| 38 |
+
"anharmonicity_MHz": -205.0
|
| 39 |
+
},
|
| 40 |
+
"options": {
|
| 41 |
+
"include_scaled_outputs": false
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"sample_response": {
|
| 45 |
+
"model_id": "transmon_cross_hamiltonian_inverse",
|
| 46 |
+
"display_name": "TransmonCross Hamiltonian to Geometry",
|
| 47 |
+
"predictions": [
|
| 48 |
+
{
|
| 49 |
+
"design_options.connection_pads.readout.claw_length": 0.00011072495544794947,
|
| 50 |
+
"design_options.connection_pads.readout.ground_spacing": 4.571595582092414e-06,
|
| 51 |
+
"design_options.cross_length": 0.0002005973074119538
|
| 52 |
+
}
|
| 53 |
+
],
|
| 54 |
+
"metadata": {
|
| 55 |
+
"input_order": [
|
| 56 |
+
"qubit_frequency_GHz",
|
| 57 |
+
"anharmonicity_MHz"
|
| 58 |
+
],
|
| 59 |
+
"output_order": [
|
| 60 |
+
"design_options.connection_pads.readout.claw_length",
|
| 61 |
+
"design_options.connection_pads.readout.ground_spacing",
|
| 62 |
+
"design_options.cross_length"
|
| 63 |
+
],
|
| 64 |
+
"input_units": {
|
| 65 |
+
"qubit_frequency_GHz": "GHz",
|
| 66 |
+
"anharmonicity_MHz": "MHz"
|
| 67 |
+
},
|
| 68 |
+
"output_units": {
|
| 69 |
+
"design_options.connection_pads.readout.claw_length": "m",
|
| 70 |
+
"design_options.connection_pads.readout.ground_spacing": "m",
|
| 71 |
+
"design_options.cross_length": "m"
|
| 72 |
+
},
|
| 73 |
+
"num_predictions": 1
|
| 74 |
+
}
|
| 75 |
+
},
|
| 76 |
"status": "ready",
|
| 77 |
"status_detail": "",
|
| 78 |
"tags": [
|
|
|
|
| 96 |
"y_scaler_pattern": "scalers/scaler_y_{name}_one_hot_encoding.save",
|
| 97 |
"input_units": {},
|
| 98 |
"output_units": {},
|
| 99 |
+
"sample_request": null,
|
| 100 |
+
"sample_response": null,
|
| 101 |
"status": "missing_model_artifact",
|
| 102 |
"status_detail": "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",
|
| 103 |
"tags": [
|
|
|
|
| 121 |
"y_scaler_pattern": "scalers/scaler_y_{name}_one_hot_encoding.save",
|
| 122 |
"input_units": {},
|
| 123 |
"output_units": {},
|
| 124 |
+
"sample_request": null,
|
| 125 |
+
"sample_response": null,
|
| 126 |
"status": "missing_model_artifact",
|
| 127 |
"status_detail": "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",
|
| 128 |
"tags": [
|
|
|
|
| 146 |
"y_scaler_pattern": "scalers/scaler_y_{name}_one_hot_encoding.save",
|
| 147 |
"input_units": {},
|
| 148 |
"output_units": {},
|
| 149 |
+
"sample_request": null,
|
| 150 |
+
"sample_response": null,
|
| 151 |
"status": "missing_model_artifact",
|
| 152 |
"status_detail": "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",
|
| 153 |
"tags": [
|
examples/predict_transmon_hamiltonian_response.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_id": "transmon_cross_hamiltonian_inverse",
|
| 3 |
+
"display_name": "TransmonCross Hamiltonian to Geometry",
|
| 4 |
+
"predictions": [
|
| 5 |
+
{
|
| 6 |
+
"design_options.connection_pads.readout.claw_length": 0.00011072495544794947,
|
| 7 |
+
"design_options.connection_pads.readout.ground_spacing": 4.571595582092414e-06,
|
| 8 |
+
"design_options.cross_length": 0.0002005973074119538
|
| 9 |
+
}
|
| 10 |
+
],
|
| 11 |
+
"metadata": {
|
| 12 |
+
"input_order": [
|
| 13 |
+
"qubit_frequency_GHz",
|
| 14 |
+
"anharmonicity_MHz"
|
| 15 |
+
],
|
| 16 |
+
"output_order": [
|
| 17 |
+
"design_options.connection_pads.readout.claw_length",
|
| 18 |
+
"design_options.connection_pads.readout.ground_spacing",
|
| 19 |
+
"design_options.cross_length"
|
| 20 |
+
],
|
| 21 |
+
"input_units": {
|
| 22 |
+
"qubit_frequency_GHz": "GHz",
|
| 23 |
+
"anharmonicity_MHz": "MHz"
|
| 24 |
+
},
|
| 25 |
+
"output_units": {
|
| 26 |
+
"design_options.connection_pads.readout.claw_length": "m",
|
| 27 |
+
"design_options.connection_pads.readout.ground_spacing": "m",
|
| 28 |
+
"design_options.cross_length": "m"
|
| 29 |
+
},
|
| 30 |
+
"num_predictions": 1
|
| 31 |
+
}
|
| 32 |
+
}
|