def align_right(
    circuit: cirq.AbstractCircuit, *, context: cirq.TransformerContext | None = None
) -> cirq.Circuit:
    """Align gates to the right of the circuit.

    Note that tagged operations with tag in `context.tags_to_ignore` will continue to stay in their
    original position and will not be aligned.

    Args:
          circuit: Input circuit to transform.
          context: `cirq.TransformerContext` storing common configurable options for transformers.

    Returns:
          Copy of the transformed input circuit.
    """
    if context is not None and context.deep is True:
        context = dataclasses.replace(context, deep=False)
    # Reverse the circuit, align left, and reverse again. Note each moment also has to have its ops
    # reversed internally, to avoid edge conditions where non-commuting but can-be-in-same-moment
    # ops (measurements and classical controls, particularly) could end up getting swapped.
    backwards = []
    for moment in circuit[::-1]:
        backwards.append(circuits.Moment(reversed(moment.operations)))
    aligned_backwards = align_left(circuits.Circuit(backwards), context=context)
    forwards = []
    for moment in aligned_backwards[::-1]:
        forwards.append(circuits.Moment(reversed(moment.operations)))
    return circuits.Circuit(forwards)
Align gates to the right of the circuit.

    Note that tagged operations with tag in `context.tags_to_ignore` will continue to stay in their
    original position and will not be aligned.

    Args:
          circuit: Input circuit to transform.
          context: `cirq.TransformerContext` storing common configurable options for transformers.

    Returns:
          Copy of the transformed input circuit.
    
cirq-core/cirq/transformers/align.py