Skip to content

Commit

Permalink
Per @cosenal bug
Browse files Browse the repository at this point in the history
  • Loading branch information
WrathfulSpatula committed Aug 23, 2024
1 parent 834f9e2 commit 3b0f186
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pennylane_qrack/qrack_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,9 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
if (kwargs.find("<Wires = []>") != kwargs.find("<Wires = []>,")) {
continue;
}
if (kwargs.find("Wires([])") != kwargs.find("Wires([]),")) {
continue;
}

// Handle if integer
pos = kwargs.find(",");
Expand All @@ -446,7 +449,7 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
}

// Handles if Wires object
pos = kwargs.find("]>");
pos = kwargs.find("]");
std::string value = kwargs.substr(0, pos);
kwargs.erase(0, pos + 3U);
size_t p = value.find("[");
Expand Down

0 comments on commit 3b0f186

Please sign in to comment.