utility.debug

Contents

utility.debug#

Contains debug utility functions

Functions#

are_tape_same_probs(tape1, tape2)

execute two tapes and check if they yield the same probabilities

compute_expval(probabilities)

Compute the expectation value using the parity of each outcome

counts_to_probs(counts)

converts counts into probabilities

get_labels(up_to)

gets bitstrings from 0 to "up_to" value

get_measurement_wires(tape)

returns the wires that are used for measurement

label_from(number, binary_places)

get a bitstring out of a number.

probs_to_counts(probs, count)

turns probabilities into counts

to_qasm(tape)

turns a quantum tape into a qasm string