Skip to content
This repository has been archived by the owner on Feb 4, 2025. It is now read-only.

Commit

Permalink
[QI2-1071] Change client_id for E2E tests (#26)
Browse files Browse the repository at this point in the history
* [QI2-1071] Change client_id for E2E tests

* [QI2-1071] Refactored usage of CLIENT_ID variable
  • Loading branch information
eliasKA authored Nov 26, 2024
1 parent 6a82531 commit c10f844
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/e2e_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ def _get_auth_tokens() -> None:
IDP_URL_STAGING = "https://quantum-inspire-staging.eu.auth0.com"
QI2_DEFAULT_HOST = "https://staging.qi2.quantum-inspire.com"

CLIENT_ID = "Yz7ni9PUAyT43eUASZfmc1yqI66QxLUJ"
E2E_USERNAME = os.getenv("E2E_USERNAME")
E2E_PASSWORD = os.getenv("E2E_PASSWORD")

payload = {
"grant_type": "password",
"client_id": "JOggYaBeGIkApEPIlQDZk8061Q8qHl4v",
"client_id": CLIENT_ID,
"username": E2E_USERNAME,
"password": E2E_PASSWORD,
"scope": "api-access openid profile email offline_access",
Expand All @@ -54,7 +55,7 @@ def _get_auth_tokens() -> None:
host = QI2_DEFAULT_HOST
member_id = asyncio.run(_fetch_team_member_id(host=host, access_token=token_info["access_token"]))
auth_settings = AuthSettings(
client_id="Yz7ni9PUAyT43eUASZfmc1yqI66QxLUJ",
client_id=CLIENT_ID,
code_challenge_method="S256",
code_verifyer_length=64,
well_known_endpoint=f"{IDP_URL_STAGING}/.well-known/openid-configuration",
Expand Down Expand Up @@ -94,8 +95,7 @@ def my_quantum_circuit(circuit_params): # type: ignore
# Step 5: Perform optimization (optional)
# For example, use gradient descent to minimize the output
opt = qml.GradientDescentOptimizer(stepsize=0.1)
for i in range(3):
params = opt.step(my_quantum_circuit, params)
params = opt.step(my_quantum_circuit, params)
result = my_quantum_circuit(params)
print(f"Optimized params: {params}")
print(f"Optimized result: {result}")
Expand Down

0 comments on commit c10f844

Please sign in to comment.