A verifiable quantum advantage towards real world applications: Quantum Echoes 
Learn more
         
     
  
  
  
  
  
    
      cirq_google.ops.internal_gate.function_points_to_proto
  
      
    
  
  
  
  
  
    
  
  
    
    
Return CustomArg that expresses a function through its x and y values.
cirq_google.ops.internal_gate.function_points_to_proto(
    x: (Sequence[float] | np.ndarray),
    y: (Sequence[float] | np.ndarray),
    msg: (program_pb2.CustomArg | None) = None
) -> program_pb2.CustomArg
| Args | 
|---|
| x | Sequence of values of the free variable.
For 1D functions, this input is assumed to be given in increasing order. | 
| y | Sequence of values of the dependent variable.
Where y[i] = func(x[i]) where funcis the function being encoded. | 
| msg | Optional CustomArg to serialize to.
If not provided a CustomArg is created. | 
| Returns | 
|---|
| A CustomArg encoding the function. | 
| Raises | 
|---|
| ValueError | If 
xis 1D and not sorted in increasing order.xandydon't have the same number of points.yis multidimensional.xis multidimensional. | 
  
  
 
  
    
    
      
    
    
  
       
    
    
  
  
  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."],[],[]]