ESOP-phase synthesis

Header: tweedledum/algorithms/synthesis/esop_phase_synth.hpp

Given an \(n\)-variable Boolean function \(f\), this synthesis algorithm generates a quantum circuit with \(n\) qubits composed of multiple-controlled Z gates that computes the unitary operation \(U : |\varphi\rangle \mapsto (-1)^{f(\varphi)}|\varphi\rangle\).

Algorithm

template<class Network>
Network tweedledum::esop_phase_synth(kitty::dynamic_truth_table const &function)

ESOP-phase synthesis.

Finds a quantum circuit using multiple-controlled Z gates that computes a phase into a quantum state based on the Boolean function. Note that the circuit is the same for the function and its inverse.

In order to find the multiple-controlled Z gates, the algorithm computes the function’s PPRM representation.

Parameters
  • function: A Boolean function

template<typename Network>
void tweedledum::esop_phase_synth(Network &network, std::vector<io_id> const &qubits, kitty::dynamic_truth_table const &function)

ESOP-phase synthesis.

This is the in-place variant of esop_phase_synth, in which the network is passed as a parameter and can potentially already contain some gates. The parameter qubits provides a qubit mapping to the existing qubits in the network.

Parameters
  • network: A quantum circuit

  • qubits: A qubit mapping

  • function: A Boolean function