diff --git a/src/quantum/azext_quantum/__init__.py b/src/quantum/azext_quantum/__init__.py index d404eaf6130..c32444a301f 100644 --- a/src/quantum/azext_quantum/__init__.py +++ b/src/quantum/azext_quantum/__init__.py @@ -13,7 +13,7 @@ # This is the version reported by the CLI to the service when submitting requests. # This should be in sync with the extension version in 'setup.py', unless we need to # submit using a different version. -CLI_REPORTED_VERSION = "1.0.0b4.dev3" +CLI_REPORTED_VERSION = "1.0.0b4" class QuantumCommandsLoader(AzCommandsLoader): diff --git a/src/quantum/azext_quantum/tests/latest/input_data/Qiskit-3-qubit-GHZ-circuit.qpy b/src/quantum/azext_quantum/tests/latest/input_data/Qiskit-3-qubit-GHZ-circuit.qpy deleted file mode 100644 index da6e605d536..00000000000 Binary files a/src/quantum/azext_quantum/tests/latest/input_data/Qiskit-3-qubit-GHZ-circuit.qpy and /dev/null differ diff --git a/src/quantum/azext_quantum/tests/latest/input_data/entanglement.qir b/src/quantum/azext_quantum/tests/latest/input_data/entanglement.qir deleted file mode 100644 index 1c10fd03bc5..00000000000 --- a/src/quantum/azext_quantum/tests/latest/input_data/entanglement.qir +++ /dev/null @@ -1,55 +0,0 @@ -%Result = type opaque -%Qubit = type opaque - -define void @ENTRYPOINT__main() #0 { - call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 0 to %Qubit*)) - call void @__quantum__qis__cx__body(%Qubit* inttoptr (i64 0 to %Qubit*), %Qubit* inttoptr (i64 1 to %Qubit*)) - call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 2 to %Qubit*)) - call void @__quantum__qis__cz__body(%Qubit* inttoptr (i64 2 to %Qubit*), %Qubit* inttoptr (i64 0 to %Qubit*)) - call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 2 to %Qubit*)) - call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 3 to %Qubit*)) - call void @__quantum__qis__cz__body(%Qubit* inttoptr (i64 3 to %Qubit*), %Qubit* inttoptr (i64 1 to %Qubit*)) - call void @__quantum__qis__h__body(%Qubit* inttoptr (i64 3 to %Qubit*)) - call void @__quantum__qis__mz__body(%Qubit* inttoptr (i64 2 to %Qubit*), %Result* inttoptr (i64 0 to %Result*)) #1 - call void @__quantum__qis__mz__body(%Qubit* inttoptr (i64 3 to %Qubit*), %Result* inttoptr (i64 1 to %Result*)) #1 - call void @__quantum__rt__tuple_record_output(i64 2, i8* null) - call void @__quantum__rt__result_record_output(%Result* inttoptr (i64 0 to %Result*), i8* null) - call void @__quantum__rt__result_record_output(%Result* inttoptr (i64 1 to %Result*), i8* null) - ret void -} - -declare void @__quantum__qis__ccx__body(%Qubit*, %Qubit*, %Qubit*) -declare void @__quantum__qis__cx__body(%Qubit*, %Qubit*) -declare void @__quantum__qis__cy__body(%Qubit*, %Qubit*) -declare void @__quantum__qis__cz__body(%Qubit*, %Qubit*) -declare void @__quantum__qis__rx__body(double, %Qubit*) -declare void @__quantum__qis__rxx__body(double, %Qubit*, %Qubit*) -declare void @__quantum__qis__ry__body(double, %Qubit*) -declare void @__quantum__qis__ryy__body(double, %Qubit*, %Qubit*) -declare void @__quantum__qis__rz__body(double, %Qubit*) -declare void @__quantum__qis__rzz__body(double, %Qubit*, %Qubit*) -declare void @__quantum__qis__h__body(%Qubit*) -declare void @__quantum__qis__s__body(%Qubit*) -declare void @__quantum__qis__s__adj(%Qubit*) -declare void @__quantum__qis__t__body(%Qubit*) -declare void @__quantum__qis__t__adj(%Qubit*) -declare void @__quantum__qis__x__body(%Qubit*) -declare void @__quantum__qis__y__body(%Qubit*) -declare void @__quantum__qis__z__body(%Qubit*) -declare void @__quantum__qis__swap__body(%Qubit*, %Qubit*) -declare void @__quantum__qis__mz__body(%Qubit*, %Result* writeonly) #1 -declare void @__quantum__rt__result_record_output(%Result*, i8*) -declare void @__quantum__rt__array_record_output(i64, i8*) -declare void @__quantum__rt__tuple_record_output(i64, i8*) - -attributes #0 = { "entry_point" "output_labeling_schema" "qir_profiles"="base_profile" "required_num_qubits"="4" "required_num_results"="2" } -attributes #1 = { "irreversible" } - -; module flags - -!llvm.module.flags = !{!0, !1, !2, !3} - -!0 = !{i32 1, !"qir_major_version", i32 1} -!1 = !{i32 7, !"qir_minor_version", i32 0} -!2 = !{i32 1, !"dynamic_qubit_management", i1 false} -!3 = !{i32 1, !"dynamic_result_management", i1 false} diff --git a/src/quantum/azext_quantum/tests/latest/input_data/qelib1.inc b/src/quantum/azext_quantum/tests/latest/input_data/qelib1.inc deleted file mode 100644 index d3c64de03a7..00000000000 --- a/src/quantum/azext_quantum/tests/latest/input_data/qelib1.inc +++ /dev/null @@ -1,266 +0,0 @@ -// Quantum Experience (QE) Standard Header -// file: qelib1.inc - -// --- QE Hardware primitives --- - -// 3-parameter 2-pulse single qubit gate -gate u3(theta,phi,lambda) q { U(theta,phi,lambda) q; } -// 2-parameter 1-pulse single qubit gate -gate u2(phi,lambda) q { U(pi/2,phi,lambda) q; } -// 1-parameter 0-pulse single qubit gate -gate u1(lambda) q { U(0,0,lambda) q; } -// controlled-NOT -gate cx c,t { CX c,t; } -// idle gate (identity) -gate id a { U(0,0,0) a; } -// idle gate (identity) with length gamma*sqglen -gate u0(gamma) q { U(0,0,0) q; } - -// --- QE Standard Gates --- - -// generic single qubit gate -gate u(theta,phi,lambda) q { U(theta,phi,lambda) q; } -// phase gate -gate p(lambda) q { U(0,0,lambda) q; } -// Pauli gate: bit-flip -gate x a { u3(pi,0,pi) a; } -// Pauli gate: bit and phase flip -gate y a { u3(pi,pi/2,pi/2) a; } -// Pauli gate: phase flip -gate z a { u1(pi) a; } -// Clifford gate: Hadamard -gate h a { u2(0,pi) a; } -// Clifford gate: sqrt(Z) phase gate -gate s a { u1(pi/2) a; } -// Clifford gate: conjugate of sqrt(Z) -gate sdg a { u1(-pi/2) a; } -// C3 gate: sqrt(S) phase gate -gate t a { u1(pi/4) a; } -// C3 gate: conjugate of sqrt(S) -gate tdg a { u1(-pi/4) a; } - -// --- Standard rotations --- -// Rotation around X-axis -gate rx(theta) a { u3(theta, -pi/2,pi/2) a; } -// rotation around Y-axis -gate ry(theta) a { u3(theta,0,0) a; } -// rotation around Z axis -gate rz(phi) a { u1(phi) a; } - -// --- QE Standard User-Defined Gates --- - -// sqrt(X) -gate sx a { sdg a; h a; sdg a; } -// inverse sqrt(X) -gate sxdg a { s a; h a; s a; } -// controlled-Phase -gate cz a,b { h b; cx a,b; h b; } -// controlled-Y -gate cy a,b { sdg b; cx a,b; s b; } -// swap -gate swap a,b { cx a,b; cx b,a; cx a,b; } -// controlled-H -gate ch a,b { -h b; sdg b; -cx a,b; -h b; t b; -cx a,b; -t b; h b; s b; x b; s a; -} -// C3 gate: Toffoli -gate ccx a,b,c -{ - h c; - cx b,c; tdg c; - cx a,c; t c; - cx b,c; tdg c; - cx a,c; t b; t c; h c; - cx a,b; t a; tdg b; - cx a,b; -} -// cswap (Fredkin) -gate cswap a,b,c -{ - cx c,b; - ccx a,b,c; - cx c,b; -} -// controlled rx rotation -gate crx(lambda) a,b -{ - u1(pi/2) b; - cx a,b; - u3(-lambda/2,0,0) b; - cx a,b; - u3(lambda/2,-pi/2,0) b; -} -// controlled ry rotation -gate cry(lambda) a,b -{ - ry(lambda/2) b; - cx a,b; - ry(-lambda/2) b; - cx a,b; -} -// controlled rz rotation -gate crz(lambda) a,b -{ - rz(lambda/2) b; - cx a,b; - rz(-lambda/2) b; - cx a,b; -} -// controlled phase rotation -gate cu1(lambda) a,b -{ - u1(lambda/2) a; - cx a,b; - u1(-lambda/2) b; - cx a,b; - u1(lambda/2) b; -} -gate cp(lambda) a,b -{ - p(lambda/2) a; - cx a,b; - p(-lambda/2) b; - cx a,b; - p(lambda/2) b; -} -// controlled-U -gate cu3(theta,phi,lambda) c, t -{ - // implements controlled-U(theta,phi,lambda) with target t and control c - u1((lambda+phi)/2) c; - u1((lambda-phi)/2) t; - cx c,t; - u3(-theta/2,0,-(phi+lambda)/2) t; - cx c,t; - u3(theta/2,phi,0) t; -} -// controlled-sqrt(X) -gate csx a,b { h b; cu1(pi/2) a,b; h b; } -// controlled-U gate -gate cu(theta,phi,lambda,gamma) c, t -{ p(gamma) c; - p((lambda+phi)/2) c; - p((lambda-phi)/2) t; - cx c,t; - u(-theta/2,0,-(phi+lambda)/2) t; - cx c,t; - u(theta/2,phi,0) t; -} -// two-qubit XX rotation -gate rxx(theta) a,b -{ - u3(pi/2, theta, 0) a; - h b; - cx a,b; - u1(-theta) b; - cx a,b; - h b; - u2(-pi, pi-theta) a; -} -// two-qubit ZZ rotation -gate rzz(theta) a,b -{ - cx a,b; - u1(theta) b; - cx a,b; -} -// relative-phase CCX -gate rccx a,b,c -{ - u2(0,pi) c; - u1(pi/4) c; - cx b, c; - u1(-pi/4) c; - cx a, c; - u1(pi/4) c; - cx b, c; - u1(-pi/4) c; - u2(0,pi) c; -} -// relative-phase 3-controlled X gate -gate rc3x a,b,c,d -{ - u2(0,pi) d; - u1(pi/4) d; - cx c,d; - u1(-pi/4) d; - u2(0,pi) d; - cx a,d; - u1(pi/4) d; - cx b,d; - u1(-pi/4) d; - cx a,d; - u1(pi/4) d; - cx b,d; - u1(-pi/4) d; - u2(0,pi) d; - u1(pi/4) d; - cx c,d; - u1(-pi/4) d; - u2(0,pi) d; -} -// 3-controlled X gate -gate c3x a,b,c,d -{ - h d; - p(pi/8) a; - p(pi/8) b; - p(pi/8) c; - p(pi/8) d; - cx a, b; - p(-pi/8) b; - cx a, b; - cx b, c; - p(-pi/8) c; - cx a, c; - p(pi/8) c; - cx b, c; - p(-pi/8) c; - cx a, c; - cx c, d; - p(-pi/8) d; - cx b, d; - p(pi/8) d; - cx c, d; - p(-pi/8) d; - cx a, d; - p(pi/8) d; - cx c, d; - p(-pi/8) d; - cx b, d; - p(pi/8) d; - cx c, d; - p(-pi/8) d; - cx a, d; - h d; -} -// 3-controlled sqrt(X) gate, this equals the C3X gate where the CU1 rotations are -pi/8 not -pi/4 -gate c3sqrtx a,b,c,d -{ - h d; cu1(pi/8) a,d; h d; - cx a,b; - h d; cu1(-pi/8) b,d; h d; - cx a,b; - h d; cu1(pi/8) b,d; h d; - cx b,c; - h d; cu1(-pi/8) c,d; h d; - cx a,c; - h d; cu1(pi/8) c,d; h d; - cx b,c; - h d; cu1(-pi/8) c,d; h d; - cx a,c; - h d; cu1(pi/8) c,d; h d; -} -// 4-controlled X gate -gate c4x a,b,c,d,e -{ - h e; cu1(pi/2) d,e; h e; - c3x a,b,c,d; - h e; cu1(-pi/2) d,e; h e; - c3x a,b,c,d; - c3sqrtx a,b,c,e; -} diff --git a/src/quantum/azext_quantum/tests/latest/input_data/teleport.json b/src/quantum/azext_quantum/tests/latest/input_data/teleport.json deleted file mode 100644 index 225b3f961ec..00000000000 --- a/src/quantum/azext_quantum/tests/latest/input_data/teleport.json +++ /dev/null @@ -1 +0,0 @@ -{"gateset": "qis", "qubits": 3, "circuit": [{"gate": "rz", "targets": [0], "rotation": 0.09999999999999964}, {"gate": "ry", "targets": [0], "rotation": 0.29999999999999977}, {"gate": "rz", "targets": [0], "rotation": 0.1999999999999993}, {"gate": "h", "targets": [1]}, {"gate": "x", "targets": [2], "controls": [1]}, {"gate": "x", "targets": [1], "controls": [0]}, {"gate": "h", "targets": [0]}, {"gate": "z", "targets": [2]}, {"gate": "x", "targets": [2]}]} \ No newline at end of file diff --git a/src/quantum/azext_quantum/tests/latest/input_data/teleport.qasm b/src/quantum/azext_quantum/tests/latest/input_data/teleport.qasm deleted file mode 100644 index 5f40285c8d9..00000000000 --- a/src/quantum/azext_quantum/tests/latest/input_data/teleport.qasm +++ /dev/null @@ -1,21 +0,0 @@ -// quantum teleportation example -OPENQASM 2.0; -include "qelib1.inc"; -qreg q[3]; -creg c0[1]; -creg c1[1]; -creg c2[1]; -// optional post-rotation for state tomography -gate post q { } -u3(0.3,0.2,0.1) q[0]; -h q[1]; -cx q[1],q[2]; -barrier q; -cx q[0],q[1]; -h q[0]; -measure q[0] -> c0[0]; -measure q[1] -> c1[0]; -if(c0==1) z q[2]; -if(c1==1) x q[2]; -post q[2]; -measure q[2] -> c2[0]; diff --git a/src/quantum/azext_quantum/tests/latest/test_quantum_jobs.py b/src/quantum/azext_quantum/tests/latest/test_quantum_jobs.py index c62ebd45d16..19bc6af2af3 100644 --- a/src/quantum/azext_quantum/tests/latest/test_quantum_jobs.py +++ b/src/quantum/azext_quantum/tests/latest/test_quantum_jobs.py @@ -198,7 +198,7 @@ def test_submit(self): test_location = get_test_workspace_location() test_resource_group = get_test_resource_group() test_workspace_temp = get_test_workspace_random_name() - test_provider_sku_list = "qci/qci-freepreview,rigetti/azure-quantum-credits,ionq/aqt-pay-as-you-go-cred-new,microsoft-qc/learn-and-develop" + test_provider_sku_list = "qci/qci-freepreview,rigetti/azure-quantum-credits,ionq/aqt-pay-as-you-go-cred-new" test_storage = get_test_workspace_storage() self.cmd(f"az quantum workspace create -g {test_resource_group} -w {test_workspace_temp} -l {test_location} -a {test_storage} -r {test_provider_sku_list} --skip-autoadd") @@ -206,19 +206,22 @@ def test_submit(self): # Submit a job to Rigetti and look for SAS tokens in URIs in the output results = self.cmd("az quantum job submit -t rigetti.sim.qvm --job-input-format rigetti.quil.v1 -t rigetti.sim.qvm --job-input-file src/quantum/azext_quantum/tests/latest/input_data/bell-state.quil --job-output-format rigetti.quil-results.v1 -o json").get_output_in_json() - self.assertIn("?se", results["containerUri"]) - self.assertIn("&sp=racw&sv=", results["containerUri"]) - self.assertIn("&sr=", results["containerUri"]) + self.assertIn("?sv=", results["containerUri"]) + self.assertIn("&st=", results["containerUri"]) + self.assertIn("&se=", results["containerUri"]) + self.assertIn("&sp=", results["containerUri"]) self.assertIn("&sig=", results["containerUri"]) - self.assertIn("?se", results["inputDataUri"]) - self.assertIn("&sp=racw&sv=", results["inputDataUri"]) - self.assertIn("&sr=", results["inputDataUri"]) + self.assertIn("?sv=", results["inputDataUri"]) + self.assertIn("&st=", results["inputDataUri"]) + self.assertIn("&se=", results["inputDataUri"]) + self.assertIn("&sp=", results["inputDataUri"]) self.assertIn("&sig=", results["inputDataUri"]) - self.assertIn("?se", results["outputDataUri"]) - self.assertIn("&sp=racw&sv=", results["outputDataUri"]) - self.assertIn("&sr=", results["outputDataUri"]) + self.assertIn("?sv=", results["outputDataUri"]) + self.assertIn("&st=", results["outputDataUri"]) + self.assertIn("&se=", results["outputDataUri"]) + self.assertIn("&sp=", results["outputDataUri"]) self.assertIn("&sig=", results["outputDataUri"]) # Run a Quil pass-through job on Rigetti diff --git a/src/quantum/azext_quantum/tests/latest/utils.py b/src/quantum/azext_quantum/tests/latest/utils.py index a4431cd9f67..be9d6ddb982 100644 --- a/src/quantum/azext_quantum/tests/latest/utils.py +++ b/src/quantum/azext_quantum/tests/latest/utils.py @@ -9,12 +9,11 @@ TEST_WORKSPACE_DEFAULT_LOCATION = "westus2" TEST_WORKSPACE_DEFAULT_STORAGE = "e2etests" TEST_WORKSPACE_DEFAULT_STORAGE_GRS = "e2etestsgrs" -TEST_WORKSPACE_DEFAULT_PROVIDER_SKU_LIST = "microsoft-qc/learn-and-develop" +TEST_WORKSPACE_DEFAULT_PROVIDER_SKU_LIST = "microsoft-elements/elements-internal-testing" TEST_CAPABILITIES_DEFAULT = "new.microsoft-qc;submit.microsoft-qc" - -TEST_TARGET_DEFAULT_PROVIDER_SKU_LIST = "microsoft-qc/learn-and-develop" -TEST_TARGET_DEFAULT_PROVIDER = "microsoft-qc" -TEST_TARGET_DEFAULT_TARGET = "microsoft.estimator" +TEST_TARGET_DEFAULT_PROVIDER_SKU_LIST = "microsoft-elements/elements-internal-testing" +TEST_TARGET_DEFAULT_PROVIDER = "microsoft-elements" +TEST_TARGET_DEFAULT_TARGET = "microsoft.dft" def get_from_os_environment(env_name, default): diff --git a/src/quantum/setup.py b/src/quantum/setup.py index 59c8ba4ffd1..c388227c883 100644 --- a/src/quantum/setup.py +++ b/src/quantum/setup.py @@ -17,7 +17,7 @@ # This version should match the latest entry in HISTORY.rst # Also, when updating this, please review the version used by the extension to # submit requests, which can be found at './azext_quantum/__init__.py' -VERSION = '1.0.0b4.dev3' +VERSION = '1.0.0b4' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers