Skip to content

Commit

Permalink
Fix reference to deprecated SingleQubitGate (#788)
Browse files Browse the repository at this point in the history
- This is breaking one of the openfermion notebooks.
  • Loading branch information
dstrain115 authored Jul 25, 2022
1 parent 8636a23 commit d892a45
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/openfermion/circuits/primitives/ffft.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def _circuit_diagram_info_(self, args: cirq.CircuitDiagramInfoArgs
return cirq.CircuitDiagramInfo(wire_symbols=symbols)


class _TwiddleGate(cirq.SingleQubitGate):
class _TwiddleGate(cirq.Gate):
r"""Gate that introduces arbitrary FFT twiddle factors.
Realizes unitary gate $\omega^{k\dagger}_n$ that phases creation
Expand All @@ -108,6 +108,9 @@ def __init__(self, k, n):
self.k = k
self.n = n

def _num_qubits_(self) -> int:
return 1

def _circuit_diagram_info_(self, args: cirq.CircuitDiagramInfoArgs
) -> cirq.CircuitDiagramInfo:
if args.use_unicode_characters:
Expand Down

0 comments on commit d892a45

Please sign in to comment.