Skip to content

Commit

Permalink
Doc fixes and release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
gadial committed Feb 3, 2025
1 parent 0f0683c commit 2651617
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
24 changes: 19 additions & 5 deletions qiskit/circuit/classicalfunction/boolean_expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,29 @@ def truth_table(self) -> dict:
}

def synth(self, circuit_type: str = "bit"):
"""Synthesis the logic network into a :class:`~qiskit.circuit.QuantumCircuit`.
There are two common types of circuits for a boolean function f(x):
1) bit-flip oracles which compute |x>|y> |-> |x>|f(x)+y>
2) phase-flip oracles which compute |x> |-> (-1)^f(x)|x>
By default the bit-flip oracle is generated
r"""Synthesize the logic network into a :class:`~qiskit.circuit.QuantumCircuit`.
There are two common types of circuits for a boolean function :math:`f(x)`:
1. **Bit-flip oracles** which compute:
.. math::
|x\rangle|y\rangle |-> |x\rangle|f(x)\oplusy\rangle
2. **Phase-flip** oracles which compute:
.. math::
|x\rangle |-> (-1)^{f(x)}|x\rangle
By default the bit-flip oracle is generated.
Args:
circuit_type: which type of oracle to create, 'bit' or 'phase' flip oracle.
Returns:
QuantumCircuit: A circuit implementing the logic network.
Raises:
ValueError: If ``circuit_type`` is not either 'bit' or 'phase'.
"""
# pylint: disable=cyclic-import
from .boolean_expression_synth import (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
upgrade_circuits:
- |
The :class:`.BooleanExpression` no longer relies on the `tweedledum` library
but might not be synthesize as effectively as before.
Passing custom synthesizers is no longer available.

0 comments on commit 2651617

Please sign in to comment.