2323 // CHECK: [[q0:%.+]] = quantum.extract [[qReg]][ 0] : !quantum.reg -> !quantum.bit
2424 // CHECK: [[q0_out:%.+]] = scf.for %arg1 = [[c0]] to %arg0 step [[c1]] iter_args([[q0_in:%.+]] = [[q0]]) -> (!quantum.bit) {
2525 // CHECK: [[q0_loop:%.+]] = quantum.custom "Hadamard"() [[q0_in]] : !quantum.bit
26- // CHECK: [[q0_loop2:%.+]] = quantum.custom "Hadamard"() [[q0_loop]] {adjoint} : !quantum.bit
26+ // CHECK: [[q0_loop2:%.+]] = quantum.custom "Hadamard"() [[q0_loop]] adj : !quantum.bit
2727 // CHECK: scf.yield [[q0_loop2]] : !quantum.bit
2828 // CHECK: [[q0_out2:%.+]] = quantum.custom "Hadamard"() [[q0_out]] : !quantum.bit
2929 // CHECK: [[q1:%.+]] = quantum.extract [[qReg]][ 1] : !quantum.reg -> !quantum.bit
3030 // CHECK: [[q01_out:%.+]]:2 = scf.for %arg1 = [[c0]] to %arg0 step [[c1]] iter_args([[q01_in1:%.+]] = [[q0_out2]], [[q01_in2:%.+]] = [[q1]]) -> (!quantum.bit, !quantum.bit) {
3131 // CHECK: [[q01_loop:%.+]]:2 = quantum.custom "CNOT"() [[q01_in1]], [[q01_in2]] : !quantum.bit, !quantum.bit
32- // CHECK: [[q01_loop2:%.+]]:2 = quantum.custom "CNOT"() [[q01_loop]]#0, [[q01_loop]]#1 {adjoint} : !quantum.bit, !quantum.bit
32+ // CHECK: [[q01_loop2:%.+]]:2 = quantum.custom "CNOT"() [[q01_loop]]#0, [[q01_loop]]#1 adj : !quantum.bit, !quantum.bit
3333 // CHECK: scf.yield [[q01_loop2]]#0, [[q01_loop2]]#1 : !quantum.bit, !quantum.bit
3434 // CHECK: [[q01_out2:%.+]]:2 = quantum.custom "CNOT"() [[q01_out]]#0, [[q01_out]]#1 : !quantum.bit, !quantum.bit
3535 // CHECK: [[q2:%.+]] = quantum.extract [[qReg]][ 2] : !quantum.reg -> !quantum.bit
3636 // CHECK: [[q12_out:%.+]]:2 = scf.for %arg1 = [[c0]] to %arg0 step [[c1]] iter_args([[q12_in1:%.+]] = [[q01_out2]]#1, [[q12_in2:%.+]] = [[q2]]) -> (!quantum.bit, !quantum.bit) {
3737 // CHECK: [[q12_loop:%.+]]:2 = quantum.custom "CNOT"() [[q12_in1]], [[q12_in2]] : !quantum.bit, !quantum.bit
38- // CHECK: [[q12_loop2:%.+]]:2 = quantum.custom "CNOT"() [[q12_loop]]#0, [[q12_loop]]#1 {adjoint} : !quantum.bit, !quantum.bit
38+ // CHECK: [[q12_loop2:%.+]]:2 = quantum.custom "CNOT"() [[q12_loop]]#0, [[q12_loop]]#1 adj : !quantum.bit, !quantum.bit
3939 // CHECK: scf.yield [[q12_loop2]]#0, [[q12_loop2]]#1 : !quantum.bit, !quantum.bit
4040 // CHECK: [[q12_out2:%.+]]:2 = quantum.custom "CNOT"() [[q12_out]]#0, [[q12_out]]#1 : !quantum.bit, !quantum.bit
4141 // CHECK: [[q1_out:%.+]] = scf.for %arg1 = [[c0]] to %arg0 step [[c1]] iter_args([[q1_in:%.+]] = [[q12_out2]]#0) -> (!quantum.bit) {
4242 // CHECK: [[q1_loop:%.+]] = quantum.custom "T"() [[q1_in]] : !quantum.bit
43- // CHECK: [[q1_loop2:%.+]] = quantum.custom "T"() [[q1_loop]] {adjoint} : !quantum.bit
43+ // CHECK: [[q1_loop2:%.+]] = quantum.custom "T"() [[q1_loop]] adj : !quantum.bit
4444 // CHECK: scf.yield [[q1_loop2]] : !quantum.bit
4545 // CHECK: [[q1_out2:%.+]] = quantum.custom "T"() [[q1_out]] : !quantum.bit
4646 // CHECK: [[q3:%.+]] = quantum.extract [[qReg]][ 3] : !quantum.reg -> !quantum.bit
4747 // CHECK: [[q23_out:%.+]]:2 = scf.for %arg1 = [[c0]] to %arg0 step [[c1]] iter_args([[q23_in1:%.+]] = [[q12_out2]]#1, [[q23_in2:%.+]] = [[q3]]) -> (!quantum.bit, !quantum.bit) {
4848 // CHECK: [[q23_loop:%.+]]:2 = quantum.custom "CNOT"() [[q23_in1]], [[q23_in2]] : !quantum.bit, !quantum.bit
49- // CHECK: [[q23_loop2:%.+]]:2 = quantum.custom "CNOT"() [[q23_loop]]#0, [[q23_loop]]#1 {adjoint} : !quantum.bit, !quantum.bit
49+ // CHECK: [[q23_loop2:%.+]]:2 = quantum.custom "CNOT"() [[q23_loop]]#0, [[q23_loop]]#1 adj : !quantum.bit, !quantum.bit
5050 // CHECK: scf.yield [[q23_loop2]]#0, [[q23_loop2]]#1 : !quantum.bit, !quantum.bit
5151 // CHECK: [[q23_out2:%.+]]:2 = quantum.custom "CNOT"() [[q23_out]]#0, [[q23_out]]#1 : !quantum.bit, !quantum.bit
5252 // CHECK: [[q3_out:%.+]] = scf.for %arg1 = [[c0]] to %arg0 step [[c1]] iter_args([[q3_in:%.+]] = [[q23_out2]]#1) -> (!quantum.bit) {
53- // CHECK: [[q3_loop:%.+]] = quantum.custom "T"() [[q3_in]] {adjoint} : !quantum.bit
53+ // CHECK: [[q3_loop:%.+]] = quantum.custom "T"() [[q3_in]] adj : !quantum.bit
5454 // CHECK: [[q3_loop2:%.+]] = quantum.custom "T"() [[q3_loop]] : !quantum.bit
5555 // CHECK: scf.yield [[q3_loop2]] : !quantum.bit
56- // CHECK: [[q3_out2:%.+]] = quantum.custom "T"() [[q3_out]] {adjoint} : !quantum.bit
56+ // CHECK: [[q3_out2:%.+]] = quantum.custom "T"() [[q3_out]] adj : !quantum.bit
5757
5858
5959//CHECK-LABEL: func.func @circuit() -> tensor<f64> attributes {qnode} {
@@ -70,7 +70,7 @@ func.func @circuit() -> tensor<f64> attributes {qnode} {
7070 %out_qubits_2 = quantum.custom " T" () %out_qubits_1#0 : !quantum.bit
7171 %4 = quantum.extract %0 [ 3 ] : !quantum.reg -> !quantum.bit
7272 %out_qubits_3:2 = quantum.custom " CNOT" () %out_qubits_1#1 , %4 : !quantum.bit , !quantum.bit
73- %out_qubits_4 = quantum.custom " T" () %out_qubits_3#1 { adjoint } : !quantum.bit
73+ %out_qubits_4 = quantum.custom " T" () %out_qubits_3#1 adj : !quantum.bit
7474 %5 = quantum.namedobs %out_qubits_0#0 [ PauliY ] : !quantum.obs
7575 %6 = quantum.expval %5 {shots = 5 : i64 } : f64
7676 %from_elements = tensor.from_elements %6 : tensor <f64 >
0 commit comments