def test_measure_combined(self):
    '\n        Test to check for measure on the same qubit which generated another measure schedule.\n\n        The measures on different qubits are combined, but measures on the same qubit\n        adds another measure to the schedule.\n        '
    q = QuantumRegister(2)
    c = ClassicalRegister(2)
    qc = QuantumCircuit(q, c)
    qc.u2(3.14, 1.57, q[0])
    qc.cx(q[0], q[1])
    qc.measure(q[0], c[0])
    qc.measure(q[1], c[1])
    qc.measure(q[1], c[1])
    sched = schedule(qc, self.backend, method='as_soon_as_possible')
    expected = Schedule(self.cmd_def.get('u2', [0], 3.14, 1.57), (28, self.cmd_def.get('cx', [0, 1])), (50, self.cmd_def.get('measure', [0, 1])), (60, self.cmd_def.get('measure', [0, 1]).filter(channels=[MeasureChannel(1)])), (60, Acquire(duration=10)([AcquireChannel(0), AcquireChannel(1)], [MemorySlot(0), MemorySlot(1)])))
    self.assertEqual(sched.instructions, expected.instructions)
Test to check for measure on the same qubit which generated another measure schedule.

The measures on different qubits are combined, but measures on the same qubit
adds another measure to the schedule.
def test_measure_combined(self):
    '\n        Test to check for measure on the same qubit which generated another measure schedule.\n\n        The measures on different qubits are combined, but measures on the same qubit\n        adds another measure to the schedule.\n        '
    q = QuantumRegister(2)
    c = ClassicalRegister(2)
    qc = QuantumCircuit(q, c)
    qc.u2(3.14, 1.57, q[0])
    qc.cx(q[0], q[1])
    qc.measure(q[0], c[0])
    qc.measure(q[1], c[1])
    qc.measure(q[1], c[1])
    sched = schedule(qc, self.backend, method='as_soon_as_possible')
    expected = Schedule(self.cmd_def.get('u2', [0], 3.14, 1.57), (28, self.cmd_def.get('cx', [0, 1])), (50, self.cmd_def.get('measure', [0, 1])), (60, self.cmd_def.get('measure', [0, 1]).filter(channels=[MeasureChannel(1)])), (60, Acquire(duration=10)([AcquireChannel(0), AcquireChannel(1)], [MemorySlot(0), MemorySlot(1)])))
    self.assertEqual(sched.instructions, expected.instructions)