eclipse / xacc

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

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

Closed raunakkumarsingh closed 6 months ago

raunakkumarsingh commented 6 months ago

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.