def setUp(self):
        super().setUp()

        self.devices = []
        if self.args.provider == 'basicaer' or self.args.provider == 'all':
            self.devices.append(BasicAerQiskitDevice(wires=self.num_subsystems))
        if self.args.provider == 'aer' or self.args.provider == 'all':
            self.devices.append(AerQiskitDevice(wires=self.num_subsystems))
        if self.args.provider == 'legacy' or self.args.provider == 'all':
            self.devices.append(LegacySimulatorsQiskitDevice(wires=self.num_subsystems))
        if self.args.provider == 'ibm' or self.args.provider == 'all':
            if IBMQX_TOKEN is not None:
                self.devices.append(IbmQQiskitDevice(wires=self.num_subsystems, num_runs=8*1024, ibmqx_token=IBMQX_TOKEN))
            else:
                log.warning("Skipping test of the IbmQQiskitDevice device because IBM login credentials could not be "
                            "found in the PennyLane configuration file.")
예제 #2
0
    def setUp(self):
        super().setUp()

        self.devices = []
        if self.args.provider == 'basicaer' or self.args.provider == 'all':
            self.devices.append(
                BasicAerQiskitDevice(wires=self.num_subsystems))
        if self.args.provider == 'aer' or self.args.provider == 'all':
            self.devices.append(AerQiskitDevice(wires=self.num_subsystems))
        if self.args.provider == 'legacy' or self.args.provider == 'all':
            self.devices.append(
                LegacySimulatorsQiskitDevice(wires=self.num_subsystems))
        if self.args.provider == 'ibm' or self.args.provider == 'all':
            self.devices.append(
                IbmQQiskitDevice(wires=self.num_subsystems,
                                 num_runs=8 * 1024,
                                 ibmqx_token=IBMQX_TOKEN))