LogNormalDistribution¶
- class LogNormalDistribution(num_target_qubits, mu=0, sigma=1, low=0, high=1)[source]¶
The Univariate Log-Normal Distribution.
Log-normal distribution, truncated to lower and upper bound and discretized on a grid defined by the number of qubits.
- Parameters
num_target_qubits (
int
) – Number of qubits it acts on, has a minimum value of 1.mu (
float
) – Expected value of considered normal distributionsigma (
float
) – Standard deviation of considered normal distributionlow (
float
) – Lower bound, i.e., the value corresponding to |0…0> (assuming an equidistant grid)high (
float
) – Upper bound, i.e., the value corresponding to |1…1> (assuming an equidistant grid)
Attributes
returns high
returns low
Returns the number of target qubits
returns number of values
returns probabilities
returns values
Methods
LogNormalDistribution.build
(qc, q[, …])Adds corresponding controlled sub-circuit to given circuit
Adds controlled inverse of corresponding sub-circuit to given circuit
Adds controlled, inverse, power of corresponding circuit.
Adds controlled power of corresponding circuit.
LogNormalDistribution.build_inverse
(qc, q[, …])Adds inverse of corresponding sub-circuit to given circuit
Adds inverse power of corresponding circuit.
LogNormalDistribution.build_power
(qc, q, power)Adds power of corresponding circuit.
returns number of qubits
returns number of qubits controlled
Takes a probability density function (pdf), and returns a truncated and discretized array of probabilities corresponding to it
returns required ancillas
returns required ancillas controlled