Skip to content

Commit

Permalink
chore: fix mypy complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
jselig-rigetti committed Dec 11, 2024
1 parent 4215978 commit 0603fca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyquil/latex/_ipython.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ def display(circuit: Program, settings: Optional[DiagramSettings] = None, **imag
msg += " Transcript:\n\n" + result.stderr.decode("utf-8")
raise RuntimeError(msg)

return Image(filename=png, **image_options) # type: ignore
return Image(filename=png, **image_options)
4 changes: 2 additions & 2 deletions pyquil/quilbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -2788,7 +2788,7 @@ def _from_rs_calibration(cls, calibration: quil_rs.Calibration) -> "DefCalibrati
@property # type: ignore[override]
def parameters(self) -> Sequence[ParameterDesignator]:
"""The parameters of the calibration."""
return _convert_to_py_expressions(super().parameters())
return _convert_to_py_expressions(super().parameters)

@parameters.setter
def parameters(self, parameters: Sequence[ParameterDesignator]) -> None:
Expand Down Expand Up @@ -2825,7 +2825,7 @@ def instructions(self) -> list[AbstractInstruction]:
def instructions(self, instructions: list[AbstractInstruction]) -> None:
self.instrs = instructions

@property # type: ignore[override]
@property
def name(self) -> str:
"""Get the name of the calibration."""
return super().identifier.name
Expand Down
6 changes: 3 additions & 3 deletions pyquil/quiltcalibrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ def _convert_to_calibration_match(
if isinstance(instruction, quil_rs.Gate) and isinstance(calibration, quil_rs.Calibration):
target_qubits = instruction.qubits
target_values: Sequence[Union[quil_expr.Expression, MemoryReference]] = instruction.parameters
parameter_qubits = calibration.qubits()
parameter_values: Sequence[Union[quil_expr.Expression, MemoryReference]] = calibration.parameters()
parameter_qubits = calibration.qubits
parameter_values: Sequence[Union[quil_expr.Expression, MemoryReference]] = calibration.parameters
py_calibration: Union[DefCalibration, DefMeasureCalibration] = DefCalibration._from_rs_calibration(calibration)
elif isinstance(instruction, quil_rs.Measurement) and isinstance(calibration, quil_rs.MeasureCalibrationDefinition):
target_qubits = [instruction.qubit]
target_values = (
[] if not instruction.target else [MemoryReference._from_rs_memory_reference(instruction.target)]
)
calibration_qubit = calibration.qubit()
calibration_qubit = calibration.qubit
parameter_qubits = [] + [calibration_qubit] if calibration_qubit else []
parameter_values = [MemoryReference._from_parameter_str(calibration.identifier.parameter)]
py_calibration = DefMeasureCalibration._from_rs_measure_calibration_definition(calibration)
Expand Down

0 comments on commit 0603fca

Please sign in to comment.