Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reference to deprecated SingleQubitGate #788

Merged
merged 1 commit into from
Jul 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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