Azure Quantum workspace charges

p martin 136 Reputation points
2021-05-19T03:23:32.263+00:00

I seem to have racked up quite a big bill in a few short weeks on Azure Quantum. I am unable to tell what caused this. Are there charges each time I run something at IONQ? I guess I thought a small amount of usage would be free for running some small circuits. I am just unable to tell what the charges are for... Is there a way to get a credit for small business or R&D? Thanks!

Azure Quantum
Azure Quantum
An Azure service that provides quantum computing and optimization solutions.
61 questions
{count} vote

Accepted answer
  1. p martin 136 Reputation points
    2021-05-20T01:12:32.763+00:00

    I did make some progress that might be helpful to others:

    Within Azure Portal:

    Click on <Cost Analysis>  (not the preview one, but the second one)
    Under "Scope" select your Azure Subscription
    Next to that under "View" select <Cost by Resource>
    

    Next over to the right,

    set <Group by:> to "Resource"
    set <Granularity> to "Daily"
    

    Click on a specific day and you will see:

    "Azure applications" under the service name and to the right will be
     `"ionq quantum computer - pay as you go - 1 (or 2) q gate shot"  
    

    and then the cost $x.xx`will be listed.

    For about 30 jobs in a day over the course of the day 3 qubits, 8 gates, 1000 shots per job, the daily cost was $84.00 just to give an idea. But most of that cost was because I had a 2 qubit CCNOT gate. There is a nifty little calculator at (which predicts lower costs):

    https://ionq.com/programs/research-credits/resource-estimator/

    And lastly in the very fine print, there is a minimum cost per run of $1.00 so that explains it...

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. p martin 136 Reputation points
    2021-05-24T01:32:16.967+00:00

    @Anonymous

    Python:
    I call the following using something like this where a circuit is a class:

    print(f" Approximate actual cost for this run = $ {ionq_cost(circuit.q1_gates,circuit.q2_gates,circuit.shots)} ")  
    

    IONq qpu cost estimate function:

    def ionq_cost(q1_gates, q2_gates, shots=500):  
     #Function to calculate the cost of running a   
     #circuit on the IONQ qpu hardware (not simulator)  
     #q1_gates = number of 1Q Gate   
     #q2_gates = number of 2Q Gate   
     #number of shots requested (500 is the default if not specified)  
      
     #Rates available in Azure under provider tab (modify) and subject to change  
     #These rates are good as of 5/23/2021  
      
     q1_rate = 0.00003 #1q gate shot  
     q2_rate = 0.0003  #2q gate shot (ouch)  
     flat_fee = 1.00   #flat fee for job  
      
     cost = (q1_rate*q1_gates + q2_rate*q2_gates)*shots  
      
     total_cost = cost + flat_fee  
      
     return total_cost   
      
    #COPYRIGHT (C) 2021 JOAB.AI  
    # ALL RIGHTS RESERVED  
    
    1 person found this answer helpful.
    0 comments No comments

  2. kobulloc-MSFT 23,656 Reputation points Microsoft Employee
    2021-05-21T14:53:42.913+00:00

    Adding to the example given by @p martin (thank you!), there is a Quantum computing foundations course on Microsoft Learn. When we ran the module, "Run algorithms on quantum hardware by using Azure Quantum" on IonQ, the cost was roughly $9.

    We are working on creating more examples as well as making it easier to better understand job costs and resource consumption. If there's anything that you think would be particularly useful, please let us know!