diff --git a/docs/run/configure-runtime-compilation.mdx b/docs/run/configure-runtime-compilation.mdx index 62621d35b1f..c673d0ff7a9 100644 --- a/docs/run/configure-runtime-compilation.mdx +++ b/docs/run/configure-runtime-compilation.mdx @@ -81,7 +81,7 @@ psi = RealAmplitudes(num_qubits=2, reps=2) H = SparsePauliOp.from_list([("II", 1), ("IZ", 2), ("XI", 3)]) theta = [0, 1, 1, 2, 3, 5] -pm = generate_preset_pass_manager(backend=backend) +pm = generate_preset_pass_manager(backend=backend, optimization_level=1) psi = pm.run(psi) H = H.apply_layout(psi.layout) diff --git a/docs/run/estimate-job-run-time.mdx b/docs/run/estimate-job-run-time.mdx index a8e62c81ec2..fa394be516c 100644 --- a/docs/run/estimate-job-run-time.mdx +++ b/docs/run/estimate-job-run-time.mdx @@ -46,7 +46,7 @@ qc.measure(1, 1) backend = service.least_busy(simulator=False,operational=True) # Generate ISA circuits -pm = generate_preset_pass_manager(backend=backend) +pm = generate_preset_pass_manager(backend=backend, optimization_level=1) isa_circuit = pm.run(qc) # Create a Sampler object diff --git a/docs/run/primitives-examples.mdx b/docs/run/primitives-examples.mdx index 935d5a6f073..a9500fe2cca 100644 --- a/docs/run/primitives-examples.mdx +++ b/docs/run/primitives-examples.mdx @@ -41,7 +41,7 @@ mat = np.real(random_hermitian(n_qubits, seed=1234)) circuit = IQP(mat) observable = SparsePauliOp("Z" * n_qubits) -pm = generate_preset_pass_manager(backend=backend) +pm = generate_preset_pass_manager(backend=backend, optimization_level=1) isa_circuit = pm.run(circuit) isa_observable = observable.apply_layout(isa_circuit.layout) @@ -81,7 +81,7 @@ observables = [ SparsePauliOp("Z" * n_qubits), ] -pm = generate_preset_pass_manager(backend=backend) +pm = generate_preset_pass_manager(backend=backend, optimization_level=1) isa_circuits = pm.run(circuits) isa_observables = [ob.apply_layout(isa_circuits[0].layout) for ob in observables] @@ -115,7 +115,7 @@ parameter_values = [ ] observable = SparsePauliOp("Z" * 127) -pm = generate_preset_pass_manager(backend=backend) +pm = generate_preset_pass_manager(backend=backend, optimization_level=1) isa_circuit = pm.run(circuit) isa_observable = observable.apply_layout(isa_circuit.layout) @@ -146,7 +146,7 @@ another_circuit = IQP(mat) observable = SparsePauliOp("X" * n_qubits) another_observable = SparsePauliOp("Y" * n_qubits) -pm = generate_preset_pass_manager(backend=backend) +pm = generate_preset_pass_manager(backend=backend, optimization_level=1) isa_circuit = pm.run(circuit) another_isa_circuit = pm.run(another_circuit) isa_observable = observable.apply_layout(isa_circuit.layout) @@ -199,7 +199,7 @@ mat = np.real(random_hermitian(n_qubits, seed=1234)) circuit = IQP(mat) circuit.measure_all() -pm = generate_preset_pass_manager(backend=backend) +pm = generate_preset_pass_manager(backend=backend, optimization_level=1) isa_circuit = pm.run(circuit) sampler = Sampler(backend) @@ -233,7 +233,7 @@ circuits = [IQP(mat) for mat in mats] for circuit in circuits: circuit.measure_all() -pm = generate_preset_pass_manager(backend=backend) +pm = generate_preset_pass_manager(backend=backend, optimization_level=1) isa_circuits = pm.run(circuits) sampler = Sampler(backend) @@ -260,7 +260,7 @@ backend = service.get_backend("ibm_brisbane") circuit = RealAmplitudes(num_qubits=127, reps=2) circuit.measure_all() -pm = generate_preset_pass_manager(backend=backend) +pm = generate_preset_pass_manager(backend=backend, optimization_level=1) isa_circuit = pm.run(circuit) # Define three sets of parameters for the circuit @@ -297,7 +297,7 @@ mat = np.real(random_hermitian(n_qubits, seed=rng)) another_circuit = IQP(mat) another_circuit.measure_all() -pm = generate_preset_pass_manager(backend=backend) +pm = generate_preset_pass_manager(backend=backend, optimization_level=1) isa_circuit = pm.run(circuit) another_isa_circuit = pm.run(another_circuit) diff --git a/docs/run/primitives-get-started.mdx b/docs/run/primitives-get-started.mdx index 2a83e6de91c..2c03da0b364 100644 --- a/docs/run/primitives-get-started.mdx +++ b/docs/run/primitives-get-started.mdx @@ -53,7 +53,7 @@ print(f">>> Observable: {observable.paulis}") The circuit and observable need to be transformed to only use instructions supported by the system. We'll use the transpiler to do this. ```python -pm = generate_preset_pass_manager(backend=backend) +pm = generate_preset_pass_manager(backend=backend, optimization_level=1) isa_circuit = pm.run(circuit) isa_observable = observable.apply_layout(isa_circuit.layout) ``` @@ -123,7 +123,7 @@ circuit.measure_all() Again, we use the transpiler to get an ISA circuit. ```python -pm = generate_preset_pass_manager(backend=backend) +pm = generate_preset_pass_manager(backend=backend, optimization_level=1) isa_circuit = pm.run(circuit) ``` diff --git a/docs/start/hello-world.ipynb b/docs/start/hello-world.ipynb index 12e266688cc..2c5b86a1c32 100644 --- a/docs/start/hello-world.ipynb +++ b/docs/start/hello-world.ipynb @@ -137,7 +137,7 @@ "source": [ "from qiskit.transpiler.preset_passmanagers import generate_preset_pass_manager\n", "\n", - "pm = generate_preset_pass_manager(backend=backend)\n", + "pm = generate_preset_pass_manager(backend=backend, optimization_level=1)\n", "isa_circuit = pm.run(qc)\n", "ZZ = ZZ.apply_layout(isa_circuit.layout)\n", "ZI = ZI.apply_layout(isa_circuit.layout)\n",