A verifiable quantum advantage towards real world applications: Quantum Echoes 
Learn more
         
     
  
  
  
  
  
    
      cirq.synchronize_terminal_measurements
  
      
    
  
  
  
  
  
    
  
  
    
    
Move measurements to the end of the circuit.
cirq.synchronize_terminal_measurements(
    circuit: cirq.AbstractCircuit,
    *,
    context: (cirq.TransformerContext | None) = None,
    after_other_operations: bool = True
) -> cirq.Circuit
Used in the notebooks
Move all measurements in a circuit to the final moment, if it can accommodate them (without
overlapping with other operations). If after_other_operations is true, then a new moment will
be added to the end of the circuit containing all the measurements that should be brought
forward.
| Args | 
|---|
| circuit | Input circuit to transform. | 
| context | cirq.TransformerContextstoring common configurable options for transformers. | 
| after_other_operations | Set by default. If the circuit's final moment contains
non-measurement operations and this is set then a new empty moment is appended to
the circuit before pushing measurements to the end. | 
| Returns | 
|---|
| Copy of the transformed input circuit. | 
  
  
 
  
    
    
      
    
    
  
       
    
    
  
  
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
  Last updated 2025-08-14 UTC.
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[],[]]