luna-quantum 0.0.29__py3-none-any.whl → 0.0.37__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.

Potentially problematic release.


This version of luna-quantum might be problematic. Click here for more details.

Files changed (36) hide show
  1. {luna_quantum-0.0.29.dist-info → luna_quantum-0.0.37.dist-info}/METADATA +1 -1
  2. {luna_quantum-0.0.29.dist-info → luna_quantum-0.0.37.dist-info}/RECORD +35 -33
  3. luna_sdk/controllers/luna_http_client.py +27 -0
  4. luna_sdk/controllers/luna_platform_client.py +34 -16
  5. luna_sdk/controllers/luna_q.py +5 -7
  6. luna_sdk/controllers/luna_solve.py +9 -7
  7. luna_sdk/controllers/luna_transform.py +13 -7
  8. luna_sdk/error/http_error_utils.py +10 -3
  9. luna_sdk/exceptions/encryption_exception.py +0 -6
  10. luna_sdk/interfaces/circuit_repo_i.py +0 -6
  11. luna_sdk/interfaces/optimization_repo_i.py +5 -4
  12. luna_sdk/interfaces/qpu_token_repo_i.py +18 -18
  13. luna_sdk/interfaces/solutions_repo_i.py +0 -6
  14. luna_sdk/repositories/circuit_repo.py +0 -11
  15. luna_sdk/repositories/optimization_repo.py +11 -10
  16. luna_sdk/repositories/qpu_token_repo.py +36 -27
  17. luna_sdk/repositories/solutions_repo.py +0 -8
  18. luna_sdk/schemas/create/circuit.py +0 -3
  19. luna_sdk/schemas/create/qpu_token.py +0 -3
  20. luna_sdk/schemas/create/solution.py +0 -1
  21. luna_sdk/schemas/enums/optimization.py +8 -7
  22. luna_sdk/schemas/enums/qpu_token_type.py +1 -1
  23. luna_sdk/schemas/optimization.py +53 -15
  24. luna_sdk/schemas/optimization_formats/qubo.py +8 -0
  25. luna_sdk/schemas/qpu_token.py +1 -5
  26. luna_sdk/schemas/rest/qpu_token/qpu_token_source.py +18 -0
  27. luna_sdk/schemas/rest/qpu_token/token_provider.py +47 -15
  28. luna_sdk/schemas/solution.py +89 -35
  29. luna_sdk/schemas/solver_parameters/dwave/base.py +4 -1
  30. luna_sdk/schemas/solver_parameters/dwave/quantum_annealing.py +13 -0
  31. luna_sdk/schemas/solver_parameters/dwave/repeated_reverse_quantum_annealing.py +13 -1
  32. luna_sdk/schemas/solver_parameters/dwave/tabu_search.py +2 -4
  33. luna_sdk/utils/qpu_tokens.py +14 -13
  34. luna_sdk/controllers/custom_login_client.py +0 -66
  35. {luna_quantum-0.0.29.dist-info → luna_quantum-0.0.37.dist-info}/LICENSE +0 -0
  36. {luna_quantum-0.0.29.dist-info → luna_quantum-0.0.37.dist-info}/WHEEL +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: luna-quantum
3
- Version: 0.0.29
3
+ Version: 0.0.37
4
4
  Summary: Python SDK for Aqarios' Luna Platform
5
5
  Home-page: https://aqarios.com/
6
6
  License: Apache-2.0
@@ -1,20 +1,20 @@
1
1
  luna_sdk/__init__.py,sha256=9s6JkcSeRF4WtFo80TelzXXHFhX8w7fXiaJr59V9ScM,100
2
2
  luna_sdk/controllers/__init__.py,sha256=ivTapH8np5mQeVEevxwsWawCtVSG4Wep72rNp7nEZXw,60
3
- luna_sdk/controllers/custom_login_client.py,sha256=1sc1h0vLoDEWhMIm3zWp03Ff54C3-9CK84KIM2t57a4,2240
4
- luna_sdk/controllers/luna_platform_client.py,sha256=1IRspVMkwcEaKYJhr1NDQ0kWXu7DnQ1tqQZunDOmVXo,1877
5
- luna_sdk/controllers/luna_q.py,sha256=IVaclfTQKPSY28rucssWsLSsmXHA5pS-CB_kmPLbchg,1230
6
- luna_sdk/controllers/luna_solve.py,sha256=nFSqgB0UEC8VLvfDl3Iinm8cfos08vWlEg8lVgzsMX0,1777
7
- luna_sdk/controllers/luna_transform.py,sha256=eFUU1RafYMUPZ-E_QZNQfYD-zMkcZOvwYtwgmvKHsXQ,1286
3
+ luna_sdk/controllers/luna_http_client.py,sha256=_q3_o-bjC61uQMnNTfbbGei0eNR_AoIv-2R1cYRfEgU,819
4
+ luna_sdk/controllers/luna_platform_client.py,sha256=EH1jxruuRKwaJ1Vos79PGT4-hwp7jdoSaRFKqjUMbZA,2406
5
+ luna_sdk/controllers/luna_q.py,sha256=cv28o2fYDSaI8iAsfMYWtR68mfuUDxY3jmBWY2KnkRk,1199
6
+ luna_sdk/controllers/luna_solve.py,sha256=ioMdB7Rlx-1-XB5WE5OT8oVlO_T1l5T64R-ccaNUCAA,1797
7
+ luna_sdk/controllers/luna_transform.py,sha256=7kdIp5oRMG1NQZ1hBSkcNrj-z6g_2dWvQZ4j8BK3M0A,1337
8
8
  luna_sdk/error/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- luna_sdk/error/http_error_utils.py,sha256=1-Q-W-_RaHKlA2zOXJLLaZamBWNQpf9Oc4SAX4hJdEk,3317
9
+ luna_sdk/error/http_error_utils.py,sha256=qZ4a43GVR35-bn3QTVmGZBJzEjieo43r36M2G5rfIyw,3509
10
10
  luna_sdk/exceptions/__init__.py,sha256=DSKaPN374rR2zccmpLvlqntxDsjFwgSexXtva795ae0,52
11
- luna_sdk/exceptions/encryption_exception.py,sha256=qe38EPRen4c63ti6bbA3jXl4PK48Ommi_cb2Lvhn8tg,264
11
+ luna_sdk/exceptions/encryption_exception.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  luna_sdk/exceptions/luna_exception.py,sha256=m7U3qFpP9Sc77Z3RG9I4bQXsJSQuVeBLvfHQWziC9sQ,114
13
13
  luna_sdk/exceptions/luna_server_exception.py,sha256=y4J1TzfMF_kmuh5g8hpP2k_SnV0acaxks8lg5EOvo0I,639
14
14
  luna_sdk/exceptions/timeout_exception.py,sha256=ppEGsUk-6NtBy2-RyBfzjR1IhDmIwPWwg03BOsET4OA,367
15
15
  luna_sdk/exceptions/transformation.py,sha256=lykEeWonvfvWAyU2DoKzR-GtFc-KEAvrfWlnWT9ylqc,381
16
16
  luna_sdk/interfaces/__init__.py,sha256=WwAzuNWP6SNMJk_U_Hqc5U2mRsG2_m-sSQZPMYUDWfY,213
17
- luna_sdk/interfaces/circuit_repo_i.py,sha256=65SSefsrpo_MKFTGkdT1o5PJ7pQ9n9tmSnunoQ_Mruo,1946
17
+ luna_sdk/interfaces/circuit_repo_i.py,sha256=Y3PZQDILT016UNwORBg51sgHFnDxMTgfQ0JXmEowoK0,1642
18
18
  luna_sdk/interfaces/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  luna_sdk/interfaces/clients/client_i.py,sha256=_I8mTIfavI3Yv7TPD9HsTxF3uI4WzDucFvgEb2EtOAo,185
20
20
  luna_sdk/interfaces/clients/luna_q_i.py,sha256=_DHDirve9yoVO8zb5i3WkTMx-LPu9TtasjF4OUfCaRw,765
@@ -23,56 +23,58 @@ luna_sdk/interfaces/clients/luna_transform_i.py,sha256=xpS2ODs83rICbA3oAKzf80rpB
23
23
  luna_sdk/interfaces/cplex_repo_i.py,sha256=a2CWG1m4YmQAlcM022Xfk09BHVmcd3y2H-GMr1N4vx8,3786
24
24
  luna_sdk/interfaces/info_repo_i.py,sha256=hCUYNoqjAKwz6l-61XtymX-UboosDX1RaTTiX64EXXc,1345
25
25
  luna_sdk/interfaces/lp_repo_i.py,sha256=hixIKvJ8jz9VOUi33B3K2VvFLcR7eKfeooJwktquyhc,3052
26
- luna_sdk/interfaces/optimization_repo_i.py,sha256=jaq6YXmFtUb6BbsLJos6B9VSzBUJ6YxgscNm6DyIl3M,6154
27
- luna_sdk/interfaces/qpu_token_repo_i.py,sha256=kokPGQj7k1E2UzG1W1ZycjET5ZPvjdQl1kqBT2vGTNM,4505
26
+ luna_sdk/interfaces/optimization_repo_i.py,sha256=4JZikxWTJZTX4tG85ydSP711WROQ5B8RtbvOp1EDvxE,6202
27
+ luna_sdk/interfaces/qpu_token_repo_i.py,sha256=OeF9PRcGBjHzNwrllt266M2ELJ7h03c7gt_16FPh4yg,4351
28
28
  luna_sdk/interfaces/repository_i.py,sha256=vJz8pbggkuLLC333qzjepj3TMPh49LUnyh3pJDlcGi0,287
29
- luna_sdk/interfaces/solutions_repo_i.py,sha256=YmQxgDGSLZNQ-P7jzlw1zTnut5Q1KVeRbcJEuocB3VQ,7767
29
+ luna_sdk/interfaces/solutions_repo_i.py,sha256=Xu-8qQkPoedIp47Uc0ogv5HS45Plsi6zRBEQouxRws0,7463
30
30
  luna_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
31
  luna_sdk/repositories/__init__.py,sha256=HxD02fpzlcIt5YkBHd7LwIp_eE6eFuAz2VDnlrakwJQ,169
32
- luna_sdk/repositories/circuit_repo.py,sha256=h3Moypl-pba8J-sNTBsOxnbKtu6RCmmX5c_4JnfQfCw,2552
32
+ luna_sdk/repositories/circuit_repo.py,sha256=gpjEmCRrl8UghJrelOt6VOULIJmM-thJAhf8oaA5Ckg,1964
33
33
  luna_sdk/repositories/cplex_repo.py,sha256=6vlx6YTJoDSWFSZDDNrPk3E7pa5WWGqG25bhTwQdqHQ,5098
34
34
  luna_sdk/repositories/info_repo.py,sha256=GzRW5RwhRJrNjujw8Y7vJY8vV_tHzbfwXo0viHuxqUM,1270
35
35
  luna_sdk/repositories/lp_repo.py,sha256=T44XMbdbW7k9a4z6JgIj1kb0bBZxepn-93vxdZOQa80,4370
36
- luna_sdk/repositories/optimization_repo.py,sha256=UHqJ_dZ9jyQF205naREyk10FUCuC6HfJ1dAxjMBS39M,6025
37
- luna_sdk/repositories/qpu_token_repo.py,sha256=_9r418j-wHksZ-cSNHeQb_slz7yn5WniovjV7qv2e0E,4343
38
- luna_sdk/repositories/solutions_repo.py,sha256=Q5Q30oRyUnayXkp4z_jPcjDpxYRoPjzWBWUqg2EAFWQ,9242
36
+ luna_sdk/repositories/optimization_repo.py,sha256=xHjMdXhzdwt9DtZG7AvGtUgOqWH142veOpAzaNe-nxk,6078
37
+ luna_sdk/repositories/qpu_token_repo.py,sha256=Mn3ojxXhLIC-zbjBzEJis6WKNHUYUVkex_qTcuXeQ3Y,4685
38
+ luna_sdk/repositories/solutions_repo.py,sha256=xI1KQ1JeleBJrBRFxfuxdusb_pgjBLeLhdpFi7nqdXY,8825
39
39
  luna_sdk/schemas/__init__.py,sha256=lTix3zUl2Z8ZLA2BTF4pls5S-kqlVZ3cIdAZwGxPSUI,248
40
40
  luna_sdk/schemas/circuit.py,sha256=r3Bv0lyhrvFoI3Gf8eq-PS3kyivTWY3IJmRH0X2LoCk,1067
41
41
  luna_sdk/schemas/create/__init__.py,sha256=7G2yflImpZJxHn3l4Op5CsQAxwKGmvWJSttq9kmiHq0,90
42
- luna_sdk/schemas/create/circuit.py,sha256=vV2r6xk24_aHe9oo0dt3wVeOHcyD02lXNR-YyjfQoEE,755
42
+ luna_sdk/schemas/create/circuit.py,sha256=zYtM6SV1QH4JzjYaAhrGNjdNn8EDYsdG1QKwayTqkEY,643
43
43
  luna_sdk/schemas/create/optimization.py,sha256=Z9pKoD0y6BjKvl8gQ6XK76bdvq8etvcoNU4RwxnUvHA,759
44
- luna_sdk/schemas/create/qpu_token.py,sha256=XE3WoNL3Q8QFEDshXoSrAKQXgT_zthKvihKqJHi8250,492
44
+ luna_sdk/schemas/create/qpu_token.py,sha256=_D_QtYOeZQ6b0lG5ALTDmyr4bU42bUZ8OJ0VdwadMNA,380
45
45
  luna_sdk/schemas/create/qubo.py,sha256=5Y_jWicEnoV82Ubc-f0a_qy9hCuPBumhsGWY8wzMIuA,293
46
- luna_sdk/schemas/create/solution.py,sha256=K97JHH-p5z0P_niTVX6YBPoDc0rgIpJG5O4uaUhcs48,410
46
+ luna_sdk/schemas/create/solution.py,sha256=zPPgm0wGwfn23ccgBoYs6SMTZNmbT_uO1po_je15WjA,386
47
47
  luna_sdk/schemas/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
48
  luna_sdk/schemas/enums/circuit.py,sha256=smz_DouDo_K8rs4N5aIOj2PS9w6DX1CFYX0bv6f6JFw,252
49
- luna_sdk/schemas/enums/optimization.py,sha256=K-lv6PLJ4qo4vNVEKHsLU1rEv-QnFfl_FlN1xqZOXUc,170
49
+ luna_sdk/schemas/enums/optimization.py,sha256=XtFdcfLxGe-MAL64itjxszhRkTcUzUf83tO-5DBVLeY,198
50
50
  luna_sdk/schemas/enums/problem.py,sha256=HWL6Lc1pqPtJ0J-rXkUTL6WHe2fiBY1ctuZvDnx1hmM,754
51
- luna_sdk/schemas/enums/qpu_token_type.py,sha256=UwaZoaCRAc2x_sLszRP55RwuU03u5GlJ-oK0u84Tbgo,119
51
+ luna_sdk/schemas/enums/qpu_token_type.py,sha256=KBRrB8ExuTTmpp48obxdJGWwWEHb7xgq9Ajjwptl1VY,105
52
52
  luna_sdk/schemas/enums/solution.py,sha256=Vax6MX62UDwApbwzf1nrhuFWw1Iiq77gUch7_1roCYo,114
53
53
  luna_sdk/schemas/enums/status.py,sha256=KHaOgePqB3GNhFYLo2Sp-JAEXBPN_ZVDmj2WobrT5N4,204
54
54
  luna_sdk/schemas/enums/timeframe.py,sha256=vwoZsgAYGvqF67qdcXMEnHkqbiRcVY5uK-4-ZTFcurI,238
55
55
  luna_sdk/schemas/error_message.py,sha256=svCs-mWQsp3BMEhzZFqskbyP6iS78eVUOPaiWFc4sEQ,307
56
- luna_sdk/schemas/optimization.py,sha256=cB57hs_7VsE8h4YQGj3XuX4Mqp3SZmnu2Y90s4jl1jw,2033
56
+ luna_sdk/schemas/optimization.py,sha256=X7Eb7K7ximWpmtIItn2sJEgxgN8dmlvuioQV-Q71BrY,3174
57
57
  luna_sdk/schemas/optimization_formats/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
58
58
  luna_sdk/schemas/optimization_formats/bqm.py,sha256=rrmiZYe_iEdgBFusJeJfY8PVSxgf1Wv79FgMQUm2YVs,910
59
59
  luna_sdk/schemas/optimization_formats/cqm.py,sha256=VZiNJy4yc-8o3gHoH0E-uaNOHj7UfAGCqznTzKBv0NQ,4257
60
60
  luna_sdk/schemas/optimization_formats/lp.py,sha256=iXFDBmHktHsYc79ngSraylCpa-EVMFwN01788fnjFzY,175
61
61
  luna_sdk/schemas/optimization_formats/qm.py,sha256=yUEZF7FOvXv1Mb5FMiX1q0Rk5w2ltrh7HInfFEiVSXU,912
62
+ luna_sdk/schemas/optimization_formats/qubo.py,sha256=YN-VbPGTgqOKJuJ7t_TT8H_WIWr1ifU974K98W9Blao,135
62
63
  luna_sdk/schemas/pretty_base.py,sha256=ZyVdwdY5JfmNlfqZDm6MdTs5roNGtv0Pe805r4N25Z4,1845
63
- luna_sdk/schemas/qpu_token.py,sha256=SRpqMynft7GwiOlEQCYkVQyfcbtm9szuXIHQRtgRU_s,1575
64
+ luna_sdk/schemas/qpu_token.py,sha256=CFKbAhFgo0G-LO_lameHH4-iOFUJWx9hmMWi3xQwURw,1508
64
65
  luna_sdk/schemas/representation.py,sha256=0RKVV0XxHOJZ1o9grxTq5ri3cGLziyCFObDwQuXIOEY,364
65
66
  luna_sdk/schemas/rest/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
67
  luna_sdk/schemas/rest/qpu_token/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
67
- luna_sdk/schemas/rest/qpu_token/token_provider.py,sha256=yDD17uIuio5FisarDBiGQwMpl-_QXRYttuFAZ9w-V00,1430
68
- luna_sdk/schemas/solution.py,sha256=IRtZneNRN5IbSEMHKHc0NYJ7lf74RxZTHoYJI7z2QoY,6871
68
+ luna_sdk/schemas/rest/qpu_token/qpu_token_source.py,sha256=EPMXHpgxqsQ4uJ1hlwe5gPdSsjuHEuKKAIMtBFgPJ1A,583
69
+ luna_sdk/schemas/rest/qpu_token/token_provider.py,sha256=3Gecn2AmN7E_wAPUac_c55Fg-LwdDKsgbwAN2-0msJU,2985
70
+ luna_sdk/schemas/solution.py,sha256=3I4J-7UXNV95kpK0yjB4iPdq2lx3KB_cZ81m4WNbWwg,8684
69
71
  luna_sdk/schemas/solver_info.py,sha256=ZUCdTI8zpPZ8EquLYyrLU35pZ4VkzcPUSYeQWkdijHM,799
70
72
  luna_sdk/schemas/solver_parameters/aws/__init__.py,sha256=CXjKWzgnP_d1_RvQUfWyaaWvsZ1FxLJN5K61QmRa-uw,33
71
73
  luna_sdk/schemas/solver_parameters/aws/optimizer_params.py,sha256=w0eg1SnTpKnuq48YG8JAC1LY0bxsTlZIJ2XbT2ySTHw,1374
72
74
  luna_sdk/schemas/solver_parameters/aws/qaoa.py,sha256=Mc7zfdWgLxh2Kb0r5OmL3RIkYlB1mnu6jUpmfYG2BBg,2290
73
75
  luna_sdk/schemas/solver_parameters/base_parameter.py,sha256=v8nk1aVKW_MaePxxNXXb3hcVDtzkQF1sGlvZ2YXXJVI,123
74
76
  luna_sdk/schemas/solver_parameters/dwave/__init__.py,sha256=yHsBQ5d1mCS90Y1JcTCOPjNCrEiGT23wI9GyPnYlIqo,2453
75
- luna_sdk/schemas/solver_parameters/dwave/base.py,sha256=PpPF49uT8XWzK-kRpkszYeFdFbksWkEDBqimq38-mzc,17281
77
+ luna_sdk/schemas/solver_parameters/dwave/base.py,sha256=z3zWZQAqDJU5dVY5sYTMe8Sxq92SIjhWlfBAmbsowE4,17364
76
78
  luna_sdk/schemas/solver_parameters/dwave/dialectic_search.py,sha256=CnXg7rcZ7mHkbSLrYXPot3-73YiWTRhkhyRmjZ_pvvs,1205
77
79
  luna_sdk/schemas/solver_parameters/dwave/kerberos.py,sha256=OPzCgo9h5845R3Sg_TrSkwp4gjoRKEHxhAhSdcJxY6c,2674
78
80
  luna_sdk/schemas/solver_parameters/dwave/leap_hybrid_bqm.py,sha256=foPfMJLQ0enO3omknKuqIxfZTXd9oIbfi_e-N0o2tmM,637
@@ -85,12 +87,12 @@ luna_sdk/schemas/solver_parameters/dwave/qaga.py,sha256=gVucZ_1feFb7aKl6W2m34_Hx
85
87
  luna_sdk/schemas/solver_parameters/dwave/qbsolv_like_qpu.py,sha256=d72lNLdtD-G6WtVGwqmCse9r_O3inDAbLc6tbDlyu-Y,554
86
88
  luna_sdk/schemas/solver_parameters/dwave/qbsolv_like_simulated_annealing.py,sha256=wo5Gt6A-N7APE2Nhz_eOhxmW7P_IYTzvdDKe-4kIMn4,976
87
89
  luna_sdk/schemas/solver_parameters/dwave/qbsolv_like_tabu_search.py,sha256=5r5piwo5BsAAlXmyqYMxXZDvgVTvjdJ2hVMr7-7h_lk,840
88
- luna_sdk/schemas/solver_parameters/dwave/quantum_annealing.py,sha256=h7HXAV67hdcsB0v00AcGNoMtb3pGjyjTG2HY-u3rsHg,631
89
- luna_sdk/schemas/solver_parameters/dwave/repeated_reverse_quantum_annealing.py,sha256=9QTkdgSesWVIfGo31uNMM0Xo-qIuL8XcmIOHlT4MzJU,3771
90
+ luna_sdk/schemas/solver_parameters/dwave/quantum_annealing.py,sha256=V00ZV2XMaYv9TZSezFm36kDUgiHpwBKG6K2t38ebgvY,1008
91
+ luna_sdk/schemas/solver_parameters/dwave/repeated_reverse_quantum_annealing.py,sha256=Y04GIwLAergf-6QXSsdZzdhuxYPsSwTf0Np9ahCwUTQ,4117
90
92
  luna_sdk/schemas/solver_parameters/dwave/repeated_reverse_simulated_annealing.py,sha256=UeLr2MnPS3zTBQgH6eq5hYvPJpOjQjqG-shHuQ8Ct0M,4569
91
93
  luna_sdk/schemas/solver_parameters/dwave/saga.py,sha256=pXWGZVXRgSMJRi3-NuyO7moai198cWXeGbvq5We-1EE,3118
92
94
  luna_sdk/schemas/solver_parameters/dwave/simulated_annealing.py,sha256=cU2UoN8xo3iM34LJhaLc-tYsCo-RqpOstiktEi79QRU,4047
93
- luna_sdk/schemas/solver_parameters/dwave/tabu_search.py,sha256=fqLoUcBT_CVBq8nmY-KGO_wBmVpAgUSSoS8N_tAOZ6E,3979
95
+ luna_sdk/schemas/solver_parameters/dwave/tabu_search.py,sha256=M027TrynHGPFWuzXcBwVaJz3J-Qf38k5poQRVqi7jLw,3885
94
96
  luna_sdk/schemas/solver_parameters/fujitsu/__init__.py,sha256=V4CSTiNSmtBvNuQpxiTZqX9T-oV4M8hZGQ_eO5Ro8vU,549
95
97
  luna_sdk/schemas/solver_parameters/fujitsu/base.py,sha256=yDM2sLBtg-a5OsD3GqwTd-HMmIwJtubbP_QxQcrkDnA,1813
96
98
  luna_sdk/schemas/solver_parameters/fujitsu/digital_annealer_cpu.py,sha256=EBPE7mwtUNs5CmyVkdWV9jQT_YnW8FWsYQ0VyCHBVNM,9747
@@ -157,8 +159,8 @@ luna_sdk/schemas/wrappers/__init__.py,sha256=1zq5BWRjDidbRJ346JOCSbP6Q9rhf4NiLhZ
157
159
  luna_sdk/schemas/wrappers/datetime_wrapper.py,sha256=6usmPJNRYA4Fe_-0NGwe7RYams46CCAXpJs8YULu_yc,794
158
160
  luna_sdk/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
159
161
  luna_sdk/utils/parameter_finder.py,sha256=LKkd1upH3Djd6eqkcSQ2feNwPUiKi8soYkx6JT1_VSg,2937
160
- luna_sdk/utils/qpu_tokens.py,sha256=XpUNI102TLshfR85ZxvSFmXmH1fb1JAI8NKlIiuWEqc,1535
161
- luna_quantum-0.0.29.dist-info/LICENSE,sha256=rwwuFPLz36oRvjWu2oEeX42Qtn9gmbh7zRC2OqCFNaI,11342
162
- luna_quantum-0.0.29.dist-info/METADATA,sha256=STnBLAwQav1LezmFuJqjCyUepQIDFnYcRl2eS7kIb0w,2311
163
- luna_quantum-0.0.29.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
164
- luna_quantum-0.0.29.dist-info/RECORD,,
162
+ luna_sdk/utils/qpu_tokens.py,sha256=xrh5KSoWzbul-6eRa0ELH9iwEENanE7PIms7jlCt3NY,1641
163
+ luna_quantum-0.0.37.dist-info/LICENSE,sha256=rwwuFPLz36oRvjWu2oEeX42Qtn9gmbh7zRC2OqCFNaI,11342
164
+ luna_quantum-0.0.37.dist-info/METADATA,sha256=199H7vfTIgzdGHF0Bz6eFhCtJnhHMiQuxl93YicnhYk,2311
165
+ luna_quantum-0.0.37.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
166
+ luna_quantum-0.0.37.dist-info/RECORD,,
@@ -0,0 +1,27 @@
1
+ from importlib.metadata import version
2
+
3
+ import httpx
4
+ from httpx import Client, Response
5
+
6
+ from luna_sdk.error.http_error_utils import HttpErrorUtils
7
+ from luna_sdk.exceptions.timeout_exception import TimeoutException
8
+
9
+
10
+ class LunaHTTPClient(Client):
11
+ _version: str = version("luna-quantum")
12
+
13
+ _user_agent: str = f"LunaSDK/{_version}"
14
+
15
+ def __init__(self, *args, **kwargs):
16
+ super().__init__(*args, **kwargs)
17
+
18
+ self.headers["User-Agent"] = self._user_agent
19
+
20
+ def request(self, *args, **kwargs) -> Response:
21
+ try:
22
+ response: Response = super().request(*args, **kwargs)
23
+ except httpx.TimeoutException:
24
+ # Handle all possible in httpx timeout exceptions
25
+ raise TimeoutException()
26
+ HttpErrorUtils.check_for_error(response)
27
+ return response
@@ -1,21 +1,41 @@
1
1
  import os
2
- from typing import Optional
2
+ from enum import Enum
3
+ from typing import Optional, Literal
3
4
 
4
- from httpx import Client
5
+ import httpx
5
6
 
6
- from luna_sdk.controllers.custom_login_client import CustomLoginClient
7
+ from luna_sdk.controllers.luna_http_client import LunaHTTPClient
8
+ from luna_sdk.error.http_error_utils import HttpErrorUtils
7
9
  from luna_sdk.interfaces.clients.client_i import IClient
8
10
 
9
11
 
12
+ class LunaPrefixEnum(str, Enum):
13
+ LUNA_SOLVE = "luna-solve"
14
+ LUNA_Q = "luna-q"
15
+
16
+
17
+ def check_httpx_exceptions(response):
18
+ HttpErrorUtils.check_for_error(response)
19
+
20
+
21
+ class APIKeyAuth(httpx.Auth):
22
+ def __init__(self, token):
23
+ self.token = token
24
+
25
+ def auth_flow(self, request):
26
+ request.headers["Luna-API-Key"] = self.token
27
+ yield request
28
+
29
+
10
30
  class LunaPlatformClient(IClient):
11
31
  _base_url: str = ""
12
32
 
13
- _client: Client = None # type: ignore
33
+ _client: httpx.Client = None # type: ignore
14
34
 
15
35
  def __init__(
16
36
  self,
17
- email: str,
18
- password: str,
37
+ api_key: str,
38
+ api: LunaPrefixEnum,
19
39
  base_url: str = os.getenv("LUNA_BASE_URL", "https://api.aqarios.com"),
20
40
  timeout: Optional[float] = 240.0,
21
41
  ):
@@ -26,10 +46,10 @@ class LunaPlatformClient(IClient):
26
46
 
27
47
  Parameters
28
48
  ----------
29
- email:
30
- User's email
31
- password:
32
- User's password
49
+ api_key:
50
+ User's API key
51
+ api: str
52
+ Current API with which luna client is working. Can be luna-solve or luna-q.
33
53
  base_url:
34
54
  Base API URL.
35
55
  If you want to use API not on your local PC then change it.
@@ -41,17 +61,15 @@ class LunaPlatformClient(IClient):
41
61
  itself will time out after 240 seconds.
42
62
  Default: 240.0
43
63
  """
44
- self._base_url = f"{base_url}/api"
64
+ self._base_url = f"{base_url}/{api.value}/api/v1"
45
65
 
46
66
  # setup client
47
-
48
- self._client = CustomLoginClient(
49
- email=email,
50
- password=password,
51
- login_url=f"{base_url}/accessToken",
67
+ self._client = LunaHTTPClient(
68
+ auth=APIKeyAuth(api_key),
52
69
  base_url=self._base_url,
53
70
  follow_redirects=True,
54
71
  timeout=timeout,
72
+ event_hooks={"response": [check_httpx_exceptions]},
55
73
  )
56
74
 
57
75
  def __del__(self):
@@ -1,6 +1,6 @@
1
1
  from typing import Optional
2
2
 
3
- from luna_sdk.controllers.luna_platform_client import LunaPlatformClient
3
+ from luna_sdk.controllers.luna_platform_client import LunaPlatformClient, LunaPrefixEnum
4
4
  from luna_sdk.interfaces import ICircuitRepo
5
5
  from luna_sdk.interfaces.clients.luna_q_i import ILunaQ
6
6
  from luna_sdk.interfaces.qpu_token_repo_i import IQpuTokenRepo
@@ -11,23 +11,21 @@ class LunaQ(LunaPlatformClient, ILunaQ):
11
11
  qpu_token: IQpuTokenRepo = None # type: ignore
12
12
  circuit: ICircuitRepo = None # type: ignore
13
13
 
14
- def __init__(self, email: str, password: str, timeout: Optional[float] = 240.0):
14
+ def __init__(self, api_key: str, timeout: Optional[float] = 240.0):
15
15
  """
16
16
  LunaQ is the main entrypoint for all LunaQ related tasks.
17
17
 
18
18
  Parameters
19
19
  ----------
20
- email: str
21
- User's email
22
- password: str
23
- User's password
20
+ api_key: str
21
+ User's API key
24
22
  timeout: float
25
23
  Default timeout in seconds for the requests via the LunaQ client. `None`
26
24
  means that the SDK uses no timeouts. Note that either way the Luna platform
27
25
  itself will time out after 240 seconds.
28
26
  Default: 240.0
29
27
  """
30
- super().__init__(email=email, password=password, timeout=timeout)
28
+ super().__init__(api_key=api_key, api=LunaPrefixEnum.LUNA_Q, timeout=timeout)
31
29
 
32
30
  self.circuit = CircuitRepo(self._client)
33
31
  self.qpu_token = QpuTokenRepo(self._client)
@@ -1,6 +1,6 @@
1
1
  from typing import Optional
2
2
 
3
- from luna_sdk.controllers.luna_platform_client import LunaPlatformClient
3
+ from luna_sdk.controllers.luna_platform_client import LunaPlatformClient, LunaPrefixEnum
4
4
  from luna_sdk.interfaces import ISolutionsRepo
5
5
  from luna_sdk.interfaces.clients.luna_solve_i import ILunaSolve
6
6
  from luna_sdk.interfaces.info_repo_i import IInfoRepo
@@ -18,23 +18,25 @@ class LunaSolve(LunaPlatformClient, ILunaSolve):
18
18
  qpu_token: IQpuTokenRepo = None # type: ignore
19
19
  info: IInfoRepo = None # type: ignore
20
20
 
21
- def __init__(self, email: str, password: str, timeout: Optional[float] = 240.0):
21
+ def __init__(self, api_key: str, timeout: Optional[float] = 240.0):
22
22
  """
23
23
  LunaSolve is the main entrypoint for all LunaSolve related tasks.
24
24
 
25
25
  Parameters
26
26
  ----------
27
- email: str
28
- User's email
29
- password: str
30
- User's password
27
+ api_key: str
28
+ User's API key
31
29
  timeout: float
32
30
  Default timeout in seconds for the requests via the LunaQ client. `None`
33
31
  means that the SDK uses no timeouts. Note that either way the Luna platform
34
32
  itself will time out after 240 seconds.
35
33
  Default: 240.0
36
34
  """
37
- super().__init__(email=email, password=password, timeout=timeout)
35
+ super().__init__(
36
+ api_key=api_key,
37
+ api=LunaPrefixEnum.LUNA_SOLVE,
38
+ timeout=timeout,
39
+ )
38
40
 
39
41
  self.optimization = OptimizationRepo(self._client)
40
42
  self.solution = SolutionsRepo(self._client)
@@ -1,6 +1,6 @@
1
1
  from typing import Optional
2
2
 
3
- from luna_sdk.controllers.luna_platform_client import LunaPlatformClient
3
+ from luna_sdk.controllers.luna_platform_client import LunaPlatformClient, LunaPrefixEnum
4
4
  from luna_sdk.interfaces.clients.luna_transform_i import ILunaTransform
5
5
  from luna_sdk.interfaces.cplex_repo_i import ICplexRepo
6
6
  from luna_sdk.interfaces.lp_repo_i import ILPRepo
@@ -12,23 +12,29 @@ class LunaTransform(LunaPlatformClient, ILunaTransform):
12
12
  cplex: ICplexRepo = None # type: ignore
13
13
  lp: ILPRepo = None # type: ignore
14
14
 
15
- def __init__(self, email: str, password: str, timeout: Optional[float] = 240.0):
15
+ def __init__(
16
+ self,
17
+ api_key: str,
18
+ timeout: Optional[float] = 240.0,
19
+ ):
16
20
  """
17
21
  LunaTransform is the main entrypoint for all LunaTransform related tasks.
18
22
 
19
23
  Parameters
20
24
  ----------
21
- email: str
22
- User's email
23
- password: str
24
- User's password
25
+ api_key: str
26
+ User's API key
25
27
  timeout: float
26
28
  Default timeout in seconds for the requests via the LunaQ client. `None`
27
29
  means that the SDK uses no timeouts. Note that either way the Luna platform
28
30
  itself will time out after 240 seconds.
29
31
  Default: 240.0
30
32
  """
31
- super().__init__(email=email, password=password, timeout=timeout)
33
+ super().__init__(
34
+ api_key=api_key,
35
+ api=LunaPrefixEnum.LUNA_SOLVE,
36
+ timeout=timeout,
37
+ )
32
38
 
33
39
  self.cplex = CplexRepo(self._client)
34
40
  self.lp = LPRepo(self._client)
@@ -1,7 +1,8 @@
1
1
  import logging
2
2
  from typing import Optional
3
3
 
4
- from httpx import HTTPStatusError, RequestError, Response
4
+ import httpx
5
+ from httpx import RequestError, Response
5
6
 
6
7
  from luna_sdk.exceptions.luna_server_exception import LunaServerException
7
8
  from luna_sdk.schemas.error_message import ErrorMessage
@@ -50,6 +51,12 @@ class HttpErrorUtils:
50
51
  " leading to a timeout. Try reducing the size of the optimization.",
51
52
  )
52
53
 
54
+ elif response.status_code == 403:
55
+ exception = create_error_message(
56
+ "FORBIDDEN",
57
+ response.text,
58
+ )
59
+
53
60
  return exception
54
61
 
55
62
  @staticmethod
@@ -70,15 +77,15 @@ class HttpErrorUtils:
70
77
  If an error occurred with the request outside the http status codes 4xx and 5xx.
71
78
  """
72
79
  try:
80
+ response.read()
73
81
  response.raise_for_status()
74
- except HTTPStatusError as e:
82
+ except httpx.HTTPStatusError as e:
75
83
  exception: Optional[LunaServerException]
76
84
 
77
85
  try:
78
86
  error_msg: ErrorMessage = ErrorMessage.model_validate_json(
79
87
  response.text
80
88
  )
81
-
82
89
  # Convert the error message to the correct exception
83
90
  exception = LunaServerException(response.status_code, error_msg)
84
91
 
@@ -1,6 +0,0 @@
1
- class EncryptionNotSetException(Exception):
2
- def __str__(self):
3
- return (
4
- "Encryption not set. Please refer to our encryption documentation "
5
- "https://docs.aqarios.com/get-started#luna-encryption for more information."
6
- )
@@ -15,7 +15,6 @@ class ICircuitRepo(IRepository, ABC):
15
15
  provider: CircuitProviderEnum,
16
16
  params: Dict[str, Any] = {},
17
17
  qpu_tokens: Optional[TokenProvider] = None,
18
- encryption_key: Optional[str] = None,
19
18
  **kwargs,
20
19
  ) -> CircuitJob:
21
20
  """
@@ -31,8 +30,6 @@ class ICircuitRepo(IRepository, ABC):
31
30
  Additional parameters of the circuit.
32
31
  qpu_tokens: Optional[TokenProvider]
33
32
  The tokens to be used for the QPU.
34
- encryption_key: Optional[str]
35
- Encryption key to be used for encryption of QPU tokens.
36
33
  **kwargs
37
34
  Parameters to pass to `httpx.request`.
38
35
 
@@ -47,7 +44,6 @@ class ICircuitRepo(IRepository, ABC):
47
44
  def get(
48
45
  self,
49
46
  job: CircuitJob,
50
- encryption_key: Optional[str] = None,
51
47
  **kwargs,
52
48
  ) -> CircuitResult:
53
49
  """
@@ -55,8 +51,6 @@ class ICircuitRepo(IRepository, ABC):
55
51
 
56
52
  Parameters
57
53
  ----------
58
- encryption_key: Optional[str]
59
- Encryption key to be used for encryption of QPU tokens.
60
54
  **kwargs
61
55
  Parameters to pass to `httpx.request`.
62
56
 
@@ -5,9 +5,10 @@ from typing import List, Optional
5
5
  from dimod import BinaryQuadraticModel, ConstrainedQuadraticModel
6
6
 
7
7
  from luna_sdk.interfaces.repository_i import IRepository
8
- from luna_sdk.schemas.enums.optimization import InputType
8
+ from luna_sdk.schemas.enums.optimization import OptFormat
9
9
  from luna_sdk.schemas.enums.timeframe import TimeframeEnum
10
10
  from luna_sdk.schemas.optimization import Optimization
11
+ from luna_sdk.schemas.solution import Numeric
11
12
  from luna_sdk.schemas.use_cases import UseCase
12
13
 
13
14
 
@@ -35,7 +36,7 @@ class IOptimizationRepo(IRepository, ABC):
35
36
  def get_all(
36
37
  self,
37
38
  timeframe: Optional[TimeframeEnum] = None,
38
- input_type: Optional[InputType] = None,
39
+ input_type: Optional[OptFormat] = None,
39
40
  limit: int = 50,
40
41
  offset: int = 0,
41
42
  **kwargs,
@@ -48,7 +49,7 @@ class IOptimizationRepo(IRepository, ABC):
48
49
  timeframe: Optional[TimeframeEnum]
49
50
  Only return optimizations created within a specified timeframe.
50
51
  Default None.
51
- input_type: Optional[InputType]
52
+ input_type: Optional[OptFormat]
52
53
  Only return optimizations of a specified input type. Default None.
53
54
  limit:
54
55
  Limit the number of optimizations to be returned. Default value 50.
@@ -66,7 +67,7 @@ class IOptimizationRepo(IRepository, ABC):
66
67
 
67
68
  @abstractmethod
68
69
  def create_from_qubo(
69
- self, name: str, matrix: List[List[float]], **kwargs
70
+ self, name: str, matrix: List[List[Numeric]], **kwargs
70
71
  ) -> Optimization:
71
72
  """
72
73
  Create an optimization from a QUBO matrix.
@@ -14,11 +14,10 @@ class IQpuTokenRepo(IRepository, ABC):
14
14
  provider: str,
15
15
  token: str,
16
16
  token_type: QpuTokenTypeEnum,
17
- encryption_key: Optional[str] = None,
18
17
  **kwargs,
19
18
  ) -> QpuTokenOut:
20
19
  """
21
- Create organization QPU token
20
+ Create QPU token
22
21
 
23
22
  Parameters
24
23
  ----------
@@ -29,11 +28,9 @@ class IQpuTokenRepo(IRepository, ABC):
29
28
  token: str
30
29
  Token
31
30
  token_type: QpuTokenTypeEnum
32
- There are two types of QPU tokens: PERSONAL and ORGANIZATION.
33
- All users of an organization can use organization QPU tokens.
31
+ There are two types of QPU tokens: PERSONAL and GROUP.
32
+ All users of a group can use group QPU tokens.
34
33
  User QPU tokens can only be used by the user who created them.
35
- encryption_key: Optional[str]
36
- Encryption key to be used for encryption of QPU tokens.
37
34
  **kwargs
38
35
  Parameters to pass to `httpx.request`.
39
36
 
@@ -48,8 +45,9 @@ class IQpuTokenRepo(IRepository, ABC):
48
45
  def get_all(
49
46
  self,
50
47
  filter_provider: Optional[str] = None,
51
- name: Optional[str] = None,
52
48
  token_type: Optional[QpuTokenTypeEnum] = None,
49
+ limit: Optional[int] = None,
50
+ offset: Optional[int] = None,
53
51
  **kwargs,
54
52
  ) -> Dict[QpuTokenTypeEnum, List[QpuTokenOut]]:
55
53
  """
@@ -59,11 +57,13 @@ class IQpuTokenRepo(IRepository, ABC):
59
57
  ----------
60
58
  filter_provider: Optional[str]
61
59
  The provider for which qpu tokens should be retrieved
62
- name: Optional[str]
63
- Name of the QPU token that should be retrieved
64
60
  token_type: Optional[QpuTokenTypeEnum]
65
- If you want to retrieve only user or organization QPU tokens
61
+ If you want to retrieve only user or group QPU tokens
66
62
  otherwise all QPU tokens will be retrieved
63
+ limit: Optional[int]
64
+ Number of items to fetch. Default is 10.
65
+ offset: Optional[int]
66
+ Optional. Number of items to skip. Default is 0.
67
67
  **kwargs
68
68
  Parameters to pass to `httpx.request`.
69
69
 
@@ -84,8 +84,8 @@ class IQpuTokenRepo(IRepository, ABC):
84
84
  name: str
85
85
  Name of the QPU token that should be retrieved
86
86
  token_type: QpuTokenTypeEnum
87
- There are two types of QPU tokens: PERSONAL and ORGANIZATION.
88
- All users of an organization can use organization QPU tokens.
87
+ There are two types of QPU tokens: PERSONAL and GROUP.
88
+ All users of a group can use group QPU tokens.
89
89
  User QPU tokens can only be used by the user who created them.
90
90
  **kwargs
91
91
  Parameters to pass to `httpx.request`.
@@ -106,7 +106,7 @@ class IQpuTokenRepo(IRepository, ABC):
106
106
  **kwargs,
107
107
  ) -> QpuTokenOut:
108
108
  """
109
- Update organization QPU token by id.
109
+ Update QPU token by id.
110
110
 
111
111
  Parameters
112
112
  ----------
@@ -115,8 +115,8 @@ class IQpuTokenRepo(IRepository, ABC):
115
115
  new_name: str
116
116
  The new name
117
117
  token_type: QpuTokenTypeEnum
118
- There are two types of QPU tokens: PERSONAL and ORGANIZATION.
119
- All users of an organization can use organization QPU tokens.
118
+ There are two types of QPU tokens: PERSONAL and GROUP.
119
+ All users of a group can use group QPU tokens.
120
120
  User QPU tokens can only be used by the user who created them.
121
121
  **kwargs
122
122
  Parameters to pass to `httpx.request`.
@@ -131,15 +131,15 @@ class IQpuTokenRepo(IRepository, ABC):
131
131
  @abstractmethod
132
132
  def delete(self, name: str, token_type: QpuTokenTypeEnum, **kwargs) -> None:
133
133
  """
134
- Delete organization QPU token by name.
134
+ Delete QPU token by name.
135
135
 
136
136
  Parameters
137
137
  ----------
138
138
  name: str
139
139
  Name of the QPU token that should be deleted
140
140
  token_type: QpuTokenTypeEnum
141
- There are two types of QPU tokens: PERSONAL and ORGANIZATION.
142
- All users of an organization can use organization QPU tokens.
141
+ There are two types of QPU tokens: PERSONAL and GROUP.
142
+ All users of a group can use organization QPU tokens.
143
143
  User QPU tokens can only be used by the user who created them.
144
144
  **kwargs
145
145
  Parameters to pass to `httpx.request`.
@@ -108,7 +108,6 @@ class ISolutionsRepo(IRepository, ABC):
108
108
  provider: str,
109
109
  qpu_tokens: Optional[TokenProvider] = None,
110
110
  solver_parameters: Optional[Union[Dict[str, Any], BaseModel]] = None,
111
- encryption_key: Optional[str] = None,
112
111
  name: Optional[str] = None,
113
112
  fail_on_invalid_params: bool = True,
114
113
  **kwargs,
@@ -128,8 +127,6 @@ class ISolutionsRepo(IRepository, ABC):
128
127
  The tokens to be used for the QPU.
129
128
  solver_parameters: Optional[Union[Dict[str, Any], BaseModel]]
130
129
  Parameters to be passed to the solver.
131
- encryption_key: Optional[str]
132
- Encryption key to be used for encryption of QPU tokens.
133
130
  name: Optional[str]
134
131
  Default: None, The name of the solution to create.
135
132
  fail_on_invalid_params: bool
@@ -155,7 +152,6 @@ class ISolutionsRepo(IRepository, ABC):
155
152
  sleep_time_max: float = 60.0,
156
153
  sleep_time_increment: float = 5.0,
157
154
  sleep_time_initial: float = 5.0,
158
- encryption_key: Optional[str] = None,
159
155
  name: Optional[str] = None,
160
156
  fail_on_invalid_params: bool = True,
161
157
  **kwargs,
@@ -182,8 +178,6 @@ class ISolutionsRepo(IRepository, ABC):
182
178
  Increment of sleep time between requests. Initial sleep time will be
183
179
  sleep_time_initial: float
184
180
  Initial sleep time.
185
- encryption_key: Optional[str]
186
- Encryption key to be used for encryption of QPU tokens.
187
181
  name: Optional[str]
188
182
  Default: None, The name of the solution to create.
189
183
  fail_on_invalid_params: bool