Maestro 0.1.0
Unified interface for quantum circuit simulation
Loading...
Searching...
No Matches
basic_simulation.cpp File Reference

Basic usage example of the Maestro library using the C interface. More...

#include "maestrolib/Interface.h"
#include <iostream>
#include <string>
#include <vector>

Go to the source code of this file.

Functions

void PrintResults (const char *jsonResult)
 Helper function to print the JSON result.
int main ()

Detailed Description

Basic usage example of the Maestro library using the C interface.

This example demonstrates:

  1. Initializing the Maestro library.
  2. Creating a simple simulator.
  3. Defining a quantum circuit using OpenQASM 2.0.
  4. Executing the circuit.
  5. Parsing and printing the results.
  6. Cleaning up resources.

Definition in file basic_simulation.cpp.

Function Documentation

◆ main()

int main ( )

Definition at line 32 of file basic_simulation.cpp.

◆ PrintResults()

void PrintResults ( const char * jsonResult)

Helper function to print the JSON result.

Parameters
jsonResultThe JSON string returned by the simulator.

Definition at line 24 of file basic_simulation.cpp.