Portuguese, Brazilian
Idiomas
English
Japanese
German
Korean
Portuguese, Brazilian
French
Shortcuts

qiskit.aqua.algorithms.Simon

class Simon(oracle, quantum_instance=None)[código fonte]

The Simon algorithm.

The Simon algorithm finds a hidden integer \(s \in \{0,1\}^n\) from an oracle \(f_s\) that satisfies \(f_s(x) = f_s(y)\) if and only if \(y=x \oplus s\) for all \(x \in \{0,1\}^n\). Thus, if \(s = 0\ldots 0\), i.e., the all-zero bitstring, then \(f_s\) is a 1-to-1 (or, permutation) function. Otherwise, if \(s \neq 0\ldots 0\), then \(f_s\) is a 2-to-1 function.

Note: the TruthTableOracle may be the easiest to use to create one that can be used with the Simon algorithm.

Parâmetros
  • oracle (Oracle) – The oracle component

  • quantum_instance (Union[QuantumInstance, Backend, BaseBackend, None]) – Quantum Instance or Backend

__init__(oracle, quantum_instance=None)[código fonte]
Parâmetros
  • oracle (Oracle) – The oracle component

  • quantum_instance (Union[QuantumInstance, Backend, BaseBackend, None]) – Quantum Instance or Backend

Methods

__init__(oracle[, quantum_instance])

type oracle

Oracle

construct_circuit([measurement])

Construct the quantum circuit

run([quantum_instance])

Execute the algorithm with selected backend.

set_backend(backend, **kwargs)

Sets backend with configuration.

Attributes

backend

Returns backend.

quantum_instance

Returns quantum instance.

random

Return a numpy random.

property backend

Returns backend.

Tipo de retorno

Union[Backend, BaseBackend]

construct_circuit(measurement=False)[código fonte]

Construct the quantum circuit

Parâmetros

measurement (bool) – Boolean flag to indicate if measurement should be included in the circuit.

Retorna

the QuantumCircuit object for the constructed circuit

Tipo de retorno

QuantumCircuit

property quantum_instance

Returns quantum instance.

Tipo de retorno

Optional[QuantumInstance]

property random

Return a numpy random.

run(quantum_instance=None, **kwargs)

Execute the algorithm with selected backend.

Parâmetros
  • quantum_instance (Union[QuantumInstance, Backend, BaseBackend, None]) – the experimental setting.

  • kwargs (dict) – kwargs

Retorna

results of an algorithm.

Tipo de retorno

dict

Levanta

AquaError – If a quantum instance or backend has not been provided

set_backend(backend, **kwargs)

Sets backend with configuration.

Tipo de retorno

None