In order to pass inputs to Q# operations/functions with Jupyter Notebooks, one uses the magic command, %simulate
, and writes out the inputs as key-value pairs, key=value
.
For example, if I had some operation, operation HelloHardy (number : Int) : Unit {...}
, then I would run the following %simulate HelloHardy number=1729
.
I am currently working with the operation, EvaluatePolynomial
, which is part of the numerics library and takes in integers, arrays of doubles, and booleans. Below is what I am running and the error message that is generated.
%simulate EvaluatePolynomial coefficients=[1.0,1.0] evaluationPoints=[0.0,1.0] numBits=3 pointPos=3 odd=true even=false.
Received invalid parameters. Please fix and try again:
coefficients: Error converting value "[1.0,1.0]" to type 'System.Collections.Generic.List`1[System.Double]'. Path '', line 1, position 11.
evaluationPoints: Error converting value "[0.0,1.0]" to type 'System.Collections.Generic.List`1[System.Double]'. Path '', line 1, position 11.