ExactReciprocal
class qiskit.circuit.library.ExactReciprocal(num_state_qubits, scaling, neg_vals=False, name='1/x')
Bases: QuantumCircuit
Exact reciprocal
Deprecated since version 2.2
The class qiskit.circuit.library.arithmetic.exact_reciprocal.ExactReciprocal is deprecated as of Qiskit 2.2. It will be removed in Qiskit 3.0. Use the class qiskit.circuit.library.ExactReciprocalGate instead.
Parameters
- num_state_qubits (int) – The number of qubits representing the value to invert.
- scaling (float) – Scaling factor of the reciprocal function, i.e. to compute .
- neg_vals (bool) – Whether might represent negative values. In this case the first qubit is the sign, with for negative and for positive. For the negative case it is assumed that the remaining string represents . This is because for .
- name (str) – The name of the object.
Note
It is assumed that the binary string represents a number < 1.
Attributes
name
유형: str
A human-readable name for the circuit.
Example
from qiskit import QuantumCircuit
qc = QuantumCircuit(2, 2, name="my_circuit")
print(qc.name)my_circuit이 페이지가 도움이 되었습니까?
GitHub에서 버그, 오타를 보고하거나 컨텐츠를 요청하십시오.