Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove datetime suffix from job names. #139

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/basics/backend_configuration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"# Run a CompileJob targeting an IBMQ device\n",
"\n",
"compile_job_IBMQ = qnx.start_compile_job(\n",
" name=f\"My IBMQ compilation job from {datetime.now()}\",\n",
" name=f\"My IBMQ compilation job\",\n",
" circuits=[my_circuit_ref],\n",
" backend_config=my_ibmq_config,\n",
" project=my_project_ref,\n",
Expand All @@ -117,7 +117,7 @@
"# Run an ExecuteJob targeting the H1-1 Syntax Checker device\n",
"\n",
"execute_job_H1_1LE = qnx.start_execute_job(\n",
" name=f\"My H1-1LE execution job from {datetime.now()}\",\n",
" name=f\"My H1-1LE execution job\",\n",
" circuits=[my_circuit_ref],\n",
" n_shots=[1000],\n",
" backend_config=my_quantinuum_config,\n",
Expand Down
6 changes: 3 additions & 3 deletions examples/basics/braket_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@
"circuit = Circuit(2).H(0).CX(0,1).measure_all()\n",
"\n",
"my_circuit_ref = qnx.circuits.upload(\n",
" name=f\"My AWS Braket Circuit from {datetime.now()}\",\n",
" name=f\"My AWS Braket Circuit\",\n",
" circuit = circuit,\n",
" project = my_project_ref,\n",
")\n",
"\n",
"compiled_circuits = qnx.compile(\n",
" circuits=[my_circuit_ref],\n",
" name=f\"My Compile Job from {datetime.now()}\",\n",
" name=f\"My Compile Job\",\n",
" optimisation_level=1,\n",
" backend_config=braket_config,\n",
" project=my_project_ref,\n",
Expand All @@ -128,7 +128,7 @@
"\n",
"execute_job_ref = qnx.start_execute_job(\n",
" circuits=compiled_circuits,\n",
" name=f\"My Execute Job from {datetime.now()}\",\n",
" name=f\"My Execute Job\",\n",
" n_shots=[100],\n",
" backend_config=braket_config,\n",
" project=my_project_ref,\n",
Expand Down
4 changes: 2 additions & 2 deletions examples/basics/getting_started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "qnexus-CH5Ijvve-py3.10",
"language": "python",
"name": "python3"
},
Expand All @@ -549,7 +549,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.14"
"version": "3.10.8"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions examples/basics/ibmq_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,14 @@
"circuit = Circuit(2).H(0).CX(0,1).measure_all()\n",
"\n",
"my_circuit_ref = qnx.circuits.upload(\n",
" name=f\"My IBM Kyiv Circuit from {datetime.now()}\",\n",
" name=f\"My IBM Kyiv Circuit\",\n",
" circuit = circuit,\n",
" project = my_project_ref,\n",
")\n",
"\n",
"execute_job_ref = qnx.start_execute_job(\n",
" circuits=[my_circuit_ref],\n",
" name=f\"My Execute Job from {datetime.now()}\",\n",
" name=f\"My Execute Job\",\n",
" n_shots=[100],\n",
" backend_config=ibm_kyiv_configuration,\n",
" project=my_project_ref,\n",
Expand Down
14 changes: 6 additions & 8 deletions examples/basics/jobs_results.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@
"metadata": {},
"outputs": [],
"source": [
"my_job_name_prefix = datetime.now()\n",
"\n",
"my_project_ref = qnx.projects.get_or_create(name=\"My Project\")\n",
"\n",
"my_circuit_ref = qnx.circuits.upload(\n",
" name=f\"My Circuit from {datetime.now()}\",\n",
" name=f\"My Circuit\",\n",
" circuit = Circuit(2).H(0).CX(0,1).measure_all(),\n",
" project = my_project_ref,\n",
")"
Expand All @@ -65,7 +63,7 @@
"\n",
"compiled_circuits = qnx.compile(\n",
" circuits=[my_circuit_ref],\n",
" name=f\"{my_job_name_prefix}_compile\",\n",
" name=f\"compile\",\n",
" optimisation_level=1,\n",
" backend_config=qnx.QuantinuumConfig(device_name=\"H1-1LE\"),\n",
" project=my_project_ref,\n",
Expand All @@ -84,7 +82,7 @@
"\n",
"compile_job_ref = qnx.start_compile_job(\n",
" circuits=[my_circuit_ref],\n",
" name=f\"{my_job_name_prefix}_compile_async\",\n",
" name=f\"compile_async\",\n",
" optimisation_level=1,\n",
" backend_config=qnx.QuantinuumConfig(device_name=\"H1-1LE\"),\n",
" project=my_project_ref\n",
Expand Down Expand Up @@ -138,7 +136,7 @@
"\n",
"results = qnx.execute(\n",
" circuits=compiled_circuits,\n",
" name=f\"{my_job_name_prefix}_execute\",\n",
" name=f\"execute\",\n",
" n_shots=[100]* len(compiled_circuits),\n",
" backend_config=qnx.QuantinuumConfig(device_name=\"H1-1LE\"),\n",
" project=my_project_ref,\n",
Expand All @@ -157,7 +155,7 @@
"\n",
"execute_job_ref = qnx.start_execute_job(\n",
" circuits=compiled_circuits,\n",
" name=f\"{my_job_name_prefix}_execute_async\",\n",
" name=f\"execute_async\",\n",
" n_shots=[100]* len(compiled_circuits),\n",
" backend_config=qnx.QuantinuumConfig(device_name=\"H1-1LE\"),\n",
" project=my_project_ref,\n",
Expand Down Expand Up @@ -255,7 +253,7 @@
"source": [
"other_execute_job_ref = qnx.start_execute_job(\n",
" circuits=compiled_circuits,\n",
" name=f\"{my_job_name_prefix}_execute_other\",\n",
" name=f\"execute_other\",\n",
" n_shots=[100]* len(compiled_circuits),\n",
" backend_config=qnx.QuantinuumConfig(device_name=\"H1-1LE\"),\n",
" project=my_project_ref,\n",
Expand Down
12 changes: 6 additions & 6 deletions examples/basics/projects_properties_context.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"outputs": [],
"source": [
"# Get a ProjectRef \n",
"my_project_ref = qnx.projects.create(name=f\"My Project from {datetime.now()}\")\n",
"my_project_ref = qnx.projects.create(name=f\"My Project\")\n",
"\n",
"# Show basic information about the project\n",
"my_project_ref.df()"
Expand Down Expand Up @@ -91,7 +91,7 @@
"# We can then define property values on data we create within the project\n",
"\n",
"my_circuit_ref = qnx.circuits.upload(\n",
" name=f\"My Circuit from {datetime.now()}\",\n",
" name=f\"My Circuit\",\n",
" circuit = Circuit(2).ZZPhase(0.5, 0, 1).measure_all(),\n",
" project = my_project_ref,\n",
" properties={\"molecule_type\": \"H2\"},\n",
Expand Down Expand Up @@ -129,22 +129,22 @@
"\n",
" # These values can be overridden, with parameters taking precedence over context\n",
" my_circuit_ref = qnx.circuits.upload(\n",
" name=f\"My Circuit from {datetime.now()}\",\n",
" name=f\"My Circuit\",\n",
" circuit = Circuit(2).ZZPhase(0.5, 0, 1).measure_all(),\n",
" project=qnx.projects.create(name=f\"My other Nexus Project from {datetime.now()}\")\n",
" project=qnx.projects.create(name=f\"My other Nexus Project\")\n",
" )\n",
"\n",
" with qnx.context.using_properties(molecule_type = \"H2\", iteration = 0):\n",
"\n",
" # Create a circuit within the project and with defined property values\n",
" my_circuit_ref = qnx.circuits.upload(\n",
" name=f\"My Circuit from {datetime.now()}\",\n",
" name=f\"My Circuit\",\n",
" circuit = Circuit(2).ZZPhase(0.5, 0, 1).measure_all(),\n",
" )\n",
"\n",
" # Property parameters will be the union of the parameters and context (parameters take precedence)\n",
" my_circuit_ref = qnx.circuits.upload(\n",
" name=f\"My Circuit from {datetime.now()}\",\n",
" name=f\"My Circuit\",\n",
" circuit = Circuit(2).ZZPhase(0.5, 0, 1).measure_all(),\n",
" properties={\"iteration\": 1},\n",
" )\n"
Expand Down
8 changes: 4 additions & 4 deletions examples/basics/quantinuum_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
"```python\n",
"execute_job_ref = qnx.start_execute_job(\n",
" circuits=my_circuit_ref,\n",
" name=f\"My Execute Job from {datetime.now()}\",\n",
" name=f\"My Execute Job\",\n",
" n_shots=[100],\n",
" backend_config=backend_config,\n",
" project=my_project_ref,\n",
Expand Down Expand Up @@ -298,7 +298,7 @@
"circuit = Circuit(2).H(0).CX(0,1).measure_all()\n",
"\n",
"my_circuit_ref = qnx.circuits.upload(\n",
" name=f\"My H-series Circuit from {datetime.now()}\",\n",
" name=f\"My H-series Circuit\",\n",
" circuit = circuit,\n",
" project = my_project_ref,\n",
")"
Expand All @@ -314,7 +314,7 @@
"\n",
"compiled_circuits = qnx.compile(\n",
" circuits=[my_circuit_ref],\n",
" name=f\"My Compile Job from {datetime.now()}\",\n",
" name=f\"My Compile Job\",\n",
" optimisation_level=1,\n",
" backend_config=backend_config,\n",
" project=my_project_ref,\n",
Expand Down Expand Up @@ -350,7 +350,7 @@
"\n",
"execute_job_ref = qnx.start_execute_job(\n",
" circuits=compiled_circuits,\n",
" name=f\"My Execute Job from {datetime.now()}\",\n",
" name=f\"My Execute Job\",\n",
" n_shots=[100]* len(compiled_circuits),\n",
" backend_config=backend_config,\n",
" project=my_project_ref,\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/basics/refs_nexus_iterator.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"source": [
"# Upload a circuit to Nexus, getting a CircuitRef in return\n",
"my_circuit_ref = qnx.circuits.upload(\n",
" name=f\"My Circuit from {datetime.now()}\",\n",
" name=f\"My Circuit\",\n",
" circuit = Circuit(2).H(0).CX(0,1).measure_all(),\n",
" project = my_project_ref,\n",
")\n",
Expand Down
4 changes: 2 additions & 2 deletions examples/basics/saving_refs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
"metadata": {},
"outputs": [],
"source": [
"job_name = f\"Job from {datetime.now()}\"\n",
"job_name = f\"Job\"\n",
"\n",
"my_project_ref = qnx.projects.get_or_create(name=\"My Project\")\n",
"\n",
"my_circuit_ref = qnx.circuits.upload(\n",
" name=f\"My Circuit from {datetime.now()}\",\n",
" name=f\"My Circuit\",\n",
" circuit = Circuit(2).ZZPhase(0.5, 0, 1).measure_all(),\n",
" project = my_project_ref,\n",
")\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/basics/teams_roles.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"source": [
"# Create a new Team\n",
"\n",
"my_team = qnx.teams.create(name=f\"My Team, created on {datetime.now()}\")"
"my_team = qnx.teams.create(name=f\"My Team\")"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions examples/basics/wasm_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
"source": [
"compiled_circuits = qnx.compile(\n",
" circuits=[my_circuit_ref],\n",
" name=f\"My Compile Job from {datetime.now()}\",\n",
" name=f\"My Compile Job\",\n",
" optimisation_level=1,\n",
" backend_config=backend_config,\n",
")\n",
Expand All @@ -147,7 +147,7 @@
"source": [
"execute_job_ref = qnx.start_execute_job(\n",
" circuits=[my_circuit_ref],\n",
" name=f\"My Execute Job from {datetime.now()}\",\n",
" name=f\"My Execute Job\",\n",
" n_shots=[100],\n",
" backend_config=backend_config,\n",
" wasm_module=wasm_module_ref,\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,38 +158,38 @@
" config: qnx.BackendConfig,\n",
" num_shots: int,\n",
"):\n",
" \n",
"\n",
" device_name = qnx.context.get_active_properties().get(\"name_qpu\")\n",
"\n",
" compiled_pauli_refs = qnx.compile(\n",
" circuits=[pauli_circuit_ref],\n",
" name=f\"Pauli Gadget Circuit Compilation for {device_name} on {datetime.now()}\",\n",
" name=f\"Pauli Gadget Circuit Compilation for {device_name}\",\n",
" properties={\"circuit_type\": \"pauli_gadget\"},\n",
" backend_config=config\n",
" )\n",
"\n",
" compiled_reg_refs = qnx.compile(\n",
" circuits=[bell_circuit_ref],\n",
" name=f\"Bell Circuit Compilation for {device_name} on {datetime.now()}\",\n",
" name=f\"Bell Circuit Compilation for {device_name}\",\n",
" properties={\"circuit_type\": \"bell_state\"},\n",
" backend_config=config\n",
" )\n",
"\n",
" with qnx.context.using_properties(\n",
" num_shots=num_shots, \n",
" num_shots=num_shots,\n",
" ):\n",
" \n",
"\n",
" qnx.start_execute_job(\n",
" circuits=compiled_pauli_refs,\n",
" n_shots=[num_shots],\n",
" name=f\"Pauli Gadget Circuit Execution for {device_name} on {datetime.now()}\",\n",
" name=f\"Pauli Gadget Circuit Execution for {device_name}\",\n",
" properties={\"circuit_type\": \"pauli_gadget\"},\n",
" backend_config=config,\n",
" )\n",
" qnx.start_execute_job(\n",
" circuits=compiled_reg_refs,\n",
" n_shots=[num_shots],\n",
" name=f\"Bell State Circuit Execution for {device_name} on {datetime.now()}\",\n",
" name=f\"Bell State Circuit Execution for {device_name}\",\n",
" properties={\"circuit_type\": \"bell_state\"},\n",
" backend_config=config,\n",
" )"
Expand Down Expand Up @@ -252,7 +252,7 @@
"source": [
"# Run on the Aer simulator\n",
"with qnx.context.using_properties(name_qpu=\"Aer\"):\n",
" \n",
"\n",
" with qnx.context.using_properties(noisy=True):\n",
"\n",
" run_workflow(\n",
Expand Down Expand Up @@ -297,7 +297,7 @@
" properties={\n",
" \"circuit_type\": \"bell_state\",\n",
" # Uncomment the below line to filter by the name of the QPU\n",
" #\"name_qpu\": \"H1-Emulator\", \n",
" #\"name_qpu\": \"H1-Emulator\",\n",
" \"noisy\": False,\n",
" }\n",
")\n",
Expand Down
Loading
Loading