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

Update AQT Backend #6441

Merged
merged 42 commits into from
Apr 19, 2024
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
2a5f6f8
Update supported gates, API interface
jbrixon Jan 22, 2024
e696864
Update params for sampler local sim
jbrixon Jan 24, 2024
8b56a64
Update docs
jbrixon Jan 24, 2024
c318179
Remove unsupported match statement
jbrixon Jan 25, 2024
783d624
updated access.md
fg-aqt Jan 25, 2024
1892647
Merge branch 'update-aqt' of github.com:alpine-quantum-technologies/C…
fg-aqt Jan 25, 2024
f762a64
intermediate version of getting started
fg-aqt Jan 25, 2024
1ca7f1e
Add static method to list workspaces and resources
jbrixon Jan 29, 2024
f9c0150
Remove arbitrary host params
jbrixon Jan 29, 2024
95d5368
Update documentation
jbrixon Jan 29, 2024
73e3848
Merge remote-tracking branch 'upstream/main' into update-aqt
jbrixon Jan 29, 2024
919c037
Update noise model
jbrixon Jan 30, 2024
3a77f78
Remove unused cast
jbrixon Feb 1, 2024
17ceb6a
Merge branch 'main' of https://github.com/quantumlib/Cirq into update…
jbrixon Feb 5, 2024
86f5eab
Merge pull request #1 from alpine-quantum-technologies/update-aqt
jbrixon Feb 5, 2024
7f710ef
Improve return type of new method
jbrixon Feb 12, 2024
22b169d
Move default host to constant
jbrixon Feb 12, 2024
b6c4a8d
Raise error if op gate is None
jbrixon Feb 12, 2024
6eedf21
Fix get crosstalk operation
jbrixon Feb 12, 2024
efc7aec
Update docstring for accuracy
jbrixon Feb 12, 2024
5b8c796
Apply formatting
jbrixon Feb 12, 2024
db0522c
Merge branch 'main' of https://github.com/quantumlib/Cirq
jbrixon Feb 12, 2024
ddfc44d
Refactor fetch resource static function
jbrixon Mar 1, 2024
61c9205
Add enum for operation strings
jbrixon Mar 1, 2024
8617718
Fix formatting
jbrixon Mar 1, 2024
cd39a7a
Fix type errors
jbrixon Mar 1, 2024
43972cb
Linting
jbrixon Mar 1, 2024
950e84a
Add enum docs
jbrixon Mar 26, 2024
4ace5b9
Merge branch 'main' of https://github.com/quantumlib/Cirq
jbrixon Mar 26, 2024
270b833
Remove unsupported import
jbrixon Mar 26, 2024
6ac86f4
Fix noise dict keys
jbrixon Mar 26, 2024
c708567
Format
jbrixon Apr 3, 2024
0dac7f0
Fix enum string conversion
jbrixon Apr 3, 2024
0f99427
Merge branch 'main' of https://github.com/quantumlib/Cirq
jbrixon Apr 3, 2024
6186b62
Fix formatting
jbrixon Apr 15, 2024
3fb723d
Remove redundant counter
jbrixon Apr 15, 2024
8e2eba7
Add test for operation with None gate
jbrixon Apr 15, 2024
234e38e
Add tests for static methods
jbrixon Apr 15, 2024
e6a32a0
Remove unreachable code
jbrixon Apr 15, 2024
4480c38
Fix formatting
jbrixon Apr 15, 2024
dab7e05
Merge branch 'main' into main
jbrixon Apr 15, 2024
fd6e8c9
Merge branch 'main' into main
jbrixon Apr 19, 2024
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
Prev Previous commit
Next Next commit
Raise error if op gate is None
  • Loading branch information
jbrixon committed Feb 12, 2024
commit b6c4a8de14cf17ba59ea8bd868d86aa43e4e6fc7
4 changes: 4 additions & 0 deletions cirq-aqt/cirq_aqt/aqt_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,17 @@ def get_crosstalk_operation(
for idx in xtlk_arr.nonzero()[0]:
exponent = operation.gate.exponent # type:ignore
exponent = exponent * xtlk_arr[idx]
if operation.gate is None:
raise RuntimeError("Operation applies no gate.")
xtlk_op = operation.gate.on(system_qubits[idx]) ** exponent
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there needs to be a check here and on 138 to exclude the case when operation.gate is None.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Fixed.

xtlk_op_list.append(xtlk_op)
elif len(operation.qubits) == 2:
for op_qubit in operation.qubits:
for idx in xtlk_arr.nonzero()[0]:
exponent = operation.gate.exponent # type:ignore
exponent = exponent * xtlk_arr[idx]
if operation.gate is None:
raise RuntimeError("Operation applies no gate.")
xtlk_op = operation.gate.on(op_qubit, system_qubits[idx]) ** exponent
xtlk_op_list.append(xtlk_op)
return xtlk_op_list
Expand Down