qiskit.aqua.components.reciprocals.Reciprocal
class Reciprocal
Base class for reciprocal calculation.
This method should initialize the module and use an exception if a component of the module is not available.
__init__
abstract __init__()
Initialize self. See help(type(self)) for accurate signature.
Methods
__init__ () | Initialize self. |
construct_circuit (mode[, register, circuit]) | Construct the initial state circuit. |
sv_to_resvec (statevector, num_q) | Convert statevector to result vector. |
construct_circuit
abstract construct_circuit(mode, register=None, circuit=None)
Construct the initial state circuit.
Parameters
- mode (str) – ‘matrix’ or ‘circuit’
- register (QuantumRegister) – register for circuit construction.
- circuit (QuantumCircuit) – circuit for construction.
Returns
The reciprocal circuit.
sv_to_resvec
abstract sv_to_resvec(statevector, num_q)
Convert statevector to result vector.
Parameters
- statevector (list) – The statevector from simulation.
- num_q (int) – Number of qubits of result register.
Returns
The result vector.
Was this page helpful?
Report a bug or request content on GitHub.