qiskit.aqua.algorithms.Simon¶
-
class
Simon
(oracle, quantum_instance=None)[소스]¶ The Simon algorithm.
The Simon algorithm finds a hidden integer s∈{0,1}n from an oracle fs that satisfies fs(x)=fs(y) if and only if y=x⊕s for all x∈{0,1}n. Thus, if s=0…0, i.e., the all-zero bitstring, then fs is a 1-to-1 (or, permutation) function. Otherwise, if s≠0…0, then fs 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.- 매개변수
oracle (
Oracle
) – The oracle componentquantum_instance (
Union
[QuantumInstance
,Backend
,BaseBackend
,None
]) – Quantum Instance or Backend
-
__init__
(oracle, quantum_instance=None)[소스]¶ - 매개변수
oracle (
Oracle
) – The oracle componentquantum_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
Returns backend.
Returns quantum instance.
Return a numpy random.
-
property
backend
¶ Returns backend.
- 반환 형식
Union
[Backend
,BaseBackend
]
-
construct_circuit
(measurement=False)[소스]¶ Construct the quantum circuit
- 매개변수
measurement (bool) – Boolean flag to indicate if measurement should be included in the circuit.
- 반환값
the QuantumCircuit object for the constructed circuit
- 반환 형식
-
property
quantum_instance
¶ Returns quantum instance.
- 반환 형식
Optional
[QuantumInstance
]
-
property
random
¶ Return a numpy random.
-
run
(quantum_instance=None, **kwargs)¶ Execute the algorithm with selected backend.
- 매개변수
quantum_instance (
Union
[QuantumInstance
,Backend
,BaseBackend
,None
]) – the experimental setting.kwargs (dict) – kwargs
- 반환값
results of an algorithm.
- 반환 형식
dict
- 예외
AquaError – If a quantum instance or backend has not been provided
-
set_backend
(backend, **kwargs)¶ Sets backend with configuration.
- 반환 형식
None