Skip to content

qpandalite 0.1.4

Compare
Choose a tag to compare
@Agony5757 Agony5757 released this 25 Sep 14:58
· 297 commits to main since this release

What's New

Add convert_originq_result and calculate_expectation

Example

result = {'key': ['001','010','100'], 'value': [10, 20, 9970]}
kvresult = convert_originq_result(result, 
                                style='keyvalue', 
                                prob_or_shots='prob', 
                                reverse_key=False)

print(calculate_expectation(kvresult, ['IIZ', 'IZI', 'ZII', 'ZZZ']))

listresult = convert_originq_result(result, 
                                style='list', 
                                prob_or_shots='prob', 
                                reverse_key=False)
print(calculate_expectation(listresult, ['IIZ', 'IZI', 'ZII', 'ZZZ']))

Full Changelog 0.1.3 to 0.1.4: 0.1.3...0.1.4
Full Changelog 0.1.2 to 0.1.4: 0.1.2...0.1.4