pyquil.parametric

Module for creating and defining parametric programs.

class pyquil.parametric.ParametricProgram(program_constructor)[source]

Bases: object

Note

Experimental

A class representing Programs with changeable gate parameters.

fuse(other)[source]

Note

Experimental

Fuse another program to this one.

Parameters:other – A Program or ParametricProgram.
Returns:A new ParametricProgram.
Return type:ParametricProgram
pyquil.parametric.argument_count(thing)[source]

Get the number of arguments a callable has.

Parameters:thing – A callable.
Returns:The number of arguments it takes.
Return type:int
pyquil.parametric.parametric(decorated_function)[source]

Note

Experimental

A decorator to change a function into a ParametricProgram.

Parameters:decorated_function – The function taking parameters producing a Program object.
Returns:a callable ParametricProgram
Return type:ParametricProgram