Skip to content

Commit

Permalink
Fix the type of aer_state_initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
ibm-wakizaka committed Aug 2, 2023
1 parent 8460cfd commit 9925e55
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions target_simulator/Conversion/QUIRToAer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ void buildQubitTable(ModuleOp moduleOp, AerStateWrapper wrapper) {
aerFuncTable.at("aer_allocate_qubits"),
ValueRange{aerState, constOp});

const int id = *declOp.id();
ValueTable::registerQubit(id, alloc.getResult(0));
ValueTable::registerQubit(*declOp.id(), alloc.getResult(0));
});

// TODO
Expand Down Expand Up @@ -516,8 +515,8 @@ void QUIRToAERPass::declareAerFunctions(ModuleOp moduleOp) {
const auto aerAllocQubitsType = LLVMFunctionType::get(i64Type,
{aerStateType, i64Type});
registerFunc("aer_allocate_qubits", aerAllocQubitsType);
// @aer_state_initialize(...) -> i8*
const auto aerStateInitType = LLVMFunctionType::get(aerStateType, {}, true);
// @aer_state_initialize(i8*) -> i8*
const auto aerStateInitType = LLVMFunctionType::get(aerStateType, {aerStateType});
registerFunc("aer_state_initialize", aerStateInitType);
// @aer_apply_u3(i8* noundef, i64 noundef, i64 noundef, i64 noundef) -> void
const auto aerApplyU3Type = LLVMFunctionType::get(
Expand Down

0 comments on commit 9925e55

Please sign in to comment.