ESOP
class ESOP(ast, num_vars=None)
Bases: qiskit.aqua.circuits.boolean_logical_circuits.BooleanLogicNormalForm
Class for constructing circuits for Exclusive Sum of Products
Constructor.
Parameters
- ast (tuple) – The logic expression as an Abstract Syntax Tree (AST) tuple
- num_vars (int) – Number of boolean variables
Raises
AquaError – invalid input
Methods
compute_num_ancillae
ESOP.compute_num_ancillae(mct_mode='basic')
returns the number of ancillary qubits needed
construct_circuit
ESOP.construct_circuit(circuit=None, variable_register=None, output_register=None, output_idx=None, ancillary_register=None, mct_mode='basic')
Construct circuit.
Parameters
- circuit (QuantumCircuit) – The optional circuit to extend from
- variable_register (QuantumRegister) – The optional quantum
- to use for problem variables (register) –
- output_register (QuantumRegister) – The optional quantum
- to use for holding the output (register) –
- output_idx (int) – The index of the output register to write to
- ancillary_register (QuantumRegister) – The optional quantum register to use as ancilla
- mct_mode (str) – The mode to use for building Multiple-Control Toffoli
Returns
quantum circuit.
Return type
Raises
AquaError – invalid input
Attributes
ancillary_register
returns ancillary register
clause_register
returns clause register
num_clauses
returns num clauses
num_variables
return num variables
output_register
returns output register
variable_register
returns variable register
Was this page helpful?
Report a bug or request content on GitHub.