Quil

template <typename Network>
void tweedledum::write_quil(Network const &network, std::string const &filename)

Writes network in quil 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

template <typename Network>
void tweedledum::write_quil(Network const &network, std::ostream &os)

Writes network in quil 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