def __init__(
        self, qubits: Sequence[cirq.Qid], prerotations: Sequence[tuple[float, float]] | None = None
    ):
        """Initializes the rotation protocol and matrix for system.

        Args:
            qubits: Qubits to do the tomography on.
            prerotations: Tuples of (phase_exponent, exponent) parameters for
                gates to apply to the qubits before measurement. The actual
                rotation applied will be `cirq.PhasedXPowGate` with the
                specified values of phase_exponent and exponent. If None,
                we use [(0, 0), (0, 0.5), (0.5, 0.5)], which corresponds
                to rotation gates [I, X**0.5, Y**0.5].
        """
        if prerotations is None:
            prerotations = [(0, 0), (0, 0.5), (0.5, 0.5)]
        self.num_qubits = len(qubits)

        phase_exp_vals, exp_vals = zip(*prerotations)

        operations: list[cirq.Operation] = []
        sweeps: list[cirq.Sweep] = []
        for i, qubit in enumerate(qubits):
            phase_exp = sympy.Symbol(f'phase_exp_{i}')
            exp = sympy.Symbol(f'exp_{i}')
            gate = ops.PhasedXPowGate(phase_exponent=phase_exp, exponent=exp)
            operations.append(gate.on(qubit))
            sweeps.append(study.Points(phase_exp, phase_exp_vals) + study.Points(exp, exp_vals))

        self.rot_circuit = circuits.Circuit(operations)
        self.rot_sweep = study.Product(*sweeps)
        self.mat = self._make_state_tomography_matrix(qubits)
Initializes the rotation protocol and matrix for system.

        Args:
            qubits: Qubits to do the tomography on.
            prerotations: Tuples of (phase_exponent, exponent) parameters for
                gates to apply to the qubits before measurement. The actual
                rotation applied will be `cirq.PhasedXPowGate` with the
                specified values of phase_exponent and exponent. If None,
                we use [(0, 0), (0, 0.5), (0.5, 0.5)], which corresponds
                to rotation gates [I, X**0.5, Y**0.5].
        
cirq-core/cirq/experiments/n_qubit_tomography.py