You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remove explicit storage connection-string support in favor of workspace-linked storage - #774
Removes explicit storage connection-string support because the Azure Quantum backend only supports storage linked to the workspace. Arbitrary storage accounts are no longer supported for Azure Quantum job storage.
Changes
Removed the Workspace(storage=...) constructor parameter, stored state, property, documentation, and explicit-storage container URI path.
Workspace.get_container_uri(...) now always uses workspace-linked storage.
Made parameters after name keyword-only so a legacy fourth positional argument raises TypeError instead of binding to resource_id.
Emit a DeprecationWarning when storage= is supplied, pointing users to configure workspace-linked storage instead. Removal is planned for azure-quantum 4.0.0. Transitional behavior (explicit-storage container URI generation) is unchanged. Workspace.from_connection_string(...) is unaffected and does not warn.
Compare against a literal string instead of Workspace._STORAGE_DEPRECATION_MESSAGE so the assertion can actually detect a regression in the warning wording (addresses PR microsoft#774 review comment).
Assert the exact warning caller frame to verify stacklevel=2
azure-quantum/tests/test_workspace.py:154
This inequality does not actually verify stacklevel=2: with WorkspaceMock, the expected warning frame is WorkspaceMock.__init__ in mock_client.py, and any other non-workspace.py frame would also pass. Assert the exact caller filename (or instantiate Workspace directly and assert this test file) so an incorrect stack level is caught.
v-elegacheva
changed the title
Deprecate Workspace(storage=...) in favor of workspace-linked storage
Remove Workspace(storage=...) in favor of workspace-linked storage
Oct 8, 2026
v-elegacheva
changed the title
Remove Workspace(storage=...) in favor of workspace-linked storage
Remove explicit storage connection-string support in favor of workspace-linked storage
Oct 9, 2026
update description that backend already does not support working with storages different from linked to workspace - this is the reason why we are removing that storage param
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes explicit storage connection-string support because the Azure Quantum backend only supports storage linked to the workspace. Arbitrary storage accounts are no longer supported for Azure Quantum job storage.
Changes
Workspace(storage=...)constructor parameter, stored state, property, documentation, and explicit-storage container URI path.Workspace.get_container_uri(...)now always uses workspace-linked storage.namekeyword-only so a legacy fourth positional argument raisesTypeErrorinstead of binding toresource_id.azure.quantum.storage.create_container(...)Workspace.from_connection_string(...)is unaffected. It authenticates to the Azure Quantum workspace and it related to storage configuration.azure.storage.blob.Tests
storage=keyword.python -m pytest tests/test_workspace.py: 22 passed.python -m pytest tests --ignore=tests/test_qiskit.py --ignore=tests/test_cirq.py: 138 passed.