add_zip_rule_tool
Creates one-to-one pairs between quantum circuits and observables by matching specified indices, similar to Python's zip function.
Instructions
Add zip (one-to-one) rule to CircuitObservableBinding.
This generates one-to-one pairs of circuits and observables. This is analogous to Python's zip function.
For example, if circuit_indices=[0,2] and observable_indices=[1,0], it generates combinations: (0,1), (2,0).
Args: binding_id: The ID returned by create_circuit_observable_binding_tool. circuit_indices: List of circuit indices (must match length of observable_indices). observable_indices: List of observable indices (must match length of circuit_indices).
Returns: Dictionary containing: - status: "success" or "error" - binding_id: The binding ID - combinations_added: Number of combinations added - message: Status description
Example: # Add specific circuit-observable pairs result = add_zip_rule_tool( binding_id="your_binding_id", circuit_indices=[0, 2], observable_indices=[1, 0] ) # This adds 2 combinations: (circuit_0, observable_1), (circuit_2, observable_0)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| binding_id | Yes | ||
| circuit_indices | Yes | ||
| observable_indices | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||