Write to qpic file format

template <typename Network>
void tweedledum::write_qpic(Network const &network, std::string const &filename, bool color_marked_gates = false)

Writes network in qpic format into a file.

Required gate functions:

  • foreach_control
  • foreach_target
  • op

Required network functions:

  • foreach_cnode
  • foreach_cqubit
  • num_qubits

Parameters
  • network: A quantum network
  • filename: Filename
  • color_marked_gates: Flag to draw marked nodes in red

template <typename Network>
void tweedledum::write_qpic(Network const &network, std::ostream &os, bool color_marked_gates = false)

Writes network in qpic format into output stream.

An overloaded variant exists that writes the network into a file.

Required gate functions:

  • foreach_control
  • foreach_target
  • op

Required network functions:

  • foreach_cnode
  • foreach_cqubit
  • num_qubits

Parameters
  • network: A quantum network
  • os: Output stream
  • color_marked_gates: Flag to draw marked nodes in red