Skip to content

Commit 9959e8c

Browse files
committed
fix(qir2cirq): add a paramter 'args' for _circuit_diagram_info_ to make 'CustomizedCirqGate' work
1 parent 56b44c5 commit 9959e8c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tensorcircuit/translation.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ def _num_qubits_(self) -> int:
138138
def _unitary_(self) -> Any:
139139
return self.uMatrix
140140

141-
def _circuit_diagram_info_(self) -> List[str]:
141+
def _circuit_diagram_info_(
142+
self, args: Optional[cirq.CircuitDiagramInfoArgs]
143+
) -> List[str]:
142144
return [self.name] * self.nqubit
143145

144146
if extra_qir is not None and len(extra_qir) > 0:

0 commit comments

Comments
 (0)