class documentation

UnitaryGate sublcass that stores the operator matrix for later reference by animation utility.

Method __array__ Call the operator function to build the array using the bound parameter values.
Method __init__ Initialize ParameterizedUnitaryGate
Method calculate_matrix Calculate the operator matrix by executing the selected function. Increment the parameters based upon the current and total steps.
Method validate_parameter Gate parameters should be int, float, or ParameterExpression
Instance Variable cutoffs Undocumented
Instance Variable definition Undocumented
Instance Variable discretized_param_indices Undocumented
Instance Variable duration Undocumented
Instance Variable op_func Undocumented
Instance Variable unit Undocumented
Method _define Undocumented
Instance Variable _parameterized Undocumented
def __array__(self, dtype=None): (source)

Call the operator function to build the array using the bound parameter values.

def __init__(self, op_func, params, num_qubits, cutoffs, label=None, duration=100, unit='ns', discretized_param_indices: list = []): (source)

Initialize ParameterizedUnitaryGate

Parameters
op_func:functionfunction to build operator matrix
params:ListList of parameters to pass to op_func to build operator matrix (supports instances of Qiskit Parameter to be bound later)
num_qubits:intNumber of qubits in the operator -- this would likely equate to (num_qubits_per_qumode * num_qumodes + num_ancilla).
cutoffsUndocumented
label:string, optionalGate name. Defaults to None.
duration:int, optionalDuration of gate used for noise modeling. Defaults to 100.
unit:string, optionalUnit of duration (only supports those allowed by Qiskit).
discretized_param_indices:listlist of int indices into self.params for parameters to be discretized. An empty list will discretize all params.
def calculate_matrix(self, current_step: int = 1, total_steps: int = 1, keep_state: bool = False): (source)

Calculate the operator matrix by executing the selected function. Increment the parameters based upon the current and total steps.

Parameters
current_step:int, optionalCurrent step within total_steps. Defaults to 1.
total_steps:int, optionalTotal steps to increment parameters. Defaults to 1.
keep_state:boolUndocumented
Returns
ndarrayoperator matrix
def validate_parameter(self, parameter): (source)

Gate parameters should be int, float, or ParameterExpression

Undocumented

definition = (source)

Undocumented

discretized_param_indices = (source)

Undocumented

duration = (source)

Undocumented

Undocumented

Undocumented

def _define(self): (source)

Undocumented

_parameterized = (source)

Undocumented