QXel.benchmark.__util module

QXel.benchmark.__util.save_error_to_json(args, circ_name, error, instance_name=None, category=None)

Save error to json.

QXel.benchmark.__util.hellinger_fidelity(ideal_dist, device_dist)

Compute Hellinger fidelity between ideal and measured distributions.

QXel.benchmark.__util.remove_measurements(circuit)

Remove measurements.

QXel.benchmark.__util.get_ideal_counts(circuit, backend)

Noiseless statevector simulation.

Note that the qubits in the returned bitstrings are in big-endian order. For example, for a circuit defined on qubits:

q0 ------
q1 ------
q2 ------

the bitstrings are written as q0q1q2.

Parameters:
  • circuit – Input Braket Circuit to be simulated.

  • backend – Optional Braket local-simulator backend name.

Returns:

Mapping from bitstring to noiseless probability.

Return type:

dict[str, float]