Skip to content
Closed
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: 4 additions & 0 deletions src/quantum/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

1.0.0b15
+++++++++++++++
* Removed deprecated ``--location``/``-l`` parameter from ``quantum execute``, ``quantum run``, ``quantum job submit``, ``quantum job cancel``, ``quantum job list``, ``quantum job output``, ``quantum job show``, ``quantum job wait``, ``quantum target list``, ``quantum workspace set``, and ``quantum workspace quotas`` commands.

1.0.0b14
+++++++++++++++
* Updated control plane related commands to use latest API version 2025-12-15-preview
Expand Down
15 changes: 1 addition & 14 deletions src/quantum/azext_quantum/_breaking_change.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
from azure.cli.core.breaking_change import register_argument_deprecate

register_argument_deprecate('quantum execute', '--location', target_version="May 2026")
register_argument_deprecate('quantum run', '--location', target_version="May 2026")
register_argument_deprecate('quantum job submit', '--location', target_version="May 2026")
register_argument_deprecate('quantum job cancel', '--location', target_version="May 2026")
register_argument_deprecate('quantum job list', '--location', target_version="May 2026")
register_argument_deprecate('quantum job output', '--location', target_version="May 2026")
register_argument_deprecate('quantum job show', '--location', target_version="May 2026")
register_argument_deprecate('quantum job wait', '--location', target_version="May 2026")
register_argument_deprecate('quantum target list', '--location', target_version="May 2026")
register_argument_deprecate('quantum workspace set', '--location', target_version="May 2026")
register_argument_deprecate('quantum workspace quotas', '--location', target_version="May 2026")
# --------------------------------------------------------------------------------------------
52 changes: 26 additions & 26 deletions src/quantum/azext_quantum/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@
examples:
- name: Run QIR bitcode from a file in the current folder and wait for the result.
text: |-
az quantum execute -g MyResourceGroup -w MyWorkspace -l MyLocation -t MyTarget \\
az quantum execute -g MyResourceGroup -w MyWorkspace -t MyTarget \\
--job-name MyJob --job-input-format qir.v1 --job-input-file MyQirBitcode.bc \\
--entry-point MyQirEntryPoint
- name: Run a Quil pass-through job on the Rigetti simulator and wait for the result.
text: |-
az quantum execute -g MyResourceGroup -w MyWorkspace -l MyLocation \\
az quantum execute -g MyResourceGroup -w MyWorkspace \\
-t rigetti.sim.qvm --job-name MyJob --job-input-file MyProgram.quil \\
--job-input-format rigetti.quil.v1 --job-output-format rigetti.quil-results.v1
- name: Submit a Qiskit circuit to the IonQ simulator with job params and wait for the results.
text: |-
az quantum execute -g MyResourceGroup -w MyWorkspace -l MyLocation \\
az quantum execute -g MyResourceGroup -w MyWorkspace \\
-t ionq.simulator --job-name MyJobName --job-input-file MyCircuit.json \\
--job-input-format ionq.circuit.v1 --job-output-format ionq.quantum-results.v1 \\
--job-params count=100 content-type=application/json
Expand All @@ -40,17 +40,17 @@
examples:
- name: Run QIR bitcode from a file in the current folder and wait for the result.
text: |-
az quantum run -g MyResourceGroup -w MyWorkspace -l MyLocation -t MyTarget \\
az quantum run -g MyResourceGroup -w MyWorkspace -t MyTarget \\
--job-name MyJob --job-input-format qir.v1 --job-input-file MyQirBitcode.bc \\
--entry-point MyQirEntryPoint
- name: Run a Quil pass-through job on the Rigetti simulator and wait for the result.
text: |-
az quantum run -g MyResourceGroup -w MyWorkspace -l MyLocation \\
az quantum run -g MyResourceGroup -w MyWorkspace \\
-t rigetti.sim.qvm --job-name MyJob --job-input-file MyProgram.quil \\
--job-input-format rigetti.quil.v1 --job-output-format rigetti.quil-results.v1
- name: Submit a Qiskit circuit to the IonQ simulator with job params and wait for the results.
text: |-
az quantum run -g MyResourceGroup -w MyWorkspace -l MyLocation \\
az quantum run -g MyResourceGroup -w MyWorkspace \\
-t ionq.simulator --job-name MyJobName --job-input-file MyCircuit.json \\
--job-input-format ionq.circuit.v1 --job-output-format ionq.quantum-results.v1 \\
--job-params count=100 content-type=application/json
Expand All @@ -67,31 +67,31 @@
examples:
- name: Get the list of jobs from an Azure Quantum workspace.
text: |-
az quantum job list -g MyResourceGroup -w MyWorkspace -l MyLocation
az quantum job list -g MyResourceGroup -w MyWorkspace
- name: List jobs that used the quantinuum provider.
text: |-
az quantum job list -g MyResourceGroup -w MyWorkspace -l MyLocation --provider-id quantinuum
az quantum job list -g MyResourceGroup -w MyWorkspace --provider-id quantinuum
- name: List jobs that ran on the ionq.simulator target.
text: |-
az quantum job list -g MyResourceGroup -w MyWorkspace -l MyLocation --target-id ionq.simulator
az quantum job list -g MyResourceGroup -w MyWorkspace --target-id ionq.simulator
- name: List jobs that completed successfully.
text: |-
az quantum job list -g MyResourceGroup -w MyWorkspace -l MyLocation --status Succeeded
az quantum job list -g MyResourceGroup -w MyWorkspace --status Succeeded
- name: List jobs created after January 15th, 2025.
text: |-
az quantum job list -g MyResourceGroup -w MyWorkspace -l MyLocation --created-after 2025-01-15
az quantum job list -g MyResourceGroup -w MyWorkspace --created-after 2025-01-15
- name: List jobs whose names start with "Generate...".
text: |-
az quantum job list -g MyResourceGroup -w MyWorkspace -l MyLocation --job-name Generate
az quantum job list -g MyResourceGroup -w MyWorkspace --job-name Generate
- name: Skip the first 50 jobs, start listing at the 51st job and list 10 jobs.
text: |-
az quantum job list -g MyResourceGroup -w MyWorkspace -l MyLocation --skip 50 --top 10
az quantum job list -g MyResourceGroup -w MyWorkspace --skip 50 --top 10
- name: Sort the job list by Target ID and display in tabular format.
text: |-
az quantum job list -g MyResourceGroup -w MyWorkspace -l MyLocation --orderby Target -o table
az quantum job list -g MyResourceGroup -w MyWorkspace --orderby Target -o table
- name: Sort the job list by Job Name in descending order, display in tabular format.
text: |-
az quantum job list -g MyResourceGroup -w MyWorkspace -l MyLocation --orderby Name --order desc -o table
az quantum job list -g MyResourceGroup -w MyWorkspace --orderby Name --order desc -o table
"""

helps['quantum job output'] = """
Expand All @@ -100,7 +100,7 @@
examples:
- name: Print the results of a successful Azure Quantum job.
text: |-
az quantum job output -g MyResourceGroup -w MyWorkspace -l MyLocation \\
az quantum job output -g MyResourceGroup -w MyWorkspace \\
-j yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy -o table
"""

Expand All @@ -110,7 +110,7 @@
examples:
- name: Get the status of an Azure Quantum job.
text: |-
az quantum job show -g MyResourceGroup -w MyWorkspace -l MyLocation \\
az quantum job show -g MyResourceGroup -w MyWorkspace \\
-j yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --query status
"""

Expand All @@ -120,17 +120,17 @@
examples:
- name: Submit QIR bitcode from a file in the current folder.
text: |-
az quantum job submit -g MyResourceGroup -w MyWorkspace -l MyLocation -t MyTarget \\
az quantum job submit -g MyResourceGroup -w MyWorkspace -t MyTarget \\
--job-name MyJob --job-input-format qir.v1 --job-input-file MyQirBitcode.bc \\
--entry-point MyQirEntryPoint
- name: Submit a Quil pass-through job to the Rigetti simulator.
text: |-
az quantum job submit -g MyResourceGroup -w MyWorkspace -l MyLocation \\
az quantum job submit -g MyResourceGroup -w MyWorkspace \\
-t rigetti.sim.qvm --job-name MyJob --job-input-file MyProgram.quil \\
--job-input-format rigetti.quil.v1 --job-output-format rigetti.quil-results.v1
- name: Submit a IonQ JSON circuit to the IonQ simulator with job params.
text: |-
az quantum job submit -g MyResourceGroup -w MyWorkspace -l MyLocation \\
az quantum job submit -g MyResourceGroup -w MyWorkspace \\
-t ionq.simulator --job-name MyJobName --job-input-file MyCircuit.json \\
--job-input-format ionq.circuit.v1 --job-output-format ionq.quantum-results.v1 \\
--job-params count=100 content-type=application/json
Expand All @@ -142,7 +142,7 @@
examples:
- name: Wait for completion of a job, check at 60 second intervals.
text: |-
az quantum job wait -g MyResourceGroup -w MyWorkspace -l MyLocation \\
az quantum job wait -g MyResourceGroup -w MyWorkspace \\
-j yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --max-poll-wait-secs 60 -o table
"""

Expand All @@ -152,7 +152,7 @@
examples:
- name: Cancel an Azure Quantum job by id.
text: |-
az quantum job cancel -g MyResourceGroup -w MyWorkspace -l MyLocation \\
az quantum job cancel -g MyResourceGroup -w MyWorkspace \\
-j yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
"""

Expand Down Expand Up @@ -211,7 +211,7 @@
examples:
- name: Get the list of targets available in a Azure Quantum workspaces
text: |-
az quantum target list -g MyResourceGroup -w MyWorkspace -l MyLocation
az quantum target list -g MyResourceGroup -w MyWorkspace
"""

helps['quantum target set'] = """
Expand Down Expand Up @@ -288,9 +288,9 @@
type: command
short-summary: List the quotas for the given (or current) Azure Quantum workspace.
examples:
- name: List the quota information of a specified Azure Quantum workspace. If a default workspace has been set, the -g, -w, and -l parameters are not required.
- name: List the quota information of a specified Azure Quantum workspace. If a default workspace has been set, the -g and -w parameters are not required.
text: |-
az quantum workspace quotas -g MyResourceGroup -w MyWorkspace -l MyLocation
az quantum workspace quotas -g MyResourceGroup -w MyWorkspace
"""

helps['quantum workspace set'] = """
Expand All @@ -299,7 +299,7 @@
examples:
- name: Set the default Azure Quantum workspace.
text: |-
az quantum workspace set -g MyResourceGroup -w MyWorkspace -l MyLocation
az quantum workspace set -g MyResourceGroup -w MyWorkspace
"""

helps['quantum workspace show'] = """
Expand Down
18 changes: 9 additions & 9 deletions src/quantum/azext_quantum/operations/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
knack_logger = knack.log.get_logger(__name__)


def list(cmd, resource_group_name, workspace_name, location=None, job_type=None, item_type=None, provider_id=None,
def list(cmd, resource_group_name, workspace_name, job_type=None, item_type=None, provider_id=None,
target_id=None, job_status=None, created_after=None, created_before=None, job_name=None,
skip=None, top=None, orderby=None, order=None):
"""
Expand Down Expand Up @@ -141,7 +141,7 @@ def _construct_orderby_expression(orderby, order):
return orderby_expression


def get(cmd, job_id, resource_group_name=None, workspace_name=None, location=None):
def get(cmd, job_id, resource_group_name=None, workspace_name=None):
"""
Get the job's status and details.
"""
Expand Down Expand Up @@ -173,7 +173,7 @@ def _convert_numeric_params(job_params):
pass


def submit(cmd, resource_group_name, workspace_name, target_id, job_input_file, job_input_format, location=None,
def submit(cmd, resource_group_name, workspace_name, target_id, job_input_file, job_input_format,
job_name=None, shots=None, storage=None, job_params=None, target_capability=None,
job_output_format=None, entry_point=None):
"""
Expand Down Expand Up @@ -354,7 +354,7 @@ def submit(cmd, resource_group_name, workspace_name, target_id, job_input_file,
return client.create(ws_info.subscription, ws_info.resource_group, ws_info.name, job_id, job_details).as_dict()


def output(cmd, job_id, resource_group_name, workspace_name, location=None):
def output(cmd, job_id, resource_group_name, workspace_name):
"""
Get the results of running a job.
"""
Expand All @@ -371,7 +371,7 @@ def output(cmd, job_id, resource_group_name, workspace_name, location=None):
return _get_job_output(job)


def wait(cmd, job_id, resource_group_name, workspace_name, location=None, max_poll_wait_secs=5):
def wait(cmd, job_id, resource_group_name, workspace_name, max_poll_wait_secs=5):
"""
Place the CLI in a waiting state until the job finishes running.
"""
Expand Down Expand Up @@ -400,7 +400,7 @@ def wait(cmd, job_id, resource_group_name, workspace_name, location=None, max_po
return job.as_dict()


def job_show(cmd, job_id, resource_group_name, workspace_name, location=None):
def job_show(cmd, job_id, resource_group_name, workspace_name):
"""
Get the job's status and details.
"""
Expand All @@ -410,13 +410,13 @@ def job_show(cmd, job_id, resource_group_name, workspace_name, location=None):
return job.as_dict()


def run(cmd, resource_group_name, workspace_name, target_id, job_input_file, job_input_format, location=None,
def run(cmd, resource_group_name, workspace_name, target_id, job_input_file, job_input_format,
job_name=None, shots=None, storage=None, job_params=None, target_capability=None,
job_output_format=None, entry_point=None):
"""
Submit a job to run on Azure Quantum, and wait for the result.
"""
job = submit(cmd, resource_group_name, workspace_name, target_id, job_input_file, job_input_format, location,
job = submit(cmd, resource_group_name, workspace_name, target_id, job_input_file, job_input_format,
job_name, shots, storage, job_params, target_capability,
job_output_format, entry_point)
logger.warning("Job id: %s", job["id"])
Expand All @@ -428,7 +428,7 @@ def run(cmd, resource_group_name, workspace_name, target_id, job_input_file, job
return output(cmd, job["id"], resource_group_name, workspace_name)


def cancel(cmd, job_id, resource_group_name, workspace_name, location=None):
def cancel(cmd, job_id, resource_group_name, workspace_name):
"""
Request to cancel a job on Azure Quantum if it hasn't completed.
"""
Expand Down
2 changes: 1 addition & 1 deletion src/quantum/azext_quantum/operations/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def set(cmd, target_id):
return info


def list(cmd, resource_group_name, workspace_name, location=None):
def list(cmd, resource_group_name, workspace_name):
"""
Get the list of providers and their targets in an Azure Quantum workspace.
"""
Expand Down
4 changes: 2 additions & 2 deletions src/quantum/azext_quantum/operations/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def get(cmd, resource_group_name=None, workspace_name=None):
return ws


def quotas(cmd, resource_group_name, workspace_name, location=None):
def quotas(cmd, resource_group_name, workspace_name):
"""
List the quotas for the given (or current) Azure Quantum workspace.
"""
Expand All @@ -358,7 +358,7 @@ def quotas(cmd, resource_group_name, workspace_name, location=None):
return repack_response_json(response)


def set(cmd, workspace_name, resource_group_name, location=None):
def set(cmd, workspace_name, resource_group_name):
"""
Set the default Azure Quantum workspace.
"""
Expand Down
Loading