44 inline QCircuit read(std::istream& stream) {
50 std::shared_ptr<std::istream>(&stream, [](std::istream*) {}));
52 return *parser.parse();
61 inline QCircuit read_from_file(
const std::string& fname) {
65 std::shared_ptr<std::ifstream> ifs(
new std::ifstream);
69 ifs->open(fname, std::ifstream::in);
72 throw exception::FileNotFound(
"qpp::qasm::read_from_file()");
76 pp.add_target_stream(ifs, fname);
78 return *parser.parse();
Quantum++ main namespace.
Definition: circuits.h:35