Skip to content

Commit

Permalink
Failing type check & submit_qubo daily integration test fix (#842)
Browse files Browse the repository at this point in the history
Updates qpu -> simulator for target name in `submit_qubo` and addresses
failing type check with
#842 (comment)

---------

Co-authored-by: richrines1 <[email protected]>
  • Loading branch information
bharat-thotakura and richrines1 authored Nov 10, 2023
1 parent 4b8187f commit ee55f99
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cirq-superstaq/cirq_superstaq/daily_integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def test_submit_to_hilbert_qubit_sorting(service: css.Service) -> None:
def test_submit_qubo(service: css.Service) -> None:
test_qubo = {(0,): -1, (1,): -1, (2,): -1, (0, 1): 2, (1, 2): 2}
serialized_result = service.submit_qubo(
test_qubo, target="toshiba_bifurcation_qpu", method="dry-run"
test_qubo, target="toshiba_bifurcation_simulator", method="dry-run"
)
result = gss.qubo.read_json_qubo_result(serialized_result)
best_result = result[0]
Expand Down
2 changes: 1 addition & 1 deletion cirq-superstaq/cirq_superstaq/ops/qubit_gates.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ def qubit_index_to_equivalence_group_key(self, index: int) -> int:
if indexed_gate.num_qubits() == 1:
# find the first instance of the same gate
first_instance = self.component_gates.index(indexed_gate)
return sum(map(cirq.num_qubits, self.component_gates[:first_instance]))
return sum(cirq.num_qubits(g) for g in self.component_gates[:first_instance])
if isinstance(indexed_gate, cirq.InterchangeableQubitsGate):
gate_key = indexed_gate.qubit_index_to_equivalence_group_key(index_in_gate)
for i in range(index_in_gate):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def test_submit_to_hilbert_qubit_sorting(provider: qss.SuperstaqProvider) -> Non
def test_submit_qubo(provider: qss.SuperstaqProvider) -> None:
test_qubo = {(0,): -1, (1,): -1, (2,): -1, (0, 1): 2, (1, 2): 2}
serialized_result = provider.submit_qubo(
test_qubo, target="toshiba_bifurcation_qpu", method="dry-run"
test_qubo, target="toshiba_bifurcation_simulator", method="dry-run"
)
result = gss.qubo.read_json_qubo_result(serialized_result)
best_result = result[0]
Expand Down

0 comments on commit ee55f99

Please sign in to comment.