Skip to content
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
9 changes: 8 additions & 1 deletion recirq/third_party/quaff/cz_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,14 @@ def get_phase_poly(num_qubits, pairs):
return phase_poly % 4

def _get_phases(self):
"""TODO"""
"""Computes phase exponents for the single-qubit S gates in the decomposition.

Returns:
A tuple (linear, quadratic), where linear is a vector of exponents for
the initial single-qubit phase layer, and quadratic is a matrix where
each row s contains exponents for the single-qubit phase layer following
the s-th basis change stage.
"""
n = self.num_qubits()
phase_poly = self.phase_poly
quadratic = np.zeros((n // 2, n), dtype=linalg.DTYPE)
Expand Down
Loading