DDSimDiagnostics.hpp

Contains the implementation of the Diagnostics interface for the DD simulator.

namespace mqt
namespace debugger
struct DDDiagnostics
#include <DDSimDiagnostics.hpp>

The DD-simulator implementation of the Diagnostics interface.

Public Members

Diagnostics interface

The Diagnostics interface.

DDSimulationState *simulationState

The simulation state.

std::map<size_t, std::set<size_t>> zeroControls

The qubits that have been marked as zero controls.

std::map<size_t, std::set<size_t>> nonZeroControls

The qubits that have been marked as non-zero controls.

std::map<size_t, std::set<std::vector<size_t>>> actualQubits

The actual qubits that each instruction has targeted.

std::vector<std::pair<size_t, size_t>> assertionsToMove

Assertions that have been identified to be moved in the program.

std::map<size_t, std::set<std::pair<std::set<std::string>, size_t>>> assertionsEntToInsert

The entanglement assertions that have been identified to be added to the program.

std::map<size_t, std::vector<InsertEqualityAssertion>> assertionsEqToInsert

The equality assertions that have been identified to be added to the program.

struct InsertEqualityAssertion
#include <DDSimDiagnostics.hpp>

Represents an equality assertion that should be inserted into the program.

Public Functions

inline bool operator==(const InsertEqualityAssertion &other) const

Check whether two InsertEqualityAssertion instances are equal.

Parameters:

other – The other InsertEqualityAssertion instance to compare with.

Returns:

True if the instances are equal, false otherwise.

Public Members

size_t instructionIndex

The index of the instruction where the assertion should be inserted.

std::vector<Complex> amplitudes

The amplitudes that the assertion should check for equality.

double similarity

The similarity threshold for the assertion.

std::vector<std::string> targets

The target qubits of the assertion.