luna-quantum 0.0.16__py3-none-any.whl → 0.0.33__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 (66) hide show
  1. {luna_quantum-0.0.16.dist-info → luna_quantum-0.0.33.dist-info}/METADATA +2 -1
  2. {luna_quantum-0.0.16.dist-info → luna_quantum-0.0.33.dist-info}/RECORD +64 -58
  3. luna_sdk/controllers/luna_http_client.py +27 -0
  4. luna_sdk/controllers/luna_platform_client.py +41 -23
  5. luna_sdk/controllers/luna_q.py +11 -16
  6. luna_sdk/controllers/luna_solve.py +12 -17
  7. luna_sdk/controllers/luna_transform.py +14 -15
  8. luna_sdk/error/http_error_utils.py +10 -3
  9. luna_sdk/interfaces/circuit_repo_i.py +18 -12
  10. luna_sdk/interfaces/cplex_repo_i.py +25 -10
  11. luna_sdk/interfaces/info_repo_i.py +10 -3
  12. luna_sdk/interfaces/lp_repo_i.py +20 -8
  13. luna_sdk/interfaces/optimization_repo_i.py +35 -60
  14. luna_sdk/interfaces/qpu_token_repo_i.py +40 -38
  15. luna_sdk/interfaces/solutions_repo_i.py +44 -24
  16. luna_sdk/repositories/circuit_repo.py +11 -44
  17. luna_sdk/repositories/cplex_repo.py +32 -20
  18. luna_sdk/repositories/info_repo.py +4 -7
  19. luna_sdk/repositories/lp_repo.py +21 -15
  20. luna_sdk/repositories/optimization_repo.py +36 -210
  21. luna_sdk/repositories/qpu_token_repo.py +52 -128
  22. luna_sdk/repositories/solutions_repo.py +109 -181
  23. luna_sdk/schemas/create/solution.py +2 -2
  24. luna_sdk/schemas/enums/optimization.py +8 -7
  25. luna_sdk/schemas/enums/qpu_token_type.py +1 -1
  26. luna_sdk/schemas/optimization.py +15 -24
  27. luna_sdk/schemas/optimization_formats/qubo.py +8 -0
  28. luna_sdk/schemas/pretty_base.py +10 -3
  29. luna_sdk/schemas/qpu_token.py +4 -5
  30. luna_sdk/schemas/rest/qpu_token/qpu_token_source.py +18 -0
  31. luna_sdk/schemas/rest/qpu_token/token_provider.py +47 -15
  32. luna_sdk/schemas/solution.py +7 -6
  33. luna_sdk/schemas/solver_info.py +31 -1
  34. luna_sdk/schemas/solver_parameters/aws/optimizer_params.py +40 -0
  35. luna_sdk/schemas/solver_parameters/aws/qaoa.py +36 -4
  36. luna_sdk/schemas/solver_parameters/base_parameter.py +5 -0
  37. luna_sdk/schemas/solver_parameters/dwave/base.py +15 -14
  38. luna_sdk/schemas/solver_parameters/dwave/dialectic_search.py +3 -2
  39. luna_sdk/schemas/solver_parameters/dwave/kerberos.py +2 -3
  40. luna_sdk/schemas/solver_parameters/dwave/leap_hybrid_bqm.py +2 -2
  41. luna_sdk/schemas/solver_parameters/dwave/leap_hybrid_cqm.py +2 -2
  42. luna_sdk/schemas/solver_parameters/dwave/parallel_tempering.py +2 -3
  43. luna_sdk/schemas/solver_parameters/dwave/parallel_tempering_qpu.py +2 -3
  44. luna_sdk/schemas/solver_parameters/dwave/population_annealing.py +2 -3
  45. luna_sdk/schemas/solver_parameters/dwave/population_annealing_qpu.py +2 -1
  46. luna_sdk/schemas/solver_parameters/dwave/qaga.py +4 -2
  47. luna_sdk/schemas/solver_parameters/dwave/qbsolv_like_qpu.py +2 -3
  48. luna_sdk/schemas/solver_parameters/dwave/qbsolv_like_simulated_annealing.py +2 -3
  49. luna_sdk/schemas/solver_parameters/dwave/qbsolv_like_tabu_search.py +2 -3
  50. luna_sdk/schemas/solver_parameters/dwave/quantum_annealing.py +2 -3
  51. luna_sdk/schemas/solver_parameters/dwave/repeated_reverse_quantum_annealing.py +4 -2
  52. luna_sdk/schemas/solver_parameters/dwave/repeated_reverse_simulated_annealing.py +3 -2
  53. luna_sdk/schemas/solver_parameters/dwave/saga.py +1 -1
  54. luna_sdk/schemas/solver_parameters/dwave/tabu_search.py +3 -1
  55. luna_sdk/schemas/solver_parameters/fujitsu/base.py +5 -4
  56. luna_sdk/schemas/solver_parameters/fujitsu/partial_config.py +7 -5
  57. luna_sdk/schemas/solver_parameters/ibm/standard_parameters.py +121 -7
  58. luna_sdk/schemas/solver_parameters/qctrl/qaoa.py +2 -2
  59. luna_sdk/schemas/wrappers/__init__.py +1 -0
  60. luna_sdk/schemas/wrappers/datetime_wrapper.py +31 -0
  61. luna_sdk/utils/parameter_finder.py +90 -0
  62. luna_sdk/utils/qpu_tokens.py +14 -13
  63. luna_sdk/constants.py +0 -1
  64. luna_sdk/controllers/custom_login_client.py +0 -61
  65. {luna_quantum-0.0.16.dist-info → luna_quantum-0.0.33.dist-info}/LICENSE +0 -0
  66. {luna_quantum-0.0.16.dist-info → luna_quantum-0.0.33.dist-info}/WHEEL +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: luna-quantum
3
- Version: 0.0.16
3
+ Version: 0.0.33
4
4
  Summary: Python SDK for Aqarios' Luna Platform
5
5
  Home-page: https://aqarios.com/
6
6
  License: Apache-2.0
@@ -25,6 +25,7 @@ Requires-Dist: dwave-neal (>=0.6.0,<0.7.0) ; extra == "transformations" or extra
25
25
  Requires-Dist: httpx (>=0.26.0,<0.27.0)
26
26
  Requires-Dist: networkx (>=2.7.1,<3.0.0) ; extra == "examples"
27
27
  Requires-Dist: pydantic (>=2.6.1,<3.0.0)
28
+ Requires-Dist: python-dateutil (>=2.9.0,<3.0.0)
28
29
  Requires-Dist: qiskit (>=0.45.1,<0.46.0) ; extra == "examples"
29
30
  Requires-Dist: qiskit-ibm-runtime (>=0.18.0,<0.19.0) ; extra == "examples"
30
31
  Requires-Dist: qiskit-optimization[cplex] (>=0.6.0,<0.7.0) ; extra == "transformations" or extra == "examples"
@@ -1,13 +1,12 @@
1
1
  luna_sdk/__init__.py,sha256=9s6JkcSeRF4WtFo80TelzXXHFhX8w7fXiaJr59V9ScM,100
2
- luna_sdk/constants.py,sha256=MmbYlLrwDYmahL0yMtC2BUNVeSLAitVqTG31PJZTTv4,33
3
2
  luna_sdk/controllers/__init__.py,sha256=ivTapH8np5mQeVEevxwsWawCtVSG4Wep72rNp7nEZXw,60
4
- luna_sdk/controllers/custom_login_client.py,sha256=PT9daNoqsbID9G2SZ3dhgMuqDBnnjfmxCGEPlLDnAms,2063
5
- luna_sdk/controllers/luna_platform_client.py,sha256=CiGn8DIIdxQ9gCNWhk8KGGvXW1gEIwhwYtVYq0XdxzU,1671
6
- luna_sdk/controllers/luna_q.py,sha256=-6Wwx-tvRsAdDWZgkXG1fE-4vujXcnaDG4oYYTZ6eXo,1066
7
- luna_sdk/controllers/luna_solve.py,sha256=TLhR7y5yKwMB6fztobDfhQ_igDs29a4EAT546oPA2u0,1660
8
- luna_sdk/controllers/luna_transform.py,sha256=n7frEqa-Fcgo2R1SD8BmfjqLmImDmIWo4BS1vDg5m7s,1161
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
9
8
  luna_sdk/error/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- 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
11
10
  luna_sdk/exceptions/__init__.py,sha256=DSKaPN374rR2zccmpLvlqntxDsjFwgSexXtva795ae0,52
12
11
  luna_sdk/exceptions/encryption_exception.py,sha256=qe38EPRen4c63ti6bbA3jXl4PK48Ommi_cb2Lvhn8tg,264
13
12
  luna_sdk/exceptions/luna_exception.py,sha256=m7U3qFpP9Sc77Z3RG9I4bQXsJSQuVeBLvfHQWziC9sQ,114
@@ -15,28 +14,28 @@ luna_sdk/exceptions/luna_server_exception.py,sha256=y4J1TzfMF_kmuh5g8hpP2k_SnV0a
15
14
  luna_sdk/exceptions/timeout_exception.py,sha256=ppEGsUk-6NtBy2-RyBfzjR1IhDmIwPWwg03BOsET4OA,367
16
15
  luna_sdk/exceptions/transformation.py,sha256=lykEeWonvfvWAyU2DoKzR-GtFc-KEAvrfWlnWT9ylqc,381
17
16
  luna_sdk/interfaces/__init__.py,sha256=WwAzuNWP6SNMJk_U_Hqc5U2mRsG2_m-sSQZPMYUDWfY,213
18
- luna_sdk/interfaces/circuit_repo_i.py,sha256=0NdPrOUSP2DStlOe4HsOjlDmD2HYseE68W-1PgmAwic,2109
17
+ luna_sdk/interfaces/circuit_repo_i.py,sha256=65SSefsrpo_MKFTGkdT1o5PJ7pQ9n9tmSnunoQ_Mruo,1946
19
18
  luna_sdk/interfaces/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
19
  luna_sdk/interfaces/clients/client_i.py,sha256=_I8mTIfavI3Yv7TPD9HsTxF3uI4WzDucFvgEb2EtOAo,185
21
20
  luna_sdk/interfaces/clients/luna_q_i.py,sha256=_DHDirve9yoVO8zb5i3WkTMx-LPu9TtasjF4OUfCaRw,765
22
21
  luna_sdk/interfaces/clients/luna_solve_i.py,sha256=UTqDpNPnkFgxFAsA555xMFWq42GTwxGgDJUFcRMi2R8,955
23
22
  luna_sdk/interfaces/clients/luna_transform_i.py,sha256=xpS2ODs83rICbA3oAKzf80rpBezZO924WI-P6NzIv2M,676
24
- luna_sdk/interfaces/cplex_repo_i.py,sha256=vpO5ON8GIpqCihYiNP5mbq3A0wjqdbJJBU0-l7yLg0Y,3335
25
- luna_sdk/interfaces/info_repo_i.py,sha256=ah6zBj66z-i0vxZcdUShQxMz_nTMw8xX5j-wiXsIxz8,1145
26
- luna_sdk/interfaces/lp_repo_i.py,sha256=1EC1f8P8dLY0wlSqjt0Vp1_2RERIhikvalzqqfhq2lc,2669
27
- luna_sdk/interfaces/optimization_repo_i.py,sha256=qhraGjs6gg5PsZmzDCP4GD-M-R5wwlZthMO0ppAnpjc,6977
28
- luna_sdk/interfaces/qpu_token_repo_i.py,sha256=vgT-N-JfcDJ2YqmlbamYGE_wm8SyYSGmQcfrCael-Wc,4486
23
+ luna_sdk/interfaces/cplex_repo_i.py,sha256=a2CWG1m4YmQAlcM022Xfk09BHVmcd3y2H-GMr1N4vx8,3786
24
+ luna_sdk/interfaces/info_repo_i.py,sha256=hCUYNoqjAKwz6l-61XtymX-UboosDX1RaTTiX64EXXc,1345
25
+ luna_sdk/interfaces/lp_repo_i.py,sha256=hixIKvJ8jz9VOUi33B3K2VvFLcR7eKfeooJwktquyhc,3052
26
+ luna_sdk/interfaces/optimization_repo_i.py,sha256=4JZikxWTJZTX4tG85ydSP711WROQ5B8RtbvOp1EDvxE,6202
27
+ luna_sdk/interfaces/qpu_token_repo_i.py,sha256=q5aWiGxFnuRSasgHcceRAjQ0NvMPRoBfkeJHCByBy_0,4626
29
28
  luna_sdk/interfaces/repository_i.py,sha256=vJz8pbggkuLLC333qzjepj3TMPh49LUnyh3pJDlcGi0,287
30
- luna_sdk/interfaces/solutions_repo_i.py,sha256=f1VksIBcmRvk_fYZdUk9fH54VbiTvVcVbcDh91n_0Io,6907
29
+ luna_sdk/interfaces/solutions_repo_i.py,sha256=YmQxgDGSLZNQ-P7jzlw1zTnut5Q1KVeRbcJEuocB3VQ,7767
31
30
  luna_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
31
  luna_sdk/repositories/__init__.py,sha256=HxD02fpzlcIt5YkBHd7LwIp_eE6eFuAz2VDnlrakwJQ,169
33
- luna_sdk/repositories/circuit_repo.py,sha256=sm9GxNScLDNkb7lK6cwDjEfsPjNfLtnsbktN_vcwGIs,3768
34
- luna_sdk/repositories/cplex_repo.py,sha256=Bzz7T-jm_NMywHljabrXaNNV95Fekc_iX-g4_FUVVDI,4804
35
- luna_sdk/repositories/info_repo.py,sha256=x6ofT6GHdGN5SZu2LroILOpeHf0axOcRpeW-ax9f3mo,1266
36
- luna_sdk/repositories/lp_repo.py,sha256=bQapY09wXNsEmdrYDDabRxwQlbNei03otXUG3UzYDRs,4194
37
- luna_sdk/repositories/optimization_repo.py,sha256=ARmgc32V70qwiJELXs38bGadAJHv4wt9UMmXbdOR7MU,10463
38
- luna_sdk/repositories/qpu_token_repo.py,sha256=7dWt1NvEcMmCVDlX304H1kzkNi97uriJaXN7UUjHj64,7270
39
- luna_sdk/repositories/solutions_repo.py,sha256=ZKIafOjBIoQIg6EdNNis9FYO5PhkNC0urp9XB6t0IdQ,11423
32
+ luna_sdk/repositories/circuit_repo.py,sha256=h3Moypl-pba8J-sNTBsOxnbKtu6RCmmX5c_4JnfQfCw,2552
33
+ luna_sdk/repositories/cplex_repo.py,sha256=6vlx6YTJoDSWFSZDDNrPk3E7pa5WWGqG25bhTwQdqHQ,5098
34
+ luna_sdk/repositories/info_repo.py,sha256=GzRW5RwhRJrNjujw8Y7vJY8vV_tHzbfwXo0viHuxqUM,1270
35
+ luna_sdk/repositories/lp_repo.py,sha256=T44XMbdbW7k9a4z6JgIj1kb0bBZxepn-93vxdZOQa80,4370
36
+ luna_sdk/repositories/optimization_repo.py,sha256=xHjMdXhzdwt9DtZG7AvGtUgOqWH142veOpAzaNe-nxk,6078
37
+ luna_sdk/repositories/qpu_token_repo.py,sha256=6V3PH2YLMoWx6Dv6hxDoe2ohXH2mRN37nfvzVS6bHDA,5063
38
+ luna_sdk/repositories/solutions_repo.py,sha256=Q5Q30oRyUnayXkp4z_jPcjDpxYRoPjzWBWUqg2EAFWQ,9242
40
39
  luna_sdk/schemas/__init__.py,sha256=lTix3zUl2Z8ZLA2BTF4pls5S-kqlVZ3cIdAZwGxPSUI,248
41
40
  luna_sdk/schemas/circuit.py,sha256=r3Bv0lyhrvFoI3Gf8eq-PS3kyivTWY3IJmRH0X2LoCk,1067
42
41
  luna_sdk/schemas/create/__init__.py,sha256=7G2yflImpZJxHn3l4Op5CsQAxwKGmvWJSttq9kmiHq0,90
@@ -44,64 +43,68 @@ luna_sdk/schemas/create/circuit.py,sha256=vV2r6xk24_aHe9oo0dt3wVeOHcyD02lXNR-Yyj
44
43
  luna_sdk/schemas/create/optimization.py,sha256=Z9pKoD0y6BjKvl8gQ6XK76bdvq8etvcoNU4RwxnUvHA,759
45
44
  luna_sdk/schemas/create/qpu_token.py,sha256=XE3WoNL3Q8QFEDshXoSrAKQXgT_zthKvihKqJHi8250,492
46
45
  luna_sdk/schemas/create/qubo.py,sha256=5Y_jWicEnoV82Ubc-f0a_qy9hCuPBumhsGWY8wzMIuA,293
47
- luna_sdk/schemas/create/solution.py,sha256=Dy3CLfW2ANYGV-ABvAI0kPDejYnhI0NZSgWX6oX7Lx4,395
46
+ luna_sdk/schemas/create/solution.py,sha256=K97JHH-p5z0P_niTVX6YBPoDc0rgIpJG5O4uaUhcs48,410
48
47
  luna_sdk/schemas/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
48
  luna_sdk/schemas/enums/circuit.py,sha256=smz_DouDo_K8rs4N5aIOj2PS9w6DX1CFYX0bv6f6JFw,252
50
- luna_sdk/schemas/enums/optimization.py,sha256=K-lv6PLJ4qo4vNVEKHsLU1rEv-QnFfl_FlN1xqZOXUc,170
49
+ luna_sdk/schemas/enums/optimization.py,sha256=XtFdcfLxGe-MAL64itjxszhRkTcUzUf83tO-5DBVLeY,198
51
50
  luna_sdk/schemas/enums/problem.py,sha256=HWL6Lc1pqPtJ0J-rXkUTL6WHe2fiBY1ctuZvDnx1hmM,754
52
- 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
53
52
  luna_sdk/schemas/enums/solution.py,sha256=Vax6MX62UDwApbwzf1nrhuFWw1Iiq77gUch7_1roCYo,114
54
53
  luna_sdk/schemas/enums/status.py,sha256=KHaOgePqB3GNhFYLo2Sp-JAEXBPN_ZVDmj2WobrT5N4,204
55
54
  luna_sdk/schemas/enums/timeframe.py,sha256=vwoZsgAYGvqF67qdcXMEnHkqbiRcVY5uK-4-ZTFcurI,238
56
55
  luna_sdk/schemas/error_message.py,sha256=svCs-mWQsp3BMEhzZFqskbyP6iS78eVUOPaiWFc4sEQ,307
57
- luna_sdk/schemas/optimization.py,sha256=D33gwLReCjMTKCs8b28LESb0bSkEvBioQtgHch7G22k,1932
56
+ luna_sdk/schemas/optimization.py,sha256=pCbDL93PFGf7IOGz-0PHFrrpOwQdszm78WnS0oo2xqU,1884
58
57
  luna_sdk/schemas/optimization_formats/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
59
58
  luna_sdk/schemas/optimization_formats/bqm.py,sha256=rrmiZYe_iEdgBFusJeJfY8PVSxgf1Wv79FgMQUm2YVs,910
60
59
  luna_sdk/schemas/optimization_formats/cqm.py,sha256=VZiNJy4yc-8o3gHoH0E-uaNOHj7UfAGCqznTzKBv0NQ,4257
61
60
  luna_sdk/schemas/optimization_formats/lp.py,sha256=iXFDBmHktHsYc79ngSraylCpa-EVMFwN01788fnjFzY,175
62
61
  luna_sdk/schemas/optimization_formats/qm.py,sha256=yUEZF7FOvXv1Mb5FMiX1q0Rk5w2ltrh7HInfFEiVSXU,912
63
- luna_sdk/schemas/pretty_base.py,sha256=wYF-jgUpHIfVk00ndBs8qbUVxPJdpL52NC6Pq8krDyc,1603
64
- luna_sdk/schemas/qpu_token.py,sha256=K8P634yQ7ClAhQtNS6BfNU-TN8q1XeGcWXiWh4eQ-Gw,1474
62
+ luna_sdk/schemas/optimization_formats/qubo.py,sha256=YN-VbPGTgqOKJuJ7t_TT8H_WIWr1ifU974K98W9Blao,135
63
+ luna_sdk/schemas/pretty_base.py,sha256=ZyVdwdY5JfmNlfqZDm6MdTs5roNGtv0Pe805r4N25Z4,1845
64
+ luna_sdk/schemas/qpu_token.py,sha256=CFKbAhFgo0G-LO_lameHH4-iOFUJWx9hmMWi3xQwURw,1508
65
65
  luna_sdk/schemas/representation.py,sha256=0RKVV0XxHOJZ1o9grxTq5ri3cGLziyCFObDwQuXIOEY,364
66
66
  luna_sdk/schemas/rest/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
67
67
  luna_sdk/schemas/rest/qpu_token/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
68
- luna_sdk/schemas/rest/qpu_token/token_provider.py,sha256=yDD17uIuio5FisarDBiGQwMpl-_QXRYttuFAZ9w-V00,1430
69
- luna_sdk/schemas/solution.py,sha256=Bu1pcbIaaJhtU_r3EPOZUOWyWBZ9550c4RZR8wJULo8,6823
70
- luna_sdk/schemas/solver_info.py,sha256=vMxkJTo87pa12sY3RfQjjAG8XOUOOkYbgZ8i42rwOKY,198
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=IRtZneNRN5IbSEMHKHc0NYJ7lf74RxZTHoYJI7z2QoY,6871
71
+ luna_sdk/schemas/solver_info.py,sha256=ZUCdTI8zpPZ8EquLYyrLU35pZ4VkzcPUSYeQWkdijHM,799
71
72
  luna_sdk/schemas/solver_parameters/aws/__init__.py,sha256=CXjKWzgnP_d1_RvQUfWyaaWvsZ1FxLJN5K61QmRa-uw,33
72
- luna_sdk/schemas/solver_parameters/aws/qaoa.py,sha256=XQG-incxFKngI3XvC1okG2WIxIpCMW_7enx42ECraNo,1000
73
+ luna_sdk/schemas/solver_parameters/aws/optimizer_params.py,sha256=w0eg1SnTpKnuq48YG8JAC1LY0bxsTlZIJ2XbT2ySTHw,1374
74
+ luna_sdk/schemas/solver_parameters/aws/qaoa.py,sha256=Mc7zfdWgLxh2Kb0r5OmL3RIkYlB1mnu6jUpmfYG2BBg,2290
75
+ luna_sdk/schemas/solver_parameters/base_parameter.py,sha256=v8nk1aVKW_MaePxxNXXb3hcVDtzkQF1sGlvZ2YXXJVI,123
73
76
  luna_sdk/schemas/solver_parameters/dwave/__init__.py,sha256=yHsBQ5d1mCS90Y1JcTCOPjNCrEiGT23wI9GyPnYlIqo,2453
74
- luna_sdk/schemas/solver_parameters/dwave/base.py,sha256=CFZTqLHKtuIyzr3GxYSlO_IK_EvO2-SOFxIH4MJ1oXE,17168
75
- luna_sdk/schemas/solver_parameters/dwave/dialectic_search.py,sha256=mu1ehA1ffCr56tdGdnh35lusGMgL6TK0vTsSMGvPmsE,1136
76
- luna_sdk/schemas/solver_parameters/dwave/kerberos.py,sha256=mpVgvanbSuZlauQOp4xP9ZoZyz-PHfxLE5aAU-aYwWk,2626
77
- luna_sdk/schemas/solver_parameters/dwave/leap_hybrid_bqm.py,sha256=IFuJAHVPmBXtwg95H3RRxxPKr9jzT8meN98e-0nB1xc,588
78
- luna_sdk/schemas/solver_parameters/dwave/leap_hybrid_cqm.py,sha256=7IsLRbP5qhk7SsNtITvDLWS8hd-652RIt-s13qpXfwY,678
79
- luna_sdk/schemas/solver_parameters/dwave/parallel_tempering.py,sha256=jIBF59z82nanqLcVuXXrCklyvc582q66KK7MXgEl9S0,1075
80
- luna_sdk/schemas/solver_parameters/dwave/parallel_tempering_qpu.py,sha256=R36Q1kllta7tE_s6w93kctSUurTBjU3MaDJrlGigOac,1149
81
- luna_sdk/schemas/solver_parameters/dwave/population_annealing.py,sha256=o6je_oeDtdomJrlR-VWTXamJD73sB30PCcDi1IoXE1M,996
82
- luna_sdk/schemas/solver_parameters/dwave/population_annealing_qpu.py,sha256=monnhw2ieWLbmwcNTa77epEJ1M0Vbb4g3vkehBBGzuQ,1258
83
- luna_sdk/schemas/solver_parameters/dwave/qaga.py,sha256=9n9FYZFbdsnIddQ8Fk525mpBuFWMvvf7870TuDDQREw,2429
84
- luna_sdk/schemas/solver_parameters/dwave/qbsolv_like_qpu.py,sha256=jA391aDiMoW-T6GBHp9WwGTodpZnJcopceUB51Q_Pws,506
85
- luna_sdk/schemas/solver_parameters/dwave/qbsolv_like_simulated_annealing.py,sha256=5Nba2XKIqQJtO7cft51tla-HYXg_MjTicIM9G4BZHO8,928
86
- luna_sdk/schemas/solver_parameters/dwave/qbsolv_like_tabu_search.py,sha256=5qRDHe8ODalv65CyB_P5SDyFpZPgDcrm-EpnfYd7cHw,792
87
- luna_sdk/schemas/solver_parameters/dwave/quantum_annealing.py,sha256=uzQMb-jPDfvSYX9WGGiLqtehMtIiqt31WALk5iFZzf8,583
88
- luna_sdk/schemas/solver_parameters/dwave/repeated_reverse_quantum_annealing.py,sha256=0SwHroc4l5sMZxuWJCcEFqzkJAhmBoAW9pl4ZllvOAg,3686
89
- luna_sdk/schemas/solver_parameters/dwave/repeated_reverse_simulated_annealing.py,sha256=W3zu7g67yrDbSOeO3TLvdlvgI8mYobGeHBso8FR0IIY,4500
90
- luna_sdk/schemas/solver_parameters/dwave/saga.py,sha256=sXrWRsl7K8Xn_Ne1H5Mb9MwdLMr27HGuP4X8YpqkHR4,3123
77
+ luna_sdk/schemas/solver_parameters/dwave/base.py,sha256=PpPF49uT8XWzK-kRpkszYeFdFbksWkEDBqimq38-mzc,17281
78
+ luna_sdk/schemas/solver_parameters/dwave/dialectic_search.py,sha256=CnXg7rcZ7mHkbSLrYXPot3-73YiWTRhkhyRmjZ_pvvs,1205
79
+ luna_sdk/schemas/solver_parameters/dwave/kerberos.py,sha256=OPzCgo9h5845R3Sg_TrSkwp4gjoRKEHxhAhSdcJxY6c,2674
80
+ luna_sdk/schemas/solver_parameters/dwave/leap_hybrid_bqm.py,sha256=foPfMJLQ0enO3omknKuqIxfZTXd9oIbfi_e-N0o2tmM,637
81
+ luna_sdk/schemas/solver_parameters/dwave/leap_hybrid_cqm.py,sha256=vEKPvNB06hV_AWjRpUDrvpXPTlCqmQD0Sd-VHhoc5qs,727
82
+ luna_sdk/schemas/solver_parameters/dwave/parallel_tempering.py,sha256=maiOxI4YxcyA4gg2Xx6Oa0mNbmusDEM1ZWbsw6wcQys,1123
83
+ luna_sdk/schemas/solver_parameters/dwave/parallel_tempering_qpu.py,sha256=wy4l1KeiR8bmUHbv0r2Y1rohzU45L-Pce2ka3aPDijI,1197
84
+ luna_sdk/schemas/solver_parameters/dwave/population_annealing.py,sha256=dwWsCdeu16dYXX9n46_TXs-8TwuIT6Sp46Dur40Ga-Q,1044
85
+ luna_sdk/schemas/solver_parameters/dwave/population_annealing_qpu.py,sha256=bBMO68siEmpCcgPmi8YwiSy9L2LirHvK_fWsxiWpBcU,1338
86
+ luna_sdk/schemas/solver_parameters/dwave/qaga.py,sha256=gVucZ_1feFb7aKl6W2m34_Hx46mbshoz9Z2K4EZgngc,2499
87
+ luna_sdk/schemas/solver_parameters/dwave/qbsolv_like_qpu.py,sha256=d72lNLdtD-G6WtVGwqmCse9r_O3inDAbLc6tbDlyu-Y,554
88
+ luna_sdk/schemas/solver_parameters/dwave/qbsolv_like_simulated_annealing.py,sha256=wo5Gt6A-N7APE2Nhz_eOhxmW7P_IYTzvdDKe-4kIMn4,976
89
+ luna_sdk/schemas/solver_parameters/dwave/qbsolv_like_tabu_search.py,sha256=5r5piwo5BsAAlXmyqYMxXZDvgVTvjdJ2hVMr7-7h_lk,840
90
+ luna_sdk/schemas/solver_parameters/dwave/quantum_annealing.py,sha256=h7HXAV67hdcsB0v00AcGNoMtb3pGjyjTG2HY-u3rsHg,631
91
+ luna_sdk/schemas/solver_parameters/dwave/repeated_reverse_quantum_annealing.py,sha256=9QTkdgSesWVIfGo31uNMM0Xo-qIuL8XcmIOHlT4MzJU,3771
92
+ luna_sdk/schemas/solver_parameters/dwave/repeated_reverse_simulated_annealing.py,sha256=UeLr2MnPS3zTBQgH6eq5hYvPJpOjQjqG-shHuQ8Ct0M,4569
93
+ luna_sdk/schemas/solver_parameters/dwave/saga.py,sha256=pXWGZVXRgSMJRi3-NuyO7moai198cWXeGbvq5We-1EE,3118
91
94
  luna_sdk/schemas/solver_parameters/dwave/simulated_annealing.py,sha256=cU2UoN8xo3iM34LJhaLc-tYsCo-RqpOstiktEi79QRU,4047
92
- luna_sdk/schemas/solver_parameters/dwave/tabu_search.py,sha256=bNMPgjhfBurc4pwp25orPdXaJPG63GEcjUJzTPkEsdY,3898
95
+ luna_sdk/schemas/solver_parameters/dwave/tabu_search.py,sha256=fqLoUcBT_CVBq8nmY-KGO_wBmVpAgUSSoS8N_tAOZ6E,3979
93
96
  luna_sdk/schemas/solver_parameters/fujitsu/__init__.py,sha256=V4CSTiNSmtBvNuQpxiTZqX9T-oV4M8hZGQ_eO5Ro8vU,549
94
- luna_sdk/schemas/solver_parameters/fujitsu/base.py,sha256=fqYHgl2JqpKnmMRlCMMaywWo6P1aTVbUsYQ-BpMQbb4,1736
97
+ luna_sdk/schemas/solver_parameters/fujitsu/base.py,sha256=yDM2sLBtg-a5OsD3GqwTd-HMmIwJtubbP_QxQcrkDnA,1813
95
98
  luna_sdk/schemas/solver_parameters/fujitsu/digital_annealer_cpu.py,sha256=EBPE7mwtUNs5CmyVkdWV9jQT_YnW8FWsYQ0VyCHBVNM,9747
96
99
  luna_sdk/schemas/solver_parameters/fujitsu/digital_annealer_v2.py,sha256=SJb4Uffj7WmBf1-9ai0dTj1WE5A7A3pVhV9FXAcmJ-8,10343
97
100
  luna_sdk/schemas/solver_parameters/fujitsu/digital_annealer_v3.py,sha256=0iQBGLtT8SJaR6iKwoNytANtnZuoTtQmmc-jGSFCntU,12743
98
- luna_sdk/schemas/solver_parameters/fujitsu/partial_config.py,sha256=1QI370Pa91JM_2c_CeYtpMkV3vG5dGq-zQv8BtLwSUo,8084
101
+ luna_sdk/schemas/solver_parameters/fujitsu/partial_config.py,sha256=4m9DURxXSr1-yKRCCMii-VUKSNTL4Zs1ibYzAHFhPeg,8166
99
102
  luna_sdk/schemas/solver_parameters/ibm/__init__.py,sha256=KGH8Dx8mNe2qKeIS6emcuibbVzqUETXDsQk9OwemyuQ,165
100
103
  luna_sdk/schemas/solver_parameters/ibm/qaoa.py,sha256=71ogy-ViA2bggVf4-GglVW-LVn9yKDNWEoKs09ApI5A,2453
101
- luna_sdk/schemas/solver_parameters/ibm/standard_parameters.py,sha256=6p1bP38bCq4IZjKEg24Jqriss6uDZuwmvMblwgAH-3Q,820
104
+ luna_sdk/schemas/solver_parameters/ibm/standard_parameters.py,sha256=ntWmDrf672syYZ1PwOg33e-yBuVi0de4H58qWEcRa8g,4710
102
105
  luna_sdk/schemas/solver_parameters/ibm/vqe.py,sha256=2uCgqHJHAmRO53wP4YKLkFVVwHhThkgk3A9CB1tQOFM,2198
103
106
  luna_sdk/schemas/solver_parameters/qctrl/__init__.py,sha256=mB7Rl-9cNCiJ7ueGXEHazSecxlOI3CVZd1AD-xKqzJY,73
104
- luna_sdk/schemas/solver_parameters/qctrl/qaoa.py,sha256=QcpTXd3rMmICLuE4l_38X_VA9wL3xc_6Lrh30wExfyA,1901
107
+ luna_sdk/schemas/solver_parameters/qctrl/qaoa.py,sha256=wolh1p0A7iD-q2vbITjzPUmp3Jva0D1_Ft4LjZm81Ak,1950
105
108
  luna_sdk/schemas/transformations/__init__.py,sha256=3M2rkSeGCuEHvL9joHjA34xiXgocpvpCey4GkywkW58,90
106
109
  luna_sdk/schemas/transformations/bqm.py,sha256=n3D8rVFutJ3ChWNakqfQaBMcTTldaF3bFQsYyDo-mt4,679
107
110
  luna_sdk/schemas/transformations/matrix.py,sha256=SbPzVQUm7racTECkgRLeiUreaNwaa_RXZI3IivnpKw0,251
@@ -152,9 +155,12 @@ luna_sdk/schemas/use_cases/traffic_flow.py,sha256=wWDOPsFOYw3RxOh4Q8NLOm270pvuIj
152
155
  luna_sdk/schemas/use_cases/travelling_salesman_problem.py,sha256=PnqDf4CihQB4PRZd3BNxT1W2bizmQ_h7dccxrp99qLc,1701
153
156
  luna_sdk/schemas/use_cases/type_aliases.py,sha256=4qR7uRU77aTGC5x1q8Vi_zgTrpVMhVbpnSQovzSV-Rs,257
154
157
  luna_sdk/schemas/use_cases/weighted_max_cut.py,sha256=fpAns-MiONHvotI-lSSQvoxW7lx9OUzBtihx3GbGuyw,1022
158
+ luna_sdk/schemas/wrappers/__init__.py,sha256=1zq5BWRjDidbRJ346JOCSbP6Q9rhf4NiLhZY4xKrKq4,54
159
+ luna_sdk/schemas/wrappers/datetime_wrapper.py,sha256=6usmPJNRYA4Fe_-0NGwe7RYams46CCAXpJs8YULu_yc,794
155
160
  luna_sdk/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
156
- luna_sdk/utils/qpu_tokens.py,sha256=XpUNI102TLshfR85ZxvSFmXmH1fb1JAI8NKlIiuWEqc,1535
157
- luna_quantum-0.0.16.dist-info/LICENSE,sha256=rwwuFPLz36oRvjWu2oEeX42Qtn9gmbh7zRC2OqCFNaI,11342
158
- luna_quantum-0.0.16.dist-info/METADATA,sha256=b-7jJ29ly5fCJf4gUJWPJON8VgwMyGzYpKHS9JIOgIw,2263
159
- luna_quantum-0.0.16.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
160
- luna_quantum-0.0.16.dist-info/RECORD,,
161
+ luna_sdk/utils/parameter_finder.py,sha256=LKkd1upH3Djd6eqkcSQ2feNwPUiKi8soYkx6JT1_VSg,2937
162
+ luna_sdk/utils/qpu_tokens.py,sha256=xrh5KSoWzbul-6eRa0ELH9iwEENanE7PIms7jlCt3NY,1641
163
+ luna_quantum-0.0.33.dist-info/LICENSE,sha256=rwwuFPLz36oRvjWu2oEeX42Qtn9gmbh7zRC2OqCFNaI,11342
164
+ luna_quantum-0.0.33.dist-info/METADATA,sha256=5ojTfod6BKHtIKnRn_utUm3CVd9OifvhK8Lk2xqhD8o,2311
165
+ luna_quantum-0.0.33.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
166
+ luna_quantum-0.0.33.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,57 +1,75 @@
1
1
  import os
2
+ from enum import Enum
3
+ from typing import Optional, Literal
2
4
 
3
- from httpx import Client
4
- from luna_sdk.controllers.custom_login_client import CustomLoginClient
5
+ import httpx
5
6
 
7
+ from luna_sdk.controllers.luna_http_client import LunaHTTPClient
8
+ from luna_sdk.error.http_error_utils import HttpErrorUtils
6
9
  from luna_sdk.interfaces.clients.client_i import IClient
7
10
 
8
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
+
9
30
  class LunaPlatformClient(IClient):
10
31
  _base_url: str = ""
11
32
 
12
- _client: Client = None # type: ignore
33
+ _client: httpx.Client = None # type: ignore
13
34
 
14
35
  def __init__(
15
36
  self,
16
- email: str,
17
- password: str,
37
+ api_key: str,
38
+ api: LunaPrefixEnum,
18
39
  base_url: str = os.getenv("LUNA_BASE_URL", "https://api.aqarios.com"),
19
- timeout: float = 10.0,
40
+ timeout: Optional[float] = 240.0,
20
41
  ):
21
42
  """
22
- ClientCtrl is a main entrypoint of the SDK.
43
+ LunaPlatformClient is a main entrypoint of the SDK.
23
44
  All the operations with entities should be processed using an instance of
24
- ClientCtrl.
45
+ LunaPlatformClient.
25
46
 
26
47
  Parameters
27
48
  ----------
28
- email:
29
- User's email
30
- password:
31
- 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.
32
53
  base_url:
33
54
  Base API URL.
34
55
  If you want to use API not on your local PC then change it.
35
56
  You can do that by setting the environment variable LUNA_BASE_URL.
36
57
  Default value https://api.aqarios.com.
37
58
  timeout:
38
- Timeout for the requests.
39
- Default value 10.
40
-
41
- Returns
42
- -------
59
+ Default timeout in seconds for the requests via the LunaQ client. `None`
60
+ means that the SDK uses no timeouts. Note that either way the Luna platform
61
+ itself will time out after 240 seconds.
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,4 +1,6 @@
1
- from luna_sdk.controllers.luna_platform_client import LunaPlatformClient
1
+ from typing import Optional
2
+
3
+ from luna_sdk.controllers.luna_platform_client import LunaPlatformClient, LunaPrefixEnum
2
4
  from luna_sdk.interfaces import ICircuitRepo
3
5
  from luna_sdk.interfaces.clients.luna_q_i import ILunaQ
4
6
  from luna_sdk.interfaces.qpu_token_repo_i import IQpuTokenRepo
@@ -9,28 +11,21 @@ class LunaQ(LunaPlatformClient, ILunaQ):
9
11
  qpu_token: IQpuTokenRepo = None # type: ignore
10
12
  circuit: ICircuitRepo = None # type: ignore
11
13
 
12
- def __init__(
13
- self,
14
- email: str,
15
- password: str,
16
- timeout: float = 10.0,
17
- ):
14
+ def __init__(self, api_key: str, timeout: Optional[float] = 240.0):
18
15
  """
19
16
  LunaQ is the main entrypoint for all LunaQ related tasks.
20
17
 
21
18
  Parameters
22
19
  ----------
23
- email: str
24
- User's email
25
- password: str
26
- User's password
20
+ api_key: str
21
+ User's API key
27
22
  timeout: float
28
- Timeout for the requests. Default value 10.
29
-
30
- Returns
31
- -------
23
+ Default timeout in seconds for the requests via the LunaQ client. `None`
24
+ means that the SDK uses no timeouts. Note that either way the Luna platform
25
+ itself will time out after 240 seconds.
26
+ Default: 240.0
32
27
  """
33
- super().__init__(email=email, password=password, timeout=timeout)
28
+ super().__init__(api_key=api_key, api=LunaPrefixEnum.LUNA_Q, timeout=timeout)
34
29
 
35
30
  self.circuit = CircuitRepo(self._client)
36
31
  self.qpu_token = QpuTokenRepo(self._client)
@@ -1,4 +1,6 @@
1
- from luna_sdk.controllers.luna_platform_client import LunaPlatformClient
1
+ from typing import Optional
2
+
3
+ from luna_sdk.controllers.luna_platform_client import LunaPlatformClient, LunaPrefixEnum
2
4
  from luna_sdk.interfaces import ISolutionsRepo
3
5
  from luna_sdk.interfaces.clients.luna_solve_i import ILunaSolve
4
6
  from luna_sdk.interfaces.info_repo_i import IInfoRepo
@@ -16,30 +18,23 @@ class LunaSolve(LunaPlatformClient, ILunaSolve):
16
18
  qpu_token: IQpuTokenRepo = None # type: ignore
17
19
  info: IInfoRepo = None # type: ignore
18
20
 
19
- def __init__(
20
- self,
21
- email: str,
22
- password: str,
23
- timeout: float = 10.0,
24
- ):
21
+ def __init__(self, api_key: str, timeout: Optional[float] = 240.0):
25
22
  """
26
23
  LunaSolve is the main entrypoint for all LunaSolve related tasks.
27
24
 
28
25
  Parameters
29
26
  ----------
30
- email: str
31
- User's email
32
- password: str
33
- User's password
27
+ api_key: str
28
+ User's API key
34
29
  timeout: float
35
- Timeout for the requests. Default value 10.
36
-
37
- Returns
38
- -------
30
+ Default timeout in seconds for the requests via the LunaQ client. `None`
31
+ means that the SDK uses no timeouts. Note that either way the Luna platform
32
+ itself will time out after 240 seconds.
33
+ Default: 240.0
39
34
  """
40
35
  super().__init__(
41
- email=email,
42
- password=password,
36
+ api_key=api_key,
37
+ api=LunaPrefixEnum.LUNA_SOLVE,
43
38
  timeout=timeout,
44
39
  )
45
40
 
@@ -1,4 +1,6 @@
1
- from luna_sdk.controllers.luna_platform_client import LunaPlatformClient
1
+ from typing import Optional
2
+
3
+ from luna_sdk.controllers.luna_platform_client import LunaPlatformClient, LunaPrefixEnum
2
4
  from luna_sdk.interfaces.clients.luna_transform_i import ILunaTransform
3
5
  from luna_sdk.interfaces.cplex_repo_i import ICplexRepo
4
6
  from luna_sdk.interfaces.lp_repo_i import ILPRepo
@@ -12,28 +14,25 @@ class LunaTransform(LunaPlatformClient, ILunaTransform):
12
14
 
13
15
  def __init__(
14
16
  self,
15
- email: str,
16
- password: str,
17
- timeout: float = 10.0,
17
+ api_key: str,
18
+ timeout: Optional[float] = 240.0,
18
19
  ):
19
20
  """
20
- LunaSolve is the main entrypoint for all LunaSolve related tasks.
21
+ LunaTransform is the main entrypoint for all LunaTransform related tasks.
21
22
 
22
23
  Parameters
23
24
  ----------
24
- email: str
25
- User's email
26
- password: str
27
- User's password
25
+ api_key: str
26
+ User's API key
28
27
  timeout: float
29
- Timeout for the requests. Default value 10.
30
-
31
- Returns
32
- -------
28
+ Default timeout in seconds for the requests via the LunaQ client. `None`
29
+ means that the SDK uses no timeouts. Note that either way the Luna platform
30
+ itself will time out after 240 seconds.
31
+ Default: 240.0
33
32
  """
34
33
  super().__init__(
35
- email=email,
36
- password=password,
34
+ api_key=api_key,
35
+ api=LunaPrefixEnum.LUNA_SOLVE,
37
36
  timeout=timeout,
38
37
  )
39
38
 
@@ -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
 
@@ -15,8 +15,8 @@ class ICircuitRepo(IRepository, ABC):
15
15
  provider: CircuitProviderEnum,
16
16
  params: Dict[str, Any] = {},
17
17
  qpu_tokens: Optional[TokenProvider] = None,
18
- timeout: Optional[float] = 10800.0,
19
18
  encryption_key: Optional[str] = None,
19
+ **kwargs,
20
20
  ) -> CircuitJob:
21
21
  """
22
22
  Create a circuit solution.
@@ -31,12 +31,11 @@ class ICircuitRepo(IRepository, ABC):
31
31
  Additional parameters of the circuit.
32
32
  qpu_tokens: Optional[TokenProvider]
33
33
  The tokens to be used for the QPU.
34
- timeout: Optional[float]
35
- Default = 10800.0. Timeout for the api request. If set to None,
36
- there won't be any timeout. Increase or disable the timeout if you face
37
- issues uploading big Problems.
38
34
  encryption_key: Optional[str]
39
35
  Encryption key to be used for encryption of QPU tokens.
36
+ **kwargs
37
+ Parameters to pass to `httpx.request`.
38
+
40
39
  Returns
41
40
  -------
42
41
  CircuitJob
@@ -46,17 +45,24 @@ class ICircuitRepo(IRepository, ABC):
46
45
 
47
46
  @abstractmethod
48
47
  def get(
49
- self, job: CircuitJob, encryption_key: Optional[str] = None
48
+ self,
49
+ job: CircuitJob,
50
+ encryption_key: Optional[str] = None,
51
+ **kwargs,
50
52
  ) -> CircuitResult:
51
53
  """
52
- Attributes:
53
- choices: A list containing a string or `AliasPath`.
54
+ Get the result of a circuit.
55
+
56
+ Parameters
57
+ ----------
54
58
  encryption_key: Optional[str]
55
59
  Encryption key to be used for encryption of QPU tokens.
60
+ **kwargs
61
+ Parameters to pass to `httpx.request`.
56
62
 
57
- This is equivalent to Python ``sum`` of :meth:`time.time`.
58
- :time.time: 1.0
59
- `CircuitResult`
60
- Some sections are omitted here for simplicity.
63
+ Returns
64
+ -------
65
+ CircuitResult
66
+ The result of solving the circuit.
61
67
  """
62
68
  raise NotImplementedError