# qiskit.aqua.components.uncertainty_models.LogNormalDistribution¶

class LogNormalDistribution(num_target_qubits, mu=0, sigma=1, low=0, high=1)[código fonte]

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.

Parâmetros
• num_target_qubits (int) – Number of qubits it acts on, has a minimum value of 1.

• mu (float) – Expected value of considered normal distribution

• sigma (float) – Standard deviation of considered normal distribution

• low (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)

__init__(num_target_qubits, mu=0, sigma=1, low=0, high=1)[código fonte]
Parâmetros
• num_target_qubits (int) – Number of qubits it acts on, has a minimum value of 1.

• mu (float) – Expected value of considered normal distribution

• sigma (float) – Standard deviation of considered normal distribution

• low (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)

Methods

 __init__(num_target_qubits[, mu, sigma, …]) type num_target_qubits int build(qc, q[, q_ancillas, params]) build_controlled(qc, q, q_control[, …]) Adds corresponding controlled sub-circuit to given circuit build_controlled_inverse(qc, q, q_control[, …]) Adds controlled inverse of corresponding sub-circuit to given circuit build_controlled_inverse_power(qc, q, …[, …]) Adds controlled, inverse, power of corresponding circuit. build_controlled_power(qc, q, q_control, power) Adds controlled power of corresponding circuit. build_inverse(qc, q[, q_ancillas]) Adds inverse of corresponding sub-circuit to given circuit build_inverse_power(qc, q, power[, q_ancillas]) Adds inverse power of corresponding circuit. build_power(qc, q, power[, q_ancillas]) Adds power of corresponding circuit. returns number of qubits returns number of qubits controlled pdf_to_probabilities(pdf, low, high, num_values) 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

Attributes

 high returns high low returns low num_target_qubits Returns the number of target qubits num_values returns number of values probabilities returns probabilities values returns values
build(qc, q, q_ancillas=None, params=None)
build_controlled(qc, q, q_control, q_ancillas=None, use_basis_gates=True)

Adds corresponding controlled sub-circuit to given circuit

Parâmetros
• qc (QuantumCircuit) – quantum circuit

• q (list) – list of qubits (has to be same length as self._num_qubits)

• q_control (Qubit) – control qubit

• q_ancillas (list) – list of ancilla qubits (or None if none needed)

• use_basis_gates (bool) – use basis gates for expansion of controlled circuit

build_controlled_inverse(qc, q, q_control, q_ancillas=None, use_basis_gates=True)

Adds controlled inverse of corresponding sub-circuit to given circuit

Parâmetros
• qc (QuantumCircuit) – quantum circuit

• q (list) – list of qubits (has to be same length as self._num_qubits)

• q_control (Qubit) – control qubit

• q_ancillas (list) – list of ancilla qubits (or None if none needed)

• use_basis_gates (bool) – use basis gates for expansion of controlled circuit

build_controlled_inverse_power(qc, q, q_control, power, q_ancillas=None, use_basis_gates=True)

Adds controlled, inverse, power of corresponding circuit. May be overridden if a more efficient implementation is possible

build_controlled_power(qc, q, q_control, power, q_ancillas=None, use_basis_gates=True)

Adds controlled power of corresponding circuit. May be overridden if a more efficient implementation is possible

build_inverse(qc, q, q_ancillas=None)

Adds inverse of corresponding sub-circuit to given circuit

Parâmetros
• qc (QuantumCircuit) – quantum circuit

• q (list) – list of qubits (has to be same length as self._num_qubits)

• q_ancillas (list) – list of ancilla qubits (or None if none needed)

build_inverse_power(qc, q, power, q_ancillas=None)

Adds inverse power of corresponding circuit. May be overridden if a more efficient implementation is possible

build_power(qc, q, power, q_ancillas=None)

Adds power of corresponding circuit. May be overridden if a more efficient implementation is possible

get_num_qubits()

returns number of qubits

get_num_qubits_controlled()

returns number of qubits controlled

property high

returns high

property low

returns low

property num_target_qubits

Returns the number of target qubits

property num_values

returns number of values

static pdf_to_probabilities(pdf, low, high, num_values)

Takes a probability density function (pdf), and returns a truncated and discretized array of probabilities corresponding to it

Parâmetros
• pdf (function) – probability density function

• low (float) – lower bound of equidistant grid

• high (float) – upper bound of equidistant grid

• num_values (int) – number of grid points

Retorna

array of probabilities

Tipo de retorno

list

property probabilities

returns probabilities

required_ancillas()

returns required ancillas

required_ancillas_controlled()

returns required ancillas controlled

property values

returns values