pygsti.objects.LinearlyParameterizedGate.__init__¶
-
LinearlyParameterizedGate.
__init__
(baseMatrix, parameterArray, parameterToBaseIndicesMap, leftTransform=None, rightTransform=None, real=False)¶ Initialize a LinearlyParameterizedGate object.
Parameters: - basematrix (numpy array) – a square 2D numpy array that acts as the starting point when constructin the gate’s matrix. The shape of this array sets the dimension of the gate.
- parameterArray (numpy array) – a 1D numpy array that holds the all the parameters for this gate. The shape of this array sets is what is returned by value_dimension(...).
- parameterToBaseIndicesMap (dict) – A dictionary with keys == index of a parameter (i.e. in parameterArray) and values == list of 2-tuples indexing potentially multiple gate matrix coordinates which should be set equal to this parameter.
- leftTransform (numpy array or None, optional) – A 2D array of the same shape as basematrix which left-multiplies the base matrix after parameters have been evaluated. Defaults to no tranform.
- rightTransform (numpy array or None, optional) – A 2D array of the same shape as basematrix which right-multiplies the base matrix after parameters have been evaluated. Defaults to no tranform.
- real (bool, optional) – Whether or not the resulting gate matrix, after all parameter evaluation and left & right transforms have been performed, should be real. If True, ValueError will be raised if the matrix contains any complex or imaginary elements.