Skip to content

Commit

Permalink
Fix (Pauli) identity
Browse files Browse the repository at this point in the history
  • Loading branch information
WrathfulSpatula committed May 22, 2024
1 parent 0227fa0 commit 4cb0c17
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pennylane_qrack/qrack_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
auto Observable(ObsId id, const std::vector<std::complex<double>> &matrix,
const std::vector<QubitIdType> &wires) -> ObsIdType override
{
Qrack::Pauli basis;
Qrack::Pauli basis = Qrack::PauliI;
switch (id) {
case ObsId::PauliX:
basis = Qrack::PauliX;
Expand All @@ -517,6 +517,8 @@ struct QrackDevice final : public Catalyst::Runtime::QuantumDevice {
case ObsId::PauliZ:
basis = Qrack::PauliZ;
break;
default:
break;
}
obs_cache.push_back(QrackObservable({ basis }, { wires[0U] }));

Expand Down

0 comments on commit 4cb0c17

Please sign in to comment.