diff --git a/tutorials/basic_tutorials/prepare_state/prepare_state.ipynb b/tutorials/basic_tutorials/prepare_state/prepare_state.ipynb index e89d233cd..94c80dfd4 100644 --- a/tutorials/basic_tutorials/prepare_state/prepare_state.ipynb +++ b/tutorials/basic_tutorials/prepare_state/prepare_state.ipynb @@ -129,6 +129,7 @@ ], "source": [ "qprog = synthesize(main)\n", + "write_qmod(main, \"prepare_state\")\n", "show(qprog)" ] }, diff --git a/tutorials/basic_tutorials/prepare_state/prepare_state.qmod b/tutorials/basic_tutorials/prepare_state/prepare_state.qmod new file mode 100644 index 000000000..418c5e363 --- /dev/null +++ b/tutorials/basic_tutorials/prepare_state/prepare_state.qmod @@ -0,0 +1,36 @@ +qfunc main(output io: qbit[]) { + prepare_state([ + 0, + 0.002, + 0.004, + 0.006, + 0.0081, + 0.0101, + 0.0121, + 0.0141, + 0.0161, + 0.0181, + 0.0202, + 0.0222, + 0.0242, + 0.0262, + 0.0282, + 0.0302, + 0.0323, + 0.0343, + 0.0363, + 0.0383, + 0.0403, + 0.0423, + 0.0444, + 0.0464, + 0.0484, + 0.0504, + 0.0524, + 0.0544, + 0.0565, + 0.0585, + 0.0605, + 0.0625 + ], 0.01, io); +} diff --git a/tutorials/basic_tutorials/prepare_state/prepare_state.synthesis_options.json b/tutorials/basic_tutorials/prepare_state/prepare_state.synthesis_options.json new file mode 100644 index 000000000..c11dbfca9 --- /dev/null +++ b/tutorials/basic_tutorials/prepare_state/prepare_state.synthesis_options.json @@ -0,0 +1,43 @@ +{ + "constraints": { + "optimization_parameter": "no_opt" + }, + "preferences": { + "machine_precision": 8, + "custom_hardware_settings": { + "basis_gates": [ + "cy", + "rx", + "cx", + "x", + "sxdg", + "u2", + "id", + "cz", + "r", + "h", + "u1", + "t", + "u", + "rz", + "sdg", + "y", + "p", + "sx", + "s", + "ry", + "tdg", + "z" + ], + "is_symmetric_connectivity": true + }, + "debug_mode": true, + "synthesize_all_separately": false, + "optimization_level": 3, + "output_format": ["qasm"], + "pretty_qasm": true, + "transpilation_option": "auto optimize", + "timeout_seconds": 300, + "random_seed": 3686255877 + } +}