Skip to content

Results are limited to the current section: Cloud services

Product news

Create Run

POST
/api/v1/portfolio-optimization/runs
curl --request POST \
--url https://example.com/api/v1/portfolio-optimization/runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "project_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "tickers": [ "example" ], "risk_weight": 0.5, "price_history": "1y", "solver": { "drive_shaping": "proportional_diagonal", "bayesian_search_n_calls": 20, "shots": 200, "do_preprocessing": true, "do_postprocessing": true, "penalty_norm": 100, "n_bits": 1, "remote_backend": "EMU_MPS" } }'
Media typeapplication/json
CreatePortfolioRunSchema
object
project_id
required
Project Id

Project to submit the run's Batch/Job under.

string format: uuid
tickers
required
Tickers
Array<string>
>= 3 items <= 20 items
risk_weight
Risk Weight
number
default: 0.5 <= 1
price_history
Price History

Price history used to estimate returns and covariances.

string
default: 2y
Allowed values: 1y 2y 5y
solver
SolverSettingsSchema

Forwarded to quantum_solver - keep its SolverSettings in sync.

object
drive_shaping
Drive Shaping
string
default: proportional_diagonal
Allowed values: proportional_diagonal local_energy_scale bayesian_search
bayesian_search_n_calls
Bayesian Search N Calls
integer
default: 20 >= 12 <= 100
shots
Shots
integer
default: 200 >= 50 <= 1000
do_preprocessing
Do Preprocessing
boolean
default: true
do_postprocessing
Do Postprocessing
boolean
default: true
penalty_norm
Penalty Norm
number
default: 100 <= 1000
n_bits
N Bits
integer
default: 1 >= 1 <= 3
remote_backend
Remote Backend
string
default: EMU_MPS
Allowed values: QPU EMU_MPS EMU_SV EMU_FREE
device
Any of:
DeviceTypeName

Enumeration of allowed and legacy device type names

string
Allowed values: EMU_FREE EMU_SV EMU_TN EMU_C FRESNEL FRESNEL_CAN1 FRESNEL_SA1 FRESNEL8 EMU_FRESNEL FRESNEL_RD FRESNEL2_RD EMU_MPS

Successful Response

Media typeapplication/json
NonPaginatedResponse[ProducedPortfolioRunSummarySchema]
object
data
Any of:
ProducedPortfolioRunSummarySchema
object
id
required
Id
string format: uuid
status
required
PortfolioRunStatus
string
Allowed values: pre_processing pending running post_processing done error
created_at
required
Created At
string
tickers
required
Tickers
Array<string>
risk_weight
required
Risk Weight
number
Example
{
"data": {
"status": "pre_processing"
}
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}