Variable
- class pulser.parametrized.Variable(name, dtype, size=1)
Bases:
Parametrized
,OpSupport
A variable for parametrized sequence building.
- Parameters:
name (
str
) – Unique name for the variable.dtype (
type
[float
] |type
[int
]) – Type of the variable’s content. Supports float and int.size (
int
, default:1
) – The number of values stored. Defaults to a single value.
Attributes
size
Returns a dictionary with the only variable involved (itself).
name
dtype
Methods
Returns the variable's current value.
Calculates the trigonometric cosine of the object.
Calculates the exponential of the object.
Calculates the natural logarithm of the object.
Calculates the base-2 logarithm of the object.
Rounds the value to the nearest int.
Calculates the trigonometric sine of the object.
Calculates the square root of the object.
Calculates the trigonometric tangent of the object.
Calculates the hyperbolic tangent of the object.
Signatures
- build()
Returns the variable’s current value.
- Return type:
AbstractArray
- cos()
Calculates the trigonometric cosine of the object.
- Return type:
- exp()
Calculates the exponential of the object.
- Return type:
- log()
Calculates the natural logarithm of the object.
- Return type:
- log2()
Calculates the base-2 logarithm of the object.
- Return type:
- rint()
Rounds the value to the nearest int.
- Return type:
- sin()
Calculates the trigonometric sine of the object.
- Return type:
- sqrt()
Calculates the square root of the object.
- Return type:
- tan()
Calculates the trigonometric tangent of the object.
- Return type:
- tanh()
Calculates the hyperbolic tangent of the object.
- Return type:
- property variables: dict[str, Variable]
Returns a dictionary with the only variable involved (itself).