Japanese
言語
English
Japanese
German
Korean
Portuguese, Brazilian
French
Shortcuts

qiskit.aqua.circuits.DNF

class DNF(ast, num_vars=None)[ソース]

Class for constructing circuits for Disjunctive Normal Forms

Constructor.

パラメータ
  • ast (tuple) – The logic expression as an Abstract Syntax Tree (AST) tuple

  • num_vars (int) – Number of boolean variables

例外

AquaError – invalid input

__init__(ast, num_vars=None)

Constructor.

パラメータ
  • ast (tuple) – The logic expression as an Abstract Syntax Tree (AST) tuple

  • num_vars (int) – Number of boolean variables

例外

AquaError – invalid input

Methods

__init__(ast[, num_vars])

Constructor.

compute_num_ancillae([mct_mode])

returns the number of ancillary qubits needed

construct_circuit([circuit, …])

Construct circuit.

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

property ancillary_register

returns ancillary register

property clause_register

returns clause register

compute_num_ancillae(mct_mode='basic')

returns the number of ancillary qubits needed

construct_circuit(circuit=None, variable_register=None, clause_register=None, output_register=None, ancillary_register=None, mct_mode='basic')[ソース]

Construct circuit.

パラメータ
  • circuit (QuantumCircuit) – The optional circuit to extend from

  • variable_register (QuantumRegister) – The optional quantum register to use for problem variables

  • clause_register (QuantumRegister) – The optional quantum register to use for problem clauses

  • output_register (QuantumRegister) – The optional quantum register to use for holding the output

  • ancillary_register (QuantumRegister) – The optional quantum register to use as ancilla

  • mct_mode (str) – The mode to use for building Multiple-Control Toffoli

戻り値

quantum circuit.

戻り値の型

QuantumCircuit

例外

AquaError – invalid input

property num_clauses

returns num clauses

property num_variables

return num variables

property output_register

returns output register

property variable_register

returns variable register