QuantumCircuit.cast

static QuantumCircuit.cast(value, _type)[source]

Best effort to cast value to type. Otherwise, returns the value.