Skip to content
This repository has been archived by the owner on Mar 6, 2025. It is now read-only.

Commit

Permalink
tesst
Browse files Browse the repository at this point in the history
  • Loading branch information
tuukka-hiltunen committed Nov 18, 2024
1 parent f65f291 commit 9260a85
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/iqm/iqm_client/iqm_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def create_run_request(
self._validate_circuit_instructions(
architecture, circuits, qubit_mapping, validate_moves=options.move_gate_validation
)

print(options)
return RunRequest(
qubit_mapping=serialized_qubit_mapping,
circuits=circuits,
Expand Down
2 changes: 1 addition & 1 deletion src/iqm/iqm_client/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ class CircuitCompilationOptions:
move_gate_frame_tracking: MoveGateFrameTrackingMode = MoveGateFrameTrackingMode.FULL
"""MOVE gate frame tracking mode for circuit compilation. This options is ignored on devices that do not support
MOVE and for circuits that do not contain MOVE gates."""
active_reset_cycles: Optional[int] = Field(None)
active_reset_cycles: Optional[int] = None
"""Number of active ``reset`` operations inserted at the beginning of each circuit for each active qubit.
``None`` means active reset is not used but instead reset is done by waiting (relaxation). Integer values smaller
than 1 result in neither active nor reset by wait being used, in which case any reset operations must be explicitly
Expand Down
5 changes: 3 additions & 2 deletions tests/test_iqm_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ def test_abort_job_failed(status_code, sample_client, existing_job_url, existing
'params',
[
{},
{'options': CircuitCompilationOptions(heralding_mode=HeraldingMode.ZEROS)},
{'options': CircuitCompilationOptions(heralding_mode=HeraldingMode.ZEROS, active_reset_cycles=1)},
{'custom_settings': {'some_setting': 1}},
{'calibration_set_id': uuid.uuid4()},
{'options': CircuitCompilationOptions(max_circuit_duration_over_t2=0.0)},
Expand Down Expand Up @@ -859,7 +859,8 @@ def test_create_and_submit_run_request(
when(requests).get(dynamic_architecture_url, ...).thenReturn(dynamic_architecture_success)

run_request = sample_client.create_run_request([sample_circuit], **params)

if 'options' in params:
assert run_request.active_reset_cycles == params['options'].active_reset_cycles
expect(requests, times=2).post(jobs_url, **post_jobs_args(run_request)).thenReturn(submit_success)
assert sample_client.submit_run_request(run_request) == existing_run_id
assert sample_client.submit_circuits([sample_circuit], **params) == existing_run_id
Expand Down

0 comments on commit 9260a85

Please sign in to comment.