eclipse / xacc

XACC - eXtreme-scale Accelerator programming framework
https://xacc.readthedocs.io
BSD 3-Clause "New" or "Revised" License
163 stars 84 forks source link

Fix: XACC install failure with Qrack - error: conversion from ‘BigInteger’ to ‘bool’ is ambiguous #586

Open raunakkumarsingh opened 3 months ago

raunakkumarsingh commented 3 months ago

Issue: #584 This pull request addresses an issue encountered during the installation of XACC with the Qrack quantum computing framework. The problem arises from an ambiguous conversion error occurring in the codebase, specifically in the context of a conversion from BigInteger to bool.

 error: conversion from ‘BigInteger’ to ‘bool’ is ambiguous

This modification ensures that the result of the bitwise AND operation is explicitly compared to zero using bi_compare_0, providing a clear and unambiguous boolean result for the ternary conditional operator.