def test_user_mapping_for_memslots_3Q(self):
    'Test measuring two of three qubits.'
    backend = FakeOpenPulse3Q()
    cmd_def = backend.defaults().build_cmd_def()
    q = QuantumRegister(3)
    c = ClassicalRegister(3)
    qc = QuantumCircuit(q, c)
    qc.measure(q[1], c[2])
    qc.measure(q[2], c[0])
    sched = schedule(qc, backend)
    expected = Schedule(cmd_def.get('measure', [0, 1, 2]).filter(channels=[MeasureChannel(1), MeasureChannel(2)]), Acquire(duration=10)([AcquireChannel(0), AcquireChannel(1), AcquireChannel(2)], [MemorySlot(1), MemorySlot(2), MemorySlot(0)]))
    self.assertEqual(sched.instructions, expected.instructions)
Test measuring two of three qubits.
def test_user_mapping_for_memslots_3Q(self):
    
    backend = FakeOpenPulse3Q()
    cmd_def = backend.defaults().build_cmd_def()
    q = QuantumRegister(3)
    c = ClassicalRegister(3)
    qc = QuantumCircuit(q, c)
    qc.measure(q[1], c[2])
    qc.measure(q[2], c[0])
    sched = schedule(qc, backend)
    expected = Schedule(cmd_def.get('measure', [0, 1, 2]).filter(channels=[MeasureChannel(1), MeasureChannel(2)]), Acquire(duration=10)([AcquireChannel(0), AcquireChannel(1), AcquireChannel(2)], [MemorySlot(1), MemorySlot(2), MemorySlot(0)]))
    self.assertEqual(sched.instructions, expected.instructions)