How to use the pygsti.extras.rb.sample.clifford_rb_experiment function in pyGSTi

To help you get started, we’ve selected a few pyGSTi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github QuTech-Delft / qtt / src / qtt / algorithms / randomized_benchmarking.py View on Github external
def generate_circuits(self, lengths: Union[List[int], Tuple[int]], num_seq: int) -> Dict:
        """Generate sequences of gates for a full set of Clifford randomized benchmarking experirments.

        Args:
            lengths: Clifford lengths of the sequences to generate
            num_seq: number of different sequences to generate for each length

        Returns:
            a dictionary containing: key = clifford length, value = list of random circuits of that length.
        """

        exp_dict = rb.sample.clifford_rb_experiment(self._chip_spec, lengths, num_seq,
                                                    subsetQs=self._qubit_labels, randomizeout=False)
        circuits = exp_dict['circuits']
        circuits_dict = {m: [circuits[m, i] for i in range(num_seq)] for m in lengths}
        return circuits_dict