MCPcopy Create free account
hub / github.com/NVIDIA/cuda-quantum / test_u3_ctrl

Function test_u3_ctrl

python/tests/builder/test_kernel_builder.py:1463–1473  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1461
1462
1463def test_u3_ctrl():
1464
1465 kernel = cudaq.make_kernel()
1466 qubits = kernel.qalloc(2)
1467 kernel.u3(np.pi / 2, 0., np.pi, qubits[0])
1468 kernel.cu3(np.pi, np.pi, np.pi / 2, qubits[0], qubits[1])
1469
1470 counts = cudaq.sample(kernel)
1471 assert (len(counts) == 2)
1472 assert ('00' in counts)
1473 assert ('11' in counts)
1474
1475
1476@skipIfNvidiaFP64NotInstalled

Callers

nothing calls this directly

Calls 4

cu3Method · 0.80
qallocMethod · 0.45
u3Method · 0.45
sampleMethod · 0.45

Tested by

no test coverage detected