-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add get config functions #7565
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
Open
dyates
wants to merge
49
commits into
quantumlib:main
Choose a base branch
from
dyates:add_get_config_functions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+922
−2
Open
Add get config functions #7565
Changes from 30 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
77eec1a
Add `ProcessorConfig` and `ProcessorConfigSnapshot`
dyates 69f1397
Update __init__; Add another unit test.
dyates a8e8262
Merge branch 'main' into add_get_config_snapshot
dyates df98f15
Regenerates QuantumEngineService gRPC client libraries with GAPIC
hoisinberg 5fb5fbc
Merge branch 'main' into add_get_config_snapshot
dyates 3b29858
Merge remote-tracking branch 'upstream/u/hoisinberg/get-quantum-proce…
dyates 71dad68
Merge branch 'main' into add_get_config_snapshot
dyates 7cbcdc1
Merge branch 'main' into add_get_config_snapshot
dyates 6866f26
Add `get_quantum_processor_config_by_snapshot_id`
dyates 20ca033
Add unit test for missing config.
dyates b3413a4
Add `get_quantum_processor_config_by_run_name`.
dyates eed577d
Implement `get_config` for `ProcessorConfigSnapshot`.
dyates cc447ff
Add `get_config*` functions to EngineProcessor.
dyates c30bde8
Sync changes
dyates b1ef097
Merge branch 'main' into add_get_config_snapshot
dyates 2eb9ee9
Add `AbstractProcessorConfig` interface.
dyates aee07e6
Add `get_config*` methods to the `Engine` class.
dyates bc7db00
Merge branch 'main' into add_get_config_snapshot
dyates 9e2fdcd
Add missing methods from other abstract engines and processors.
dyates cc4b43e
Add test for __repr__; Remove config logic from LocalAbstractEnginer.
dyates 6835a61
Update imports.
dyates e96871c
Fix more formatting errors.
dyates e2429c3
Update test and linting errors.
dyates 093cd1e
More formatting fixes.
dyates 11d97f5
More fixes.
dyates 2365a57
Fix test name
dyates 67cabf4
More syntax errors.
dyates afe7f0e
More formatting fixes.
dyates 947ad46
Fix remaining format issues
dyates 4783519
Add missing documentation.
dyates 3d1e101
Merge branch 'main' into add_get_config_functions
dyates 1505ba8
Rename parameters and functioncs for consistency.
dyates f7bba28
Fix function params in AbstractLocalEngine
dyates f15e751
More `check/` fixes.
dyates 449fdd4
More check fixes.
dyates d259f1a
Merge branch 'main' into add_get_config_functions
dyates 6eba4b4
Address new comments.
dyates cd81646
Remove unused imports.
dyates 4a03de1
Update import format.
dyates 000ce5d
Update doc comments to mention default configs.
dyates 00e2f36
Merge branch 'main' into add_get_config_functions
dyates 4584bff
Remove N/A changes.
dyates a89213e
Remove changes to simulated_* engine files.
dyates f9ef67a
Change `config_alias` to `config_name`.
dyates 7059f1a
Merge branch 'main' into add_get_config_functions
dyates 32ad541
Remove config functions from local processor unit test.
dyates 2ef6805
Format fixes.
dyates 0a863fd
Merge branch 'main' into add_get_config_functions
dyates 54cc85c
Adress final comments; Use existing id functions; Remove unused confi…
dyates File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
dyates marked this conversation as resolved.
Show resolved
Hide resolved
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2025 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
__version__ = "0.0.0" # {x-release-please-version} |
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
16 changes: 16 additions & 0 deletions
16
cirq-google/cirq_google/cloud/quantum_v1alpha1/gapic_version.py
dyates marked this conversation as resolved.
Show resolved
Hide resolved
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2025 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
__version__ = "0.0.0" # {x-release-please-version} |
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
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
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
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
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
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
65 changes: 65 additions & 0 deletions
65
cirq-google/cirq_google/engine/abstract_processor_config.py
dyates marked this conversation as resolved.
Show resolved
Hide resolved
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Copyright 2025 The Cirq Developers | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from __future__ import annotations | ||
|
||
import abc | ||
from typing import TYPE_CHECKING | ||
|
||
if TYPE_CHECKING: | ||
import cirq | ||
import cirq_google as cg | ||
|
||
|
||
class AbstractProcessorConfig(abc.ABC): | ||
"""Interface for a QuantumProcessorConfig. | ||
|
||
Describes available qubits, gates, and calivration data associated with | ||
a processor configuration. | ||
""" | ||
|
||
@property | ||
@abc.abstractmethod | ||
def effective_device(self) -> cirq.Device: | ||
"""The Device generated from thi configuration's device specification""" | ||
|
||
@property | ||
@abc.abstractmethod | ||
def calibration(self) -> cg.Calibration: | ||
"""Charicterization metrics captured for this configuration""" | ||
|
||
@property | ||
@abc.abstractmethod | ||
def snapshot_id(self) -> str: | ||
"""The snapshot that contains this processor config""" | ||
|
||
@property | ||
@abc.abstractmethod | ||
def run_name(self) -> str: | ||
"""The run that generated this config if avaiable.""" | ||
|
||
@property | ||
@abc.abstractmethod | ||
def project_id(self) -> str: | ||
"""The if of the project that contains this config.""" | ||
|
||
@property | ||
@abc.abstractmethod | ||
def processor_id(self) -> str: | ||
"""The processor id for this config.""" | ||
|
||
@property | ||
@abc.abstractmethod | ||
def config_id(self) -> str: | ||
"""The unique identifier for this config.""" |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.