Skip to content

Commit

Permalink
fix: handle barrier, breakpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienCalistoTD committed Dec 17, 2024
1 parent 64a75ae commit b90e4c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mpqp/core/circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ def to_other_language(
cirq_circuit.append(I(qubit))

for instruction in self.instructions:
if isinstance(instruction, ExpectationMeasure):
if isinstance(instruction, (ExpectationMeasure, Barrier, Breakpoint)):
continue
elif isinstance(instruction, CustomGate):
custom_circuit = QCircuit(self.nb_qubits)
Expand Down
6 changes: 3 additions & 3 deletions mpqp/tools/maths.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def closest_unitary(matrix: Matrix):


@typechecked
def cos(angle: Expr | Real) -> sp.Expr | float:
def cos(angle: Expr | Real | float) -> sp.Expr | float:
"""Generalization of the cosine function, to take as input either
``sympy``'s expressions or floating numbers.
Expand All @@ -186,7 +186,7 @@ def cos(angle: Expr | Real) -> sp.Expr | float:


@typechecked
def sin(angle: Expr | Real) -> sp.Expr | float:
def sin(angle: Expr | Real | float) -> sp.Expr | float:
"""Generalization of the sine function, to take as input either
``sympy``'s expressions or floating numbers.
Expand All @@ -211,7 +211,7 @@ def sin(angle: Expr | Real) -> sp.Expr | float:


@typechecked
def exp(angle: Expr | Complex) -> sp.Expr | complex:
def exp(angle: Expr | Complex | complex) -> sp.Expr | complex:
"""Generalization of the exponential function, to take as input either
``sympy``'s expressions or floating numbers.
Expand Down

0 comments on commit b90e4c8

Please sign in to comment.